code
stringlengths 3
1.05M
| repo_name
stringlengths 4
116
| path
stringlengths 3
942
| language
stringclasses 30
values | license
stringclasses 15
values | size
int32 3
1.05M
|
---|---|---|---|---|---|
//
// NSDate+EVA.h
// EvaKit
//
// Created by Yegor Popovych on 8/25/15.
// Copyright (c) 2015 Evature. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSDate (EVA)
+ (instancetype)dateWithEvaString:(NSString*)evaString;
- (instancetype)dateByAddingDays:(NSInteger)days;
- (instancetype)dateByAddingHours:(NSInteger)hours;
@end
|
ypopovych/ios
|
EvaKit/Core/NSDate+EVA.h
|
C
|
mit
| 358 |
custom-resolve-1 {}
custom-resolve-2 {}
|
jonathantneal/postcss-import
|
test/fixtures/custom-resolve-array.expected.css
|
CSS
|
mit
| 40 |
<?php
namespace Oro\Bundle\TestFrameworkBundle\Tests\Unit\Behat\Cli;
use Fidry\AliceDataFixtures\Loader\SimpleLoader;
use Nelmio\Alice\Loader\NativeLoader;
use Oro\Bundle\TestFrameworkBundle\Behat\Cli\AvailableReferencesController;
use Oro\Bundle\TestFrameworkBundle\Behat\Isolation\DoctrineIsolator;
use Oro\Bundle\TestFrameworkBundle\Test\DataFixtures\AliceFixtureLoader;
use Oro\Bundle\TestFrameworkBundle\Tests\Unit\Stub\KernelStub;
use Oro\Component\Testing\TempDirExtension;
use Oro\Component\Testing\Unit\Command\Stub\InputStub;
use Oro\Component\Testing\Unit\Command\Stub\OutputStub;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Console\Command\Command;
class AvailableReferencesControllerTest extends \PHPUnit\Framework\TestCase
{
use TempDirExtension;
public function testConfigure()
{
$aliceLoader = new AliceFixtureLoader(new SimpleLoader(new NativeLoader()), new FileLocator());
$doctrineIsolator = $this->createMock(DoctrineIsolator::class);
$kernel = new KernelStub($this->getTempDir('test_kernel_logs'));
$controller = new AvailableReferencesController($aliceLoader, $doctrineIsolator, $kernel);
$command = new Command('test');
$controller->configure($command);
$this->assertTrue($command->getDefinition()->hasOption('available-references'));
$this->assertFalse($command->getDefinition()->getOption('available-references')->isValueRequired());
$this->assertEmpty($command->getDefinition()->getOption('available-references')->getDefault());
}
public function testExecute()
{
$aliceLoader = new AliceFixtureLoader(new SimpleLoader(new NativeLoader()), new FileLocator());
$doctrineIsolator = $this->createMock(DoctrineIsolator::class);
$doctrineIsolator->expects($this->once())->method('initReferences');
$kernel = new KernelStub($this->getTempDir('test_kernel_logs'));
$controller = new AvailableReferencesController($aliceLoader, $doctrineIsolator, $kernel);
$output = new OutputStub();
$returnCode = $controller->execute(new InputStub('', [], ['available-references' => true]), $output);
$this->assertSame(0, $returnCode);
}
public function testNotExecute()
{
$aliceLoader = new AliceFixtureLoader(new SimpleLoader(new NativeLoader()), new FileLocator());
$doctrineIsolator = $this->createMock(DoctrineIsolator::class);
$doctrineIsolator->expects($this->never())->method('initReferences');
$kernel = new KernelStub($this->getTempDir('test_kernel_logs'));
$controller = new AvailableReferencesController($aliceLoader, $doctrineIsolator, $kernel);
$output = new OutputStub();
$returnCode = $controller->execute(new InputStub(), $output);
$this->assertNotSame(0, $returnCode);
}
}
|
orocrm/platform
|
src/Oro/Bundle/TestFrameworkBundle/Tests/Unit/Behat/Cli/AvailableReferencesControllerTest.php
|
PHP
|
mit
| 2,862 |
<?php
namespace BusinessLogic\Exceptions;
use Exception;
class ApiFriendlyException extends \BaseException {
public $title;
public $httpResponseCode;
/**
* ApiFriendlyException constructor.
* @param string $message
* @param string $title
* @param int $httpResponseCode
*/
function __construct($message, $title, $httpResponseCode) {
$this->title = $title;
$this->httpResponseCode = $httpResponseCode;
parent::__construct($message);
}
}
|
mkoch227/Mods-for-HESK
|
api/BusinessLogic/Exceptions/ApiFriendlyException.php
|
PHP
|
mit
| 510 |
using JeffFerguson.Gepsio.Xml.Interfaces;
using System.Collections.Generic;
namespace JeffFerguson.Gepsio
{
/// <summary>
/// A collection of XBRL facts.
/// </summary>
public class Tuple : Fact
{
/// <summary>
/// A collection of <see cref="Fact"/> objects that are contained by the tuple.
/// </summary>
public FactCollection Facts { get; set; }
internal Tuple(XbrlFragment ParentFragment, INode TupleNode) : base(ParentFragment, TupleNode)
{
this.Facts = new FactCollection();
foreach (INode CurrentChild in TupleNode.ChildNodes)
{
var CurrentFact = Fact.Create(ParentFragment, CurrentChild);
if (CurrentFact != null)
this.Facts.Add(CurrentFact);
}
}
}
}
|
jnettleton/gepsio
|
JeffFerguson.Gepsio/Tuple.cs
|
C#
|
mit
| 843 |
using GraphQLCore.Events;
using GraphQLCore.Exceptions;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;
namespace GraphQLCore.Type.Complex
{
public class GraphQLSubscriptionType : GraphQLObjectType
{
public IEventBus EventBus { get; private set; }
public override System.Type SystemType { get; protected set; }
public GraphQLSubscriptionType(
string name,
string description,
IEventBus eventBus) : base(name, description)
{
this.EventBus = eventBus;
this.SystemType = this.GetType();
}
public SubscriptionFieldDefinitionBuilder<TFieldType> Field<TFieldType>(string fieldName, LambdaExpression fieldLambda)
{
return this.AddField<TFieldType>(fieldName, fieldLambda);
}
protected virtual SubscriptionFieldDefinitionBuilder<TFieldType> AddField<TFieldType>(
string fieldName, LambdaExpression resolver)
{
if (this.ContainsField(fieldName))
throw new GraphQLException("Can't insert two fields with the same name.");
var fieldInfo = this.CreateResolverFieldInfo(fieldName, resolver);
this.Fields.Add(fieldName, fieldInfo);
return new SubscriptionFieldDefinitionBuilder<TFieldType>(fieldInfo);
}
private GraphQLSubscriptionTypeFieldInfo CreateResolverFieldInfo(string fieldName, LambdaExpression resolver)
{
return GraphQLSubscriptionTypeFieldInfo.CreateResolverFieldInfo(fieldName, resolver);
}
}
}
|
adamivora/graphql-dotnetcore
|
src/GraphQLCore/Type/Complex/GraphQLSubscriptionType.cs
|
C#
|
mit
| 1,640 |
/*
-------------------------------------------------------------------------------
This file is part of OgreKit.
http://gamekit.googlecode.com/
Copyright (c) 2006-2010 Nestor Silveira.
Contributor(s): none yet.
-------------------------------------------------------------------------------
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
-------------------------------------------------------------------------------
*/
#include "OgreRoot.h"
#include "gkCameraNode.h"
#include "gkEngine.h"
#include "gkGameObject.h"
#include "gkUtils.h"
#include "gkSweptTest.h"
#include "gkPhysicsController.h"
#include "gkLogger.h"
#include "gkCamera.h"
#include "btBulletDynamicsCommon.h"
#include <limits>
gkCameraNode::gkCameraNode(gkLogicTree* parent, size_t id)
: gkLogicNode(parent, id),
m_center(gkVector3::ZERO),
m_oldCenter(gkVector3::ZERO),
m_target(0),
m_centerObj(0),
m_rollNode(gkQuaternion::IDENTITY),
m_pitchNode(gkQuaternion::IDENTITY),
m_idealRadius(0),
m_radiusIdealIsSet(false),
m_oldRadius(0),
m_oldRadiusIsSet(false)
{
ADD_ISOCK(UPDATE, true);
ADD_ISOCK(CENTER_OBJ, 0);
ADD_ISOCK(CENTER_POSITION, gkVector3::ZERO);
ADD_ISOCK(INITIAL_ROLL, 0);
ADD_ISOCK(INITIAL_PITCH, 45);
ADD_ISOCK(REL_X, 0);
ADD_ISOCK(REL_Y, 0);
ADD_ISOCK(REL_Z, 0);
ADD_ISOCK(TARGET, 0);
ADD_ISOCK(MIN_PITCH, 0);
ADD_ISOCK(MAX_PITCH, 80);
ADD_ISOCK(MIN_ROLL, -180);
ADD_ISOCK(MAX_ROLL, 180);
ADD_ISOCK(KEEP_DISTANCE, true);
ADD_ISOCK(MIN_Z, 0);
ADD_ISOCK(MAX_Z, std::numeric_limits<gkScalar>::infinity());
ADD_ISOCK(AVOID_BLOCKING, false);
ADD_ISOCK(BLOCKING_RADIUS, 0.3f);
ADD_ISOCK(STIFNESS, 0.8f);
ADD_ISOCK(DAMPING, 0.3f);
ADD_OSOCK(CURRENT_ROLL, gkQuaternion::IDENTITY);
ADD_OSOCK(CURRENT_PITCH, gkQuaternion::IDENTITY)
}
gkCameraNode::~gkCameraNode()
{
}
bool gkCameraNode::evaluate(gkScalar tick)
{
m_centerObj = GET_SOCKET_VALUE(CENTER_OBJ);
if (m_target != GET_SOCKET_VALUE(TARGET))
{
m_radiusIdealIsSet = false;
m_oldRadiusIsSet = false;
m_target = GET_SOCKET_VALUE(TARGET);
m_rollNode = gkQuaternion(gkDegree(GET_SOCKET_VALUE(INITIAL_ROLL)), gkVector3::UNIT_Z);
m_pitchNode = gkQuaternion(gkDegree(GET_SOCKET_VALUE(INITIAL_PITCH)), gkVector3::UNIT_X);
m_oldCenter = m_center = GET_SOCKET_VALUE(CENTER_POSITION);
}
bool update = GET_SOCKET_VALUE(UPDATE);
return update && m_centerObj && m_target && m_centerObj->isInstanced() && m_target->isInstanced();
}
void gkCameraNode::update(gkScalar tick)
{
gkQuaternion rollNode = m_rollNode * gkQuaternion(Ogre::Angle(-GET_SOCKET_VALUE(REL_X)), gkVector3::UNIT_Z);
gkScalar rollDegrees = rollNode.getRoll().valueDegrees();
if (rollDegrees >= GET_SOCKET_VALUE(MIN_ROLL) && rollDegrees <= GET_SOCKET_VALUE(MAX_ROLL))
{
m_rollNode = rollNode;
}
gkQuaternion pitchNode = m_pitchNode * gkQuaternion(Ogre::Angle(-GET_SOCKET_VALUE(REL_Y)), gkVector3::UNIT_X);
gkScalar pitchDegrees = pitchNode.getPitch().valueDegrees();
if (pitchDegrees >= GET_SOCKET_VALUE(MIN_PITCH) && pitchDegrees <= GET_SOCKET_VALUE(MAX_PITCH))
{
m_pitchNode = pitchNode;
}
m_target->setOrientation(m_rollNode * m_pitchNode);
if (m_center != GET_SOCKET_VALUE(CENTER_POSITION))
{
m_oldCenter = m_center;
m_center = GET_SOCKET_VALUE(CENTER_POSITION);
}
gkVector3 currentPosition = m_target->getPosition();
Ogre::Vector3 dir;
{
gkVector3 newZPosition = currentPosition;
if (GET_SOCKET_VALUE(REL_Z))
{
newZPosition.z += newZPosition.z * GET_SOCKET_VALUE(REL_Z) * 0.5;
m_radiusIdealIsSet = false;
}
if (GET_SOCKET_VALUE(KEEP_DISTANCE))
{
dir = m_oldCenter - newZPosition;
m_oldCenter = m_center;
}
else
{
dir = m_center - newZPosition;
}
}
gkScalar radius = dir.length();
if (!m_radiusIdealIsSet)
{
m_idealRadius = radius;
m_radiusIdealIsSet = true;
}
if (!m_oldRadiusIsSet)
{
m_oldRadius = radius;
m_oldRadiusIsSet = true;
}
gkScalar stretch = (radius - m_idealRadius) * GET_SOCKET_VALUE(STIFNESS);
gkScalar damp = (radius - m_oldRadius) * GET_SOCKET_VALUE(DAMPING);
radius += -stretch * tick - damp;
gkScalar minZ = GET_SOCKET_VALUE(MIN_Z);
gkScalar maxZ = GET_SOCKET_VALUE(MAX_Z);
if (radius < minZ)
{
radius = minZ;
}
else if (radius > maxZ)
{
radius = maxZ;
}
m_oldRadius = radius;
calculateNewPosition(currentPosition, radius, tick);
SET_SOCKET_VALUE(CURRENT_ROLL, m_rollNode);
SET_SOCKET_VALUE(CURRENT_PITCH, m_pitchNode);
}
void gkCameraNode::calculateNewPosition(const gkVector3& currentPosition, gkScalar rayLength, gkScalar tick)
{
gkVector3 oDir = gkVector3::NEGATIVE_UNIT_Z * rayLength;
gkVector3 tmpPosition = m_center - m_target->getOrientation() * oDir;
bool newPosSet = false;
if (GET_SOCKET_VALUE(AVOID_BLOCKING))
{
gkVector3 direction = tmpPosition - m_center;
Ogre::Ray ray(m_center, direction);
gkSweptTest::AVOID_LIST avoidList;
avoidList.insert(m_centerObj->getPhysicsController()->getCollisionObject());
gkSweptTest sweptTest(avoidList);
gkScalar blokingRadius = GET_SOCKET_VALUE(BLOCKING_RADIUS);
if (sweptTest.collides(ray, blokingRadius))
{
gkVector3 displacement = (sweptTest.getHitPoint() - currentPosition) * 0.9f;
m_target->setPosition(currentPosition + (displacement + sweptTest.getSliding()) * tick);
newPosSet = true;
}
}
if (!newPosSet)
{
m_target->setPosition(tmpPosition);
}
}
|
airgames/vuforia-gamekit-integration
|
Gamekit/Engine/Logic/gkCameraNode.cpp
|
C++
|
mit
| 6,175 |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Globalization;
using Microsoft.Build.Shared;
using Microsoft.Build.Execution;
using Microsoft.Build.Collections;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using Microsoft.Build.Construction;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Globbing;
using Microsoft.Build.Shared.FileSystem;
namespace Microsoft.Build.BackEnd
{
/// <summary>
/// A build request configuration represents all of the data necessary to know which project to build
/// and the environment in which it should be built.
/// </summary>
internal class BuildRequestConfiguration : IEquatable<BuildRequestConfiguration>,
INodePacket
{
/// <summary>
/// The invalid configuration id
/// </summary>
public const int InvalidConfigurationId = 0;
#region Static State
/// <summary>
/// This is the ID of the configuration as set by the generator of the configuration. When
/// a node generates a configuration, this is set to a negative number. The Build Manager will
/// generate positive IDs
/// </summary>
private int _configId;
/// <summary>
/// The full path to the project to build.
/// </summary>
private string _projectFullPath;
/// <summary>
/// The tools version specified for the configuration.
/// Always specified.
/// May have originated from a /tv switch, or an MSBuild task,
/// or a Project tag, or the default.
/// </summary>
private string _toolsVersion;
/// <summary>
/// Whether the tools version was set by the /tv switch or passed in through an msbuild callback
/// directly or indirectly.
/// </summary>
private bool _explicitToolsVersionSpecified;
/// <summary>
/// The set of global properties which should be used when building this project.
/// </summary>
private PropertyDictionary<ProjectPropertyInstance> _globalProperties;
/// <summary>
/// Flag indicating if the project in this configuration is a traversal
/// </summary>
private bool? _isTraversalProject;
/// <summary>
/// Synchronization object. Currently this just prevents us from caching and uncaching at the
/// same time, causing a race condition. This class is not made 100% threadsafe by the presence
/// and current usage of this lock.
/// </summary>
private readonly Object _syncLock = new Object();
#endregion
#region Build State
/// <summary>
/// The project object, representing the project to be built.
/// </summary>
private ProjectInstance _project;
/// <summary>
/// The state of a project instance which has been transferred from one node to another.
/// </summary>
private ProjectInstance _transferredState;
/// <summary>
/// The project instance properties we should transfer.
/// <see cref="_transferredState"/> and <see cref="_transferredProperties"/> are mutually exclud
/// </summary>
private List<ProjectPropertyInstance> _transferredProperties;
/// <summary>
/// The initial targets for the project
/// </summary>
private List<string> _projectInitialTargets;
/// <summary>
/// The default targets for the project
/// </summary>
private List<string> _projectDefaultTargets;
/// <summary>
/// This is the lookup representing the current project items and properties 'state'.
/// </summary>
private Lookup _baseLookup;
/// <summary>
/// This is the set of targets which are currently building but which have not yet completed.
/// { targetName -> globalRequestId }
/// </summary>
private Dictionary<string, int> _activelyBuildingTargets;
/// <summary>
/// The node where this configuration's master results are stored.
/// </summary>
private int _resultsNodeId = Scheduler.InvalidNodeId;
///<summary>
/// Holds a snapshot of the environment at the time we blocked.
/// </summary>
private Dictionary<string, string> _savedEnvironmentVariables;
/// <summary>
/// Holds a snapshot of the current working directory at the time we blocked.
/// </summary>
private string _savedCurrentDirectory;
private bool _translateEntireProjectInstanceState;
#endregion
/// <summary>
/// The target names that were requested to execute.
/// </summary>
internal IReadOnlyCollection<string> TargetNames { get; }
/// <summary>
/// Initializes a configuration from a BuildRequestData structure. Used by the BuildManager.
/// Figures out the correct tools version to use, falling back to the provided default if necessary.
/// May throw InvalidProjectFileException.
/// </summary>
/// <param name="data">The data containing the configuration information.</param>
/// <param name="defaultToolsVersion">The default ToolsVersion to use as a fallback</param>
internal BuildRequestConfiguration(BuildRequestData data, string defaultToolsVersion)
: this(0, data, defaultToolsVersion)
{
}
/// <summary>
/// Initializes a configuration from a BuildRequestData structure. Used by the BuildManager.
/// Figures out the correct tools version to use, falling back to the provided default if necessary.
/// May throw InvalidProjectFileException.
/// </summary>
/// <param name="configId">The configuration ID to assign to this new configuration.</param>
/// <param name="data">The data containing the configuration information.</param>
/// <param name="defaultToolsVersion">The default ToolsVersion to use as a fallback</param>
internal BuildRequestConfiguration(int configId, BuildRequestData data, string defaultToolsVersion)
{
ErrorUtilities.VerifyThrowArgumentNull(data, nameof(data));
ErrorUtilities.VerifyThrowInternalLength(data.ProjectFullPath, "data.ProjectFullPath");
_configId = configId;
_projectFullPath = data.ProjectFullPath;
_explicitToolsVersionSpecified = data.ExplicitToolsVersionSpecified;
_toolsVersion = ResolveToolsVersion(data, defaultToolsVersion);
_globalProperties = data.GlobalPropertiesDictionary;
TargetNames = new List<string>(data.TargetNames);
// The following information only exists when the request is populated with an existing project.
if (data.ProjectInstance != null)
{
_project = data.ProjectInstance;
_projectInitialTargets = data.ProjectInstance.InitialTargets;
_projectDefaultTargets = data.ProjectInstance.DefaultTargets;
_translateEntireProjectInstanceState = data.ProjectInstance.TranslateEntireState;
if (data.PropertiesToTransfer != null)
{
_transferredProperties = new List<ProjectPropertyInstance>();
foreach (var name in data.PropertiesToTransfer)
{
_transferredProperties.Add(data.ProjectInstance.GetProperty(name));
}
}
IsCacheable = false;
}
else
{
IsCacheable = true;
}
}
/// <summary>
/// Creates a new BuildRequestConfiguration based on an existing project instance.
/// Used by the BuildManager to populate configurations from a solution.
/// </summary>
/// <param name="configId">The configuration id</param>
/// <param name="instance">The project instance.</param>
internal BuildRequestConfiguration(int configId, ProjectInstance instance)
{
ErrorUtilities.VerifyThrowArgumentNull(instance, nameof(instance));
_configId = configId;
_projectFullPath = instance.FullPath;
_explicitToolsVersionSpecified = instance.ExplicitToolsVersionSpecified;
_toolsVersion = instance.ToolsVersion;
_globalProperties = instance.GlobalPropertiesDictionary;
_project = instance;
_projectInitialTargets = instance.InitialTargets;
_projectDefaultTargets = instance.DefaultTargets;
_translateEntireProjectInstanceState = instance.TranslateEntireState;
IsCacheable = false;
}
/// <summary>
/// Creates a new configuration which is a clone of the old one but with a new id.
/// </summary>
private BuildRequestConfiguration(int configId, BuildRequestConfiguration other)
{
ErrorUtilities.VerifyThrow(configId != InvalidConfigurationId, "Configuration ID must not be invalid when using this constructor.");
ErrorUtilities.VerifyThrowArgumentNull(other, nameof(other));
ErrorUtilities.VerifyThrow(other._transferredState == null, "Unexpected transferred state still set on other configuration.");
_project = other._project;
_translateEntireProjectInstanceState = other._translateEntireProjectInstanceState;
_transferredProperties = other._transferredProperties;
_projectDefaultTargets = other._projectDefaultTargets;
_projectInitialTargets = other._projectInitialTargets;
_projectFullPath = other._projectFullPath;
_toolsVersion = other._toolsVersion;
_explicitToolsVersionSpecified = other._explicitToolsVersionSpecified;
_globalProperties = other._globalProperties;
IsCacheable = other.IsCacheable;
_configId = configId;
TargetNames = other.TargetNames;
}
/// <summary>
/// Private constructor for deserialization
/// </summary>
private BuildRequestConfiguration(ITranslator translator)
{
Translate(translator);
}
internal BuildRequestConfiguration()
{
}
/// <summary>
/// Flag indicating whether the configuration is allowed to cache. This does not mean that the configuration will
/// actually cache - there are several criteria which must for that.
/// </summary>
public bool IsCacheable { get; set; }
/// <summary>
/// When reset caches is false we need to only keep around the configurations which are being asked for during the design time build.
/// Other configurations need to be cleared. If this configuration is marked as ExplicitlyLoadedConfiguration then it should not be cleared when
/// Reset Caches is false.
/// </summary>
public bool ExplicitlyLoaded { get; set; }
/// <summary>
/// Flag indicating whether or not the configuration is actually building.
/// </summary>
public bool IsActivelyBuilding => _activelyBuildingTargets?.Count > 0;
/// <summary>
/// Flag indicating whether or not the configuration has been loaded before.
/// </summary>
public bool IsLoaded => _project != null && _project.IsLoaded;
/// <summary>
/// Flag indicating if the configuration is cached or not.
/// </summary>
public bool IsCached { get; private set; }
/// <summary>
/// Flag indicating if this configuration represents a traversal project. Traversal projects
/// are projects which typically do little or no work themselves, but have references to other
/// projects (and thus are used to find more work.) The scheduler can treat these differently
/// in order to fill its work queue with other options for scheduling.
/// </summary>
public bool IsTraversal
{
get
{
if (!_isTraversalProject.HasValue)
{
if (String.Equals(Path.GetFileName(ProjectFullPath), "dirs.proj", StringComparison.OrdinalIgnoreCase))
{
// dirs.proj are assumed to be traversals
_isTraversalProject = true;
}
else if (FileUtilities.IsMetaprojectFilename(ProjectFullPath))
{
// Metaprojects generated by the SolutionProjectGenerator are traversals. They have no
// on-disk representation - they are ProjectInstances which exist only in memory.
_isTraversalProject = true;
}
else if (FileUtilities.IsSolutionFilename(ProjectFullPath))
{
// Solution files are considered to be traversals.
_isTraversalProject = true;
}
else
{
_isTraversalProject = false;
}
}
return _isTraversalProject.Value;
}
}
/// <summary>
/// Returns true if this configuration was generated on a node and has not yet been resolved.
/// </summary>
public bool WasGeneratedByNode => _configId < InvalidConfigurationId;
/// <summary>
/// Sets or returns the configuration id
/// </summary>
public int ConfigurationId
{
[DebuggerStepThrough]
get => _configId;
[DebuggerStepThrough]
set
{
ErrorUtilities.VerifyThrow((_configId == InvalidConfigurationId) || (WasGeneratedByNode && (value > InvalidConfigurationId)), "Configuration ID must be invalid, or it must be less than invalid and the new config must be greater than invalid. It was {0}, the new value was {1}.", _configId, value);
_configId = value;
}
}
/// <summary>
/// Returns the filename of the project to build.
/// </summary>
public string ProjectFullPath => _projectFullPath;
/// <summary>
/// The tools version specified for the configuration.
/// Always specified.
/// May have originated from a /tv switch, or an MSBuild task,
/// or a Project tag, or the default.
/// </summary>
public string ToolsVersion => _toolsVersion;
/// <summary>
/// Returns the global properties to use to build this project.
/// </summary>
public PropertyDictionary<ProjectPropertyInstance> GlobalProperties => _globalProperties;
/// <summary>
/// Sets or returns the project to build.
/// </summary>
public ProjectInstance Project
{
[DebuggerStepThrough]
get
{
ErrorUtilities.VerifyThrow(!IsCached, "We shouldn't be accessing the ProjectInstance when the configuration is cached.");
return _project;
}
[DebuggerStepThrough]
set
{
SetProjectBasedState(value);
// If we have transferred the state of a project previously, then we need to assume its items and properties.
if (_transferredState != null)
{
ErrorUtilities.VerifyThrow(_transferredProperties == null, "Shouldn't be transferring entire state of ProjectInstance when transferredProperties is not null.");
_project.UpdateStateFrom(_transferredState);
_transferredState = null;
}
// If we have just requested a limited transfer of properties, do that.
if (_transferredProperties != null)
{
foreach (var property in _transferredProperties)
{
_project.SetProperty(property.Name, ((IProperty)property).EvaluatedValueEscaped);
}
_transferredProperties = null;
}
}
}
private void SetProjectBasedState(ProjectInstance project)
{
ErrorUtilities.VerifyThrow(project != null, "Cannot set null project.");
_project = project;
_baseLookup = null;
// Clear these out so the other accessors don't complain. We don't want to generally enable resetting these fields.
_projectDefaultTargets = null;
_projectInitialTargets = null;
ProjectDefaultTargets = _project.DefaultTargets;
ProjectInitialTargets = _project.InitialTargets;
_translateEntireProjectInstanceState = _project.TranslateEntireState;
if (IsCached)
{
ClearCacheFile();
IsCached = false;
}
}
public void InitializeProject(BuildParameters buildParameters, Func<ProjectInstance> loadProjectFromFile)
{
if (_project == null || // building from file. Load project from file
_transferredProperties != null // need to overwrite particular properties, so load project from file and overwrite properties
)
{
Project = loadProjectFromFile.Invoke();
}
else if (_translateEntireProjectInstanceState)
{
// projectInstance was serialized over. Finish initialization with node specific state
_project.LateInitialize(buildParameters.ProjectRootElementCache, buildParameters.HostServices);
}
ErrorUtilities.VerifyThrow(IsLoaded, $"This {nameof(BuildRequestConfiguration)} must be loaded at the end of this method");
}
internal void CreateUniqueGlobalProperty()
{
// create a copy so the mutation does not leak into the ProjectInstance
_globalProperties = new PropertyDictionary<ProjectPropertyInstance>(_globalProperties);
var key = $"{MSBuildConstants.MSBuildDummyGlobalPropertyHeader}{Guid.NewGuid():N}";
_globalProperties[key] = ProjectPropertyInstance.Create(key, "Forces unique project identity in the MSBuild engine");
}
/// <summary>
/// Returns true if the default and initial targets have been resolved.
/// </summary>
public bool HasTargetsResolved => ProjectInitialTargets != null && ProjectDefaultTargets != null;
/// <summary>
/// Gets the initial targets for the project
/// </summary>
public List<string> ProjectInitialTargets
{
get => _projectInitialTargets;
[DebuggerStepThrough]
set
{
ErrorUtilities.VerifyThrow(_projectInitialTargets == null, "Initial targets cannot be reset once they have been set.");
_projectInitialTargets = value;
}
}
/// <summary>
/// Gets the default targets for the project
/// </summary>
public List<string> ProjectDefaultTargets
{
[DebuggerStepThrough]
get => _projectDefaultTargets;
[DebuggerStepThrough]
set
{
ErrorUtilities.VerifyThrow(_projectDefaultTargets == null, "Default targets cannot be reset once they have been set.");
_projectDefaultTargets = value;
}
}
/// <summary>
/// Returns the node packet type
/// </summary>
public NodePacketType Type => NodePacketType.BuildRequestConfiguration;
/// <summary>
/// Returns the lookup which collects all items and properties during the run of this project.
/// </summary>
public Lookup BaseLookup
{
get
{
ErrorUtilities.VerifyThrow(!IsCached, "Configuration is cached, we shouldn't be accessing the lookup.");
if (_baseLookup == null)
{
_baseLookup = new Lookup(Project.ItemsToBuildWith, Project.PropertiesToBuildWith);
}
return _baseLookup;
}
}
/// <summary>
/// Retrieves the set of targets currently building, mapped to the request id building them.
/// </summary>
public Dictionary<string, int> ActivelyBuildingTargets => _activelyBuildingTargets ?? (_activelyBuildingTargets =
new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase));
/// <summary>
/// Holds a snapshot of the environment at the time we blocked.
/// </summary>
public Dictionary<string, string> SavedEnvironmentVariables
{
get => _savedEnvironmentVariables;
set => _savedEnvironmentVariables = value;
}
/// <summary>
/// Holds a snapshot of the current working directory at the time we blocked.
/// </summary>
public string SavedCurrentDirectory
{
get => _savedCurrentDirectory;
set => _savedCurrentDirectory = value;
}
/// <summary>
/// Whether the tools version was set by the /tv switch or passed in through an msbuild callback
/// directly or indirectly.
/// </summary>
public bool ExplicitToolsVersionSpecified => _explicitToolsVersionSpecified;
/// <summary>
/// Gets or sets the node on which this configuration's results are stored.
/// </summary>
internal int ResultsNodeId
{
get => _resultsNodeId;
set => _resultsNodeId = value;
}
/// <summary>
/// Implementation of the equality operator.
/// </summary>
/// <param name="left">The left hand argument</param>
/// <param name="right">The right hand argument</param>
/// <returns>True if the objects are equivalent, false otherwise.</returns>
public static bool operator ==(BuildRequestConfiguration left, BuildRequestConfiguration right)
{
if (ReferenceEquals(left, null))
{
if (ReferenceEquals(right, null))
{
return true;
}
else
{
return false;
}
}
else
{
if (ReferenceEquals(right, null))
{
return false;
}
else
{
return left.InternalEquals(right);
}
}
}
/// <summary>
/// Implementation of the inequality operator.
/// </summary>
/// <param name="left">The left-hand argument</param>
/// <param name="right">The right-hand argument</param>
/// <returns>True if the objects are not equivalent, false otherwise.</returns>
public static bool operator !=(BuildRequestConfiguration left, BuildRequestConfiguration right)
{
return !(left == right);
}
/// <summary>
/// Requests that the configuration be cached to disk.
/// </summary>
public void CacheIfPossible()
{
lock (_syncLock)
{
if (IsActivelyBuilding || IsCached || !IsLoaded || !IsCacheable)
{
return;
}
lock (_project)
{
if (IsCacheable)
{
ITranslator translator = GetConfigurationTranslator(TranslationDirection.WriteToStream);
try
{
_project.Cache(translator);
_baseLookup = null;
IsCached = true;
}
finally
{
translator.Writer.BaseStream.Dispose();
}
}
}
}
}
/// <summary>
/// Retrieves the configuration data from the cache.
/// </summary>
public void RetrieveFromCache()
{
lock (_syncLock)
{
if (!IsLoaded)
{
return;
}
if (!IsCached)
{
return;
}
ITranslator translator = GetConfigurationTranslator(TranslationDirection.ReadFromStream);
try
{
_project.RetrieveFromCache(translator);
IsCached = false;
}
finally
{
translator.Reader.BaseStream.Dispose();
}
}
}
/// <summary>
/// Gets the list of targets which are used to build the specified request, including all initial and applicable default targets
/// </summary>
/// <param name="request">The request </param>
/// <returns>An array of t</returns>
public List<string> GetTargetsUsedToBuildRequest(BuildRequest request)
{
ErrorUtilities.VerifyThrow(request.ConfigurationId == ConfigurationId, "Request does not match configuration.");
ErrorUtilities.VerifyThrow(_projectInitialTargets != null, "Initial targets have not been set.");
ErrorUtilities.VerifyThrow(_projectDefaultTargets != null, "Default targets have not been set.");
List<string> initialTargets = _projectInitialTargets;
List<string> nonInitialTargets = (request.Targets.Count == 0) ? _projectDefaultTargets : request.Targets;
var allTargets = new List<string>(initialTargets.Count + nonInitialTargets.Count);
allTargets.AddRange(initialTargets);
allTargets.AddRange(nonInitialTargets);
return allTargets;
}
/// <summary>
/// Returns the list of targets that are AfterTargets (or AfterTargets of the AfterTargets)
/// of the entrypoint targets.
/// </summary>
public List<string> GetAfterTargetsForDefaultTargets(BuildRequest request)
{
// We may not have a project available. In which case, return nothing -- we simply don't have
// enough information to figure out what the correct answer is.
if (!IsCached && Project != null)
{
var afterTargetsFound = new HashSet<string>();
var targetsToCheckForAfterTargets = new Queue<string>((request.Targets.Count == 0) ? ProjectDefaultTargets : request.Targets);
while (targetsToCheckForAfterTargets.Count > 0)
{
string targetToCheck = targetsToCheckForAfterTargets.Dequeue();
IList<TargetSpecification> targetsWhichRunAfter = Project.GetTargetsWhichRunAfter(targetToCheck);
foreach (TargetSpecification targetWhichRunsAfter in targetsWhichRunAfter)
{
if (afterTargetsFound.Add(targetWhichRunsAfter.TargetName))
{
// If it's already in there, we've already looked into it so no need to do so again. Otherwise, add it
// to the list to check.
targetsToCheckForAfterTargets.Enqueue(targetWhichRunsAfter.TargetName);
}
}
}
return new List<string>(afterTargetsFound);
}
return null;
}
private Func<string, bool> shouldSkipStaticGraphIsolationOnReference;
public bool ShouldSkipIsolationConstraintsForReference(string referenceFullPath)
{
ErrorUtilities.VerifyThrowInternalNull(Project, nameof(Project));
ErrorUtilities.VerifyThrowInternalLength(referenceFullPath, nameof(referenceFullPath));
ErrorUtilities.VerifyThrow(Path.IsPathRooted(referenceFullPath), "Method does not treat path normalization cases");
if (shouldSkipStaticGraphIsolationOnReference == null)
{
shouldSkipStaticGraphIsolationOnReference = GetReferenceFilter();
}
return shouldSkipStaticGraphIsolationOnReference(referenceFullPath);
Func<string, bool> GetReferenceFilter()
{
lock (_syncLock)
{
if (shouldSkipStaticGraphIsolationOnReference != null)
{
return shouldSkipStaticGraphIsolationOnReference;
}
var items = Project.GetItems(ItemTypeNames.GraphIsolationExemptReference);
if (items.Count == 0 || items.All(i => string.IsNullOrWhiteSpace(i.EvaluatedInclude)))
{
return _ => false;
}
var fragments = items.SelectMany(i => ExpressionShredder.SplitSemiColonSeparatedList(i.EvaluatedInclude));
var glob = new CompositeGlob(
fragments
.Select(s => MSBuildGlob.Parse(Project.Directory, s)));
return s => glob.IsMatch(s);
}
}
}
/// <summary>
/// This override is used to provide a hash code for storage in dictionaries and the like.
/// </summary>
/// <remarks>
/// If two objects are Equal, they must have the same hash code, for dictionaries to work correctly.
/// Two configurations are Equal if their global properties are equivalent, not necessary reference equals.
/// So only include filename and tools version in the hashcode.
/// </remarks>
/// <returns>A hash code</returns>
public override int GetHashCode()
{
return StringComparer.OrdinalIgnoreCase.GetHashCode(_projectFullPath) ^ StringComparer.OrdinalIgnoreCase.GetHashCode(_toolsVersion);
}
/// <summary>
/// Returns a string representation of the object
/// </summary>
/// <returns>String representation of the object</returns>
public override string ToString()
{
return String.Format(CultureInfo.CurrentCulture, "{0} {1} {2} {3}", _configId, _projectFullPath, _toolsVersion, _globalProperties);
}
/// <summary>
/// Determines object equality
/// </summary>
/// <param name="obj">The object to compare with</param>
/// <returns>True if they contain the same data, false otherwise</returns>
public override bool Equals(object obj)
{
if (ReferenceEquals(obj, null))
{
return false;
}
if (GetType() != obj.GetType())
{
return false;
}
return InternalEquals((BuildRequestConfiguration)obj);
}
#region IEquatable<BuildRequestConfiguration> Members
/// <summary>
/// Equality of the configuration is the product of the equality of its members.
/// </summary>
/// <param name="other">The other configuration to which we will compare ourselves.</param>
/// <returns>True if equal, false otherwise.</returns>
public bool Equals(BuildRequestConfiguration other)
{
if (ReferenceEquals(other, null))
{
return false;
}
return InternalEquals(other);
}
#endregion
#region INodePacket Members
/// <summary>
/// Reads or writes the packet to the serializer.
/// </summary>
public void Translate(ITranslator translator)
{
if (translator.Mode == TranslationDirection.WriteToStream && _transferredProperties == null)
{
// When writing, we will transfer the state of any loaded project instance if we aren't transferring a limited subset.
_transferredState = _project;
}
translator.Translate(ref _configId);
translator.Translate(ref _projectFullPath);
translator.Translate(ref _toolsVersion);
translator.Translate(ref _explicitToolsVersionSpecified);
translator.TranslateDictionary(ref _globalProperties, ProjectPropertyInstance.FactoryForDeserialization);
translator.Translate(ref _translateEntireProjectInstanceState);
translator.Translate(ref _transferredState, ProjectInstance.FactoryForDeserialization);
translator.Translate(ref _transferredProperties, ProjectPropertyInstance.FactoryForDeserialization);
translator.Translate(ref _resultsNodeId);
translator.Translate(ref _savedCurrentDirectory);
translator.TranslateDictionary(ref _savedEnvironmentVariables, StringComparer.OrdinalIgnoreCase);
// if the entire state is translated, then the transferred state, if exists, represents the full evaluation data
if (_translateEntireProjectInstanceState &&
translator.Mode == TranslationDirection.ReadFromStream &&
_transferredState != null)
{
SetProjectBasedState(_transferredState);
}
}
internal void TranslateForFutureUse(ITranslator translator)
{
translator.Translate(ref _configId);
translator.Translate(ref _projectFullPath);
translator.Translate(ref _toolsVersion);
translator.Translate(ref _explicitToolsVersionSpecified);
translator.Translate(ref _projectDefaultTargets);
translator.Translate(ref _projectInitialTargets);
translator.TranslateDictionary(ref _globalProperties, ProjectPropertyInstance.FactoryForDeserialization);
}
/// <summary>
/// Factory for serialization.
/// </summary>
internal static BuildRequestConfiguration FactoryForDeserialization(ITranslator translator)
{
return new BuildRequestConfiguration(translator);
}
#endregion
/// <summary>
/// Applies the state from the specified instance to the loaded instance. This overwrites the items and properties.
/// </summary>
/// <remarks>
/// Used when we transfer results and state from a previous node to the current one.
/// </remarks>
internal void ApplyTransferredState(ProjectInstance instance)
{
if (instance != null)
{
_project.UpdateStateFrom(instance);
}
}
/// <summary>
/// Gets the name of the cache file for this configuration.
/// </summary>
internal string GetCacheFile()
{
string filename = Path.Combine(FileUtilities.GetCacheDirectory(), String.Format(CultureInfo.InvariantCulture, "Configuration{0}.cache", _configId));
return filename;
}
/// <summary>
/// Deletes the cache file
/// </summary>
internal void ClearCacheFile()
{
string cacheFile = GetCacheFile();
if (FileSystems.Default.FileExists(cacheFile))
{
FileUtilities.DeleteNoThrow(cacheFile);
}
}
/// <summary>
/// Clones this BuildRequestConfiguration but sets a new configuration id.
/// </summary>
internal BuildRequestConfiguration ShallowCloneWithNewId(int newId)
{
return new BuildRequestConfiguration(newId, this);
}
/// <summary>
/// Compares this object with another for equality
/// </summary>
/// <param name="other">The object with which to compare this one.</param>
/// <returns>True if the objects contain the same data, false otherwise.</returns>
private bool InternalEquals(BuildRequestConfiguration other)
{
if (ReferenceEquals(this, other))
{
return true;
}
if ((other.WasGeneratedByNode == WasGeneratedByNode) &&
(other._configId != InvalidConfigurationId) &&
(_configId != InvalidConfigurationId))
{
return _configId == other._configId;
}
else
{
return _projectFullPath.Equals(other._projectFullPath, StringComparison.OrdinalIgnoreCase) &&
_toolsVersion.Equals(other._toolsVersion, StringComparison.OrdinalIgnoreCase) &&
_globalProperties.Equals(other._globalProperties);
}
}
/// <summary>
/// Determines what the real tools version is.
/// </summary>
private static string ResolveToolsVersion(BuildRequestData data, string defaultToolsVersion)
{
if (data.ExplicitToolsVersionSpecified)
{
return data.ExplicitlySpecifiedToolsVersion;
}
// None was specified by the call, fall back to the project's ToolsVersion attribute
if (data.ProjectInstance != null)
{
return data.ProjectInstance.Toolset.ToolsVersion;
}
if (FileUtilities.IsVCProjFilename(data.ProjectFullPath))
{
ProjectFileErrorUtilities.ThrowInvalidProjectFile(new BuildEventFileInfo(data.ProjectFullPath), "ProjectUpgradeNeededToVcxProj", data.ProjectFullPath);
}
// We used to "sniff" the tools version from the project XML by opening it and reading the attribute.
// This was causing unnecessary overhead since the ToolsVersion is never really used. Instead we just
// return the default tools version
return defaultToolsVersion;
}
/// <summary>
/// Gets the translator for this configuration.
/// </summary>
private ITranslator GetConfigurationTranslator(TranslationDirection direction)
{
string cacheFile = GetCacheFile();
try
{
if (direction == TranslationDirection.WriteToStream)
{
Directory.CreateDirectory(Path.GetDirectoryName(cacheFile));
return BinaryTranslator.GetWriteTranslator(File.Create(cacheFile));
}
else
{
// Not using sharedReadBuffer because this is not a memory stream and so the buffer won't be used anyway.
return BinaryTranslator.GetReadTranslator(File.OpenRead(cacheFile), null);
}
}
catch (Exception e)
{
if (e is DirectoryNotFoundException || e is UnauthorizedAccessException)
{
ErrorUtilities.ThrowInvalidOperation("CacheFileInaccessible", cacheFile, e);
}
// UNREACHABLE
throw;
}
}
}
}
|
jeffkl/msbuild
|
src/Build/BackEnd/Shared/BuildRequestConfiguration.cs
|
C#
|
mit
| 40,115 |
//
// ZLPhotoManager.h
// ZLPhotoBrowser
//
// Created by long on 17/4/12.
// Copyright © 2017年 long. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Photos/Photos.h>
#import "ZLPhotoModel.h"
@class ZLAlbumListModel;
@interface ZLPhotoManager : NSObject
/**
* @brief 设置排序模式
*/
+ (void)setSortAscending:(BOOL)ascending;
/**
* @brief 保存图片到系统相册
*/
+ (void)saveImageToAblum:(UIImage *)image completion:(void (^)(BOOL suc, PHAsset *asset))completion;
/**
* @brief 在全部照片中获取指定个数、排序方式的部分照片,在跳往预览大图界面时候video和gif均为no,不受参数影响
*/
+ (NSArray<ZLPhotoModel *> *)getAllAssetInPhotoAlbumWithAscending:(BOOL)ascending limitCount:(NSInteger)limit allowSelectVideo:(BOOL)allowSelectVideo allowSelectImage:(BOOL)allowSelectImage allowSelectGif:(BOOL)allowSelectGif allowSelectLivePhoto:(BOOL)allowSelectLivePhoto;
/**
* @brief 获取相机胶卷相册列表对象
*/
+ (ZLAlbumListModel *)getCameraRollAlbumList:(BOOL)allowSelectVideo allowSelectImage:(BOOL)allowSelectImage;
/**
* @brief 获取用户所有相册列表
*/
+ (void)getPhotoAblumList:(BOOL)allowSelectVideo allowSelectImage:(BOOL)allowSelectImage complete:(void (^)(NSArray<ZLAlbumListModel *> *))complete;
/**
* @brief 将result中对象转换成ZLPhotoModel
*/
+ (NSArray<ZLPhotoModel *> *)getPhotoInResult:(PHFetchResult<PHAsset *> *)result allowSelectVideo:(BOOL)allowSelectVideo allowSelectImage:(BOOL)allowSelectImage allowSelectGif:(BOOL)allowSelectGif allowSelectLivePhoto:(BOOL)allowSelectLivePhoto;
/**
* @brief 获取选中的图片
*/
+ (void)requestSelectedImageForAsset:(ZLPhotoModel *)model isOriginal:(BOOL)isOriginal allowSelectGif:(BOOL)allowSelectGif completion:(void (^)(UIImage *, NSDictionary *))completion;
/**
获取原图data,转换gif图
*/
+ (void)requestOriginalImageDataForAsset:(PHAsset *)asset completion:(void (^)(NSData *, NSDictionary *))completion;
/**
* @brief 获取原图
*/
+ (void)requestOriginalImageForAsset:(PHAsset *)asset completion:(void (^)(UIImage *, NSDictionary *))completion;
/**
* @brief 根据传入size获取图片
*/
+ (PHImageRequestID)requestImageForAsset:(PHAsset *)asset size:(CGSize)size completion:(void (^)(UIImage *, NSDictionary *))completion;
/**
* @brief 获取live photo
*/
+ (void)requestLivePhotoForAsset:(PHAsset *)asset completion:(void (^)(PHLivePhoto *, NSDictionary *))completion;
/**
* @brief 获取视频
*/
+ (void)requestVideoForAsset:(PHAsset *)asset completion:(void (^)(AVPlayerItem *, NSDictionary *))completion;
/**
* @brief 将系统mediatype转换为自定义mediatype
*/
+ (ZLAssetMediaType)transformAssetType:(PHAsset *)asset;
/**
* @brief 判断图片是否存储在本地/或者已经从iCloud上下载到本地
*/
+ (BOOL)judgeAssetisInLocalAblum:(PHAsset *)asset;
/**
* @brief 获取图片字节大小
*/
+ (void)getPhotosBytesWithArray:(NSArray<ZLPhotoModel *> *)photos completion:(void (^)(NSString *photosBytes))completion;
/**
* @brief 标记源数组中已被选择的model
*/
+ (void)markSelcectModelInArr:(NSArray<ZLPhotoModel *> *)dataArr selArr:(NSArray<ZLPhotoModel *> *)selArr;
/**
* @brief 将image data转换为gif图片,sdwebimage
*/
+ (UIImage *)transformToGifImageWithData:(NSData *)data;
@end
|
kafeidou1991/JiuJiuWu
|
Pods/ZLPhotoBrowser/PhotoBrowser/ZLPhotoManager.h
|
C
|
mit
| 3,353 |
<?php
/*************************************************************
* TorrentFlux PHP Torrent Manager
* www.torrentflux.com
**************************************************************/
/*
* This file is part of TorrentFlux.
*
* TorrentFlux is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* TorrentFlux is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with TorrentFlux; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* ***
* Usage: btmakemetafile.py <trackerurl> <file> [file...] [params...]
*
* --announce_list <arg>
* a list of announce URLs - explained below (defaults to '')
*
* --httpseeds <arg>
* a list of http seed URLs - explained below (defaults to '')
*
* --piece_size_pow2 <arg>
* which power of 2 to set the piece size to (0 = automatic) (defaults
* to 0)
*
* --comment <arg>
* optional human-readable comment to put in .torrent (defaults to '')
*
* --filesystem_encoding <arg>
* optional specification for filesystem encoding (set automatically in
* recent Python versions) (defaults to '')
*
* --target <arg>
* optional target file for the torrent (defaults to '')
*
*
* announce_list = optional list of redundant/backup tracker URLs, in the format:
* url[,url...][|url[,url...]...]
* where URLs separated by commas are all tried first
* before the next group of URLs separated by the pipe is checked.
* If none is given, it is assumed you don't want one in the metafile.
* If announce_list is given, clients which support it
* will ignore the <announce> value.
* Examples:
* http://tracker1.com|http://tracker2.com|http://tracker3.com
* (tries trackers 1-3 in order)
* http://tracker1.com,http://tracker2.com,http://tracker3.com
* (tries trackers 1-3 in a randomly selected order)
* http://tracker1.com|http://backup1.com,http://backup2.com
* (tries tracker 1 first, then tries between the 2 backups randomly)
*
* httpseeds = optional list of http-seed URLs, in the format:
* url[|url...]
* ***
*/
include_once './Class/autoload.php';
include_once ("config.php");
include_once ("functions.php");
$settings = new Gratbrav\Torrentbug\Settings();
// Variable information
$tpath = $settings->get('torrent_file_path');
$tfile = getRequestVar('torrent');
$file = getRequestVar('path');
$torrent = cleanFileName(StripFolders(trim($file))) . ".torrent";
$announce = (getRequestVar('announce')) ? getRequestVar('announce') : "http://";
$ancelist = getRequestVar('announcelist');
$comment = getRequestVar('comments');
$peice = getRequestVar('piecesize');
$alert = (getRequestVar('alert')) ? 1 : "''";
$private = (getRequestVar('Private') == "Private") ? true : false;
$dht = (getRequestVar('DHT') == "DHT") ? true : false;
// Let's create the torrent
if (! empty($announce) && $announce != "http://") {
// Create maketorrent directory if it doesn't exist
if (! is_dir($tpath)) {
@mkdir($tpath);
}
// Clean up old files
if (@file_exists($tpath . $tfile)) {
@unlink($tpath . $tfile);
}
// This is the command to execute
$app = "nohup " . $settings->get('pythonCmd') . " -OO " . $settings->get('btmakemetafile') . " " . escapeshellarg($announce) . " " . escapeshellarg($settings->get('path') . $file) . " ";
// Is there comments to add?
if (! empty($comment)) {
$app .= "--comment " . escapeshellarg($comment) . " ";
}
// Set the piece size
if (! empty($peice)) {
$app .= "--piece_size_pow2 " . escapeshellarg($peice) . " ";
}
if (! empty($ancelist)) {
$check = "/" . str_replace("/", "\/", quotemeta($announce)) . "/i";
// if they didn't add the primary tracker in, we will add it for them
if (preg_match($check, $ancelist, $result))
$app .= "--announce_list " . escapeshellarg($ancelist) . " ";
else
$app .= "--announce_list " . escapeshellarg($announce . "," . $ancelist) . " ";
}
// Set the target torrent fiel
$app .= "--target " . escapeshellarg($tpath . $tfile);
// Set to never timeout for large torrents
set_time_limit(0);
// Let's see how long this takes...
$time_start = microtime(true);
// Execute the command -- w00t!
exec($app);
// We want to check to make sure the file was successful
$success = false;
$raw = @file_get_contents($tpath . $tfile);
if (preg_match("/6:pieces([^:]+):/i", $raw, $results)) {
// This means it is a valid torrent
$success = true;
// Make an entry for the owner
$options = [
'user_id' => $cfg['user'],
'file' => $tfile,
'action' => $cfg["constants"]["file_upload"]
];
$log = new \Gratbrav\Torrentbug\Log\Service();
$log->save($options);
// Check to see if one of the flags were set
if ($private || $dht) {
// Add private/dht Flags
// e7:privatei1e
// e17:dht_backup_enablei1e
// e20:dht_backup_requestedi1e
if (preg_match("/6:pieces([^:]+):/i", $raw, $results)) {
$pos = strpos($raw, "6:pieces") + 9 + strlen($results[1]) + $results[1];
$fp = @fopen($tpath . $tfile, "r+");
@fseek($fp, $pos, SEEK_SET);
if ($private) {
@fwrite($fp, "7:privatei1eee");
} else {
@fwrite($fp, "e7:privatei0e17:dht_backup_enablei1e20:dht_backup_requestedi1eee");
}
@fclose($fp);
}
}
} else {
// Something went wrong, clean up
if (@file_exists($tpath . $tfile)) {
@unlink($tpath . $tfile);
}
}
// We are done! how long did we take?
$time_end = microtime(true);
$diff = duration($time_end - $time_start);
// make path URL friendly to support non-standard characters
$downpath = urlencode($tfile);
// Depending if we were successful, display the required information
if ($success) {
$onLoad = "completed( '" . $downpath . "', " . $alert . ", '" . $diff . "' );";
} else {
$onLoad = "failed( '" . $downpath . "', " . $alert . " );";
}
}
// This is the torrent download prompt
if (isset($_REQUEST["download"])) {
$tfile = getRequestVar("download");
// ../ is not allowed in the file name
if (! ereg("(\.\.\/)", $tfile)) {
// Does the file exist?
if (file_exists($tpath . $tfile)) {
// Prompt the user to download the new torrent file.
header("Content-type: application/octet-stream\n");
header("Content-disposition: attachment; filename=\"" . $tfile . "\"\n");
header("Content-transfer-encoding: binary\n");
header("Content-length: " . @filesize($tpath . $tfile) . "\n");
// Send the torrent file
$fp = @fopen($tpath . $tfile, "r");
@fpassthru($fp);
@fclose($fp);
$options = [
'user_id' => $cfg['user'],
'file' => $tfile,
'action' => $cfg["constants"]["fm_download"]
];
$log = new \Gratbrav\Torrentbug\Log\Service();
$log->save($options);
} else {
$options = [
'user_id' => $cfg['user'],
'file' => 'File Not found for download: ' . $cfg['user'] . ' tried to download ' . $tfile,
'action' => $cfg["constants"]["error"]
];
$log = new \Gratbrav\Torrentbug\Log\Service();
$log->save($options);
}
} else {
$options = [
'user_id' => $cfg['user'],
'file' => 'ILLEGAL DOWNLOAD: ' . $cfg['user'] . ' tried to download ' . $tfile,
'action' => $cfg["constants"]["error"]
];
$log = new \Gratbrav\Torrentbug\Log\Service();
$log->save($options);
}
exit();
}
// Strip the folders from the path
function StripFolders($path)
{
$pos = strrpos($path, "/") + 1;
$path = substr($path, $pos);
return $path;
}
// Convert a timestamp to a duration string
function duration($timestamp)
{
$years = floor($timestamp / (60 * 60 * 24 * 365));
$timestamp %= 60 * 60 * 24 * 365;
$weeks = floor($timestamp / (60 * 60 * 24 * 7));
$timestamp %= 60 * 60 * 24 * 7;
$days = floor($timestamp / (60 * 60 * 24));
$timestamp %= 60 * 60 * 24;
$hrs = floor($timestamp / (60 * 60));
$timestamp %= 60 * 60;
$mins = floor($timestamp / 60);
$secs = $timestamp % 60;
$str = "";
if ($years >= 1)
$str .= "{$years} years ";
if ($weeks >= 1)
$str .= "{$weeks} weeks ";
if ($days >= 1)
$str .= "{$days} days ";
if ($hrs >= 1)
$str .= "{$hrs} hours ";
if ($mins >= 1)
$str .= "{$mins} minutes ";
if ($secs >= 1)
$str .= "{$secs} seconds ";
return $str;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1" />
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"
charset="<?php echo _CHARSET ?>">
<TITLE><?php echo $cfg["pagetitle"]; ?> - Torrent Maker</TITLE>
<LINK REL="icon" HREF="images/favicon.ico" TYPE="image/x-icon" />
<LINK REL="shortcut icon" HREF="images/favicon.ico" TYPE="image/x-icon" />
<LINK REL="StyleSheet"
HREF="themes/<?php echo $cfg["theme"]; ?>/style.css" TYPE="text/css" />
</HEAD>
<SCRIPT SRC="tooltip.js" TYPE="text/javascript"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function doSubmit( obj )
{
// Basic check to see if maketorrent is already running
if( obj.value === "Creating..." )
return false;
// Run some basic validation
var valid = true;
var tlength = document.maketorrent.torrent.value.length - 8;
var torrent = document.maketorrent.torrent.value.substr( tlength );
document.getElementById('output').innerHTML = "";
document.getElementById('ttag').innerHTML = "";
document.getElementById('atag').innerHTML = "";
if( torrent !== ".torrent" )
{
document.getElementById('ttag').innerHTML = "<b style=\"color: #990000;\">*</b>";
document.getElementById('output').innerHTML += "<b style=\"color: #990000;\">* Torrent file must end in .torrent</b><BR />";
valid = false;
}
if( document.maketorrent.announce.value === "http://" )
{
document.getElementById('atag').innerHTML = "<b style=\"color: #990000;\">*</b>";
document.getElementById('output').innerHTML += "<b style=\"color: #990000;\">* Please enter a valid announce URL.</b><BR />";
valid = false;
}
// For saftely reason, let's force the property to false if it's disabled (private tracker)
if( document.maketorrent.DHT.disabled )
{
document.maketorrent.DHT.checked = false;
}
// If validation passed, submit form
if( valid === true )
{
disableForm();
toggleLayer('progress');
document.getElementById('output').innerHTML += "<b>Creating torrent...</b><BR /><BR />";
document.getElementById('output').innerHTML += "<i>* Note that larger folder/files will take some time to process,</i><BR />";
document.getElementById('output').innerHTML += "<i> do not close the window until it has been completed.</i><BR /><BR />";
document.getElementById('output').innerHTML += " When completed, the torrent will show in your list<BR />";
document.getElementById('output').innerHTML += " and a download link will be provided.<BR />";
return true;
}
return false;
}
function disableForm()
{
// Because of IE issue of disabling the submit button,
// we change the text and don't allow resubmitting
document.maketorrent.tsubmit.value = "Creating...";
document.maketorrent.torrent.readOnly = true;
document.maketorrent.announce.readOnly = true;
}
function ToggleDHT( dhtstatus )
{
document.maketorrent.DHT.disabled = dhtstatus;
}
function toggleLayer( whichLayer )
{
if( document.getElementById )
{
// This is the way the standards work
var style2 = document.getElementById(whichLayer).style;
style2.display = style2.display ? "" : "block";
}
else if( document.all )
{
// This is the way old msie versions work
var style2 = document.all[whichLayer].style;
style2.display = style2.display ? "" : "block";
}
else if( document.layers )
{
// This is the way nn4 works
var style2 = document.layers[whichLayer].style;
style2.display = style2.display ? "" : "block";
}
}
function completed( downpath, alertme, timetaken )
{
document.getElementById('output').innerHTML = "<b style='color: #005500;'>Creation completed!</b><BR />";
document.getElementById('output').innerHTML += "Time taken: <i>" + timetaken + "</i><BR />";
document.getElementById('output').innerHTML += "The new torrent has been added to your list.<BR /><BR />"
document.getElementById('output').innerHTML += "<img src='images/green.gif' border='0' title='Torrent Created' align='absmiddle'> You can download the <a style='font-weight: bold;' href='?download=" + downpath + "'>torrent here</a><BR />";
if( alertme === 1 )
alert( 'Creation of torrent completed!' );
}
function failed( downpath, alertme )
{
document.getElementById('output').innerHTML = "<b style='color: #AA0000;'>Creation failed!</b><BR /><BR />";
document.getElementById('output').innerHTML += "An error occured while trying to create the torrent.<BR />";
if( alertme === 1 )
alert( 'Creation of torrent failed!' );
}
var anlst = "(optional) announce_list = list of tracker URLs<BR />\n";
anlst += " <i>url[,url...][|url[,url...]...]</i><BR />\n";
anlst += " URLs separated by commas are tried first<BR />\n";
anlst += " before URLs separated by the pipe is checked.<BR />\n";
anlst += "Examples:<BR />\n";
anlst += " <i>http://a.com<strong>|</strong>http://b.com<strong>|</strong>http://c.com</i><BR />\n";
anlst += " (tries <b>a-c</b> in order)<BR />\n";
anlst += " <i>http://a.com<strong>,</strong>http://b.com<strong>,</strong>http://c.com</i><BR />\n";
anlst += " (tries <b>a-c</b> in a randomly selected order)<BR />\n";
anlst += " <i>http://a.com<strong>|</strong>http://b.com<strong>,</strong>http://c.com</i><BR />\n";
anlst += " (tries <b>a</b> first, then tries <b>b-c</b> randomly)<BR />\n";
var annce = "tracker announce URL.<BR /><BR />\n";
annce += "Example:<BR />\n";
annce += " <i>http://tracker.com/announce</i><BR />\n";
var tornt = "torrent name to be saved as<BR /><BR />\n";
tornt += "Example:<BR />\n";
tornt += " <i>gnome-livecd-2.10.torrent</i><BR />\n";
var comnt = "add a comment to your torrent file (optional)<BR />\n";
comnt += "";
var piece = "data piece size for torrent<BR />\n";
piece += "power of 2 value to set the piece size to<BR />\n";
piece += "(0 = automatic) (0 only option in this version)<BR />\n";
var prvte = "private tracker support<BR />\n";
prvte += "(disallows DHT if enabled)<BR />\n";
var dhtbl = "DHT (Distributed Hash Table)<BR /><BR />\n";
dhtbl += "can only be set abled if private flag is not set true<BR />\n";
</SCRIPT>
<body topmargin="8" leftmargin="5"
bgcolor="<?php echo $cfg["main_bgcolor"] ?>"
style="font-family: Tahoma, 'Times New Roman'; font-size: 12px;"
onLoad="
<?php
if (! empty($private))
echo "ToggleDHT(true);";
else
echo "ToggleDHT(false);";
if (! empty($onLoad))
echo $onLoad;
?>">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table border="1"
bordercolor="<?php echo $cfg["table_border_dk"] ?>"
cellpadding="4" cellspacing="0">
<tr>
<td
bgcolor="<?php echo $cfg["main_bgcolor"] ?>"
background="themes/<?php echo $cfg["theme"] ?>/images/bar.gif">
<?php DisplayTitleBar($cfg["pagetitle"]." - Torrent Maker", false); ?>
</td>
</tr>
<tr>
<td
bgcolor="<?php echo $cfg["table_header_bg"] ?>">
<div align="left">
<table width="100%"
bgcolor="<?php echo $cfg["body_data_bg"] ?>">
<tr>
<td>
<form
action="<?php echo $_SERVER['REQUEST_URI']; ?>"
method="post"
id="maketorrent"
name="maketorrent">
<table>
<tr>
<td><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(tornt);"
hspace="1" />Torrent
name:</td>
<td><input
type="text"
id="torrent"
name="torrent"
size="55"
value="<?php echo $torrent; ?>" />
<label
id="ttag"></label></td>
</tr>
<tr>
<td><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(annce);"
hspace="1" />Announcement
URL:</td>
<td><input
type="text"
id="announce"
name="announce"
size="55"
value="<?php echo $announce; ?>" />
<label
id="atag"></label></td>
</tr>
<tr>
<td><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(anlst);"
hspace="1" />Announce
List:</td>
<td><input
type="text"
id="announcelist"
name="announcelist"
size="55"
value="<?php echo $ancelist; ?>" />
<label
id="altag"></label></td>
</tr>
<tr>
<td><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(piece);"
hspace="1" />Piece
size:</td>
<td><select
id="piecesize"
name="piecesize">
<!-- <option id="0" value="0" selected>0 (Auto)</option> -->
<option
id="0"
value="0"
selected>0
(Auto)</option>
<option
id="256"
value="18">256</option>
<option
id="512"
value="19">512</option>
<option
id="1024"
value="20">1024</option>
<option
id="2048"
value="21">2048</option>
</select>
bytes</td>
</tr>
<tr>
<td
valign="top"><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(comnt);"
hspace="1" />Comments:</td>
<td><textarea
cols="50"
rows="3"
id="comments"
name="comments"><?php echo $comment; ?></textarea></td>
</tr>
<tr>
<td><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(prvte);"
hspace="1" />Private
Torrent:</td>
<td><input
type="radio"
id="Private"
name="Private"
value="Private"
onClick="ToggleDHT(true);"
<?php echo ( $private ) ? " checked" : ""; ?>>Yes</input>
<input
type="radio"
id="Private"
name="Private"
value="NotPrivate"
onClick="ToggleDHT(false);"
<?php echo ( !$private ) ? " checked" : ""; ?>>No</input>
</td>
</tr>
<tr>
<td><img
align="absmiddle"
src="images/info.gif"
onmouseover="return escape(dhtbl);"
hspace="1" />DHT
Support:</td>
<td><input
type="checkbox"
id="DHT"
name="DHT"
<?php echo ( $dht ) ? " checked" : ""; ?>
value="DHT"></input></td>
</tr>
<tr>
<td> </td>
<td><input
type="submit"
id="tsubmit"
name="tsubmit"
onClick="return doSubmit(this);"
value="Create" />
<input
type="button"
id="Cancel"
name="close"
value="Close"
onClick="window.close();" />
<label
for="alert"
title="Send alert message box when torrent has been completed.">
<input
type="checkbox"
id="alert"
name="alert"
<?php echo ( $alert != "''" ) ? " checked" : ""; ?>
value="AlertMe" />
Notify
me
of
completion
</label></td>
</tr>
<tr>
<td
colspan="2">
<div
id="progress"
name="progress"
align="center"
style="display: none;">
<img
src="images/progress_bar.gif"
width="200"
height="20" />
</div> <label
id="output"></label>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<script language="javascript">tt_Init();</script>
</body>
</html>
|
gratbrav/torrentbug
|
src/maketorrent.php
|
PHP
|
mit
| 33,207 |
<template>
<div class="page">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner sliding">
<div class="left">
<a href="#" class="link back">
<i class="icon icon-back"></i>
<span class="if-not-md">Back</span>
</a>
</div>
<div class="title">Popup</div>
</div>
</div>
<div class="page-content">
<div class="block block-strong">
<p>Popup is a modal window with any HTML content that pops up over App's main content. Popup as all other
overlays is part of so called "Temporary Views".</p>
<p>
<a href="#" class="button button-fill popup-open" data-popup=".demo-popup">Open Popup</a>
</p>
<p>
<a href="#" class="button button-fill" @click=${createPopup}>Create Dynamic Popup</a>
</p>
</div>
<div class="block-title">Swipe To Close</div>
<div class="block block-strong">
<p>Popup can be closed with swipe to top or bottom:</p>
<p>
<a href="#" class="button button-fill popup-open" data-popup=".demo-popup-swipe">Swipe To Close</a>
</p>
<p>Or it can be closed with swipe on special swipe handler and, for example, only to bottom:</p>
<p>
<a href="#" class="button button-fill popup-open" data-popup=".demo-popup-swipe-handler">With Swipe
Handler</a>
</p>
</div>
<div class="block-title">Push View</div>
<div class="block block-strong">
<p>Popup can push view behind. By default it has effect only when "safe-area-inset-top" is more than zero (iOS
fullscreen webapp or iOS cordova app)</p>
<p>
<a href="#" class="button button-fill popup-open" data-popup=".demo-popup-push">Popup Push</a>
</p>
</div>
</div>
<div class="popup demo-popup">
<div class="page">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="title">Popup Title</div>
<div class="right"><a href="#" class="link popup-close">Close</a></div>
</div>
</div>
<div class="page-content">
<div class="block">
<p>Here comes popup. You can put here anything, even independent view with its own navigation. Also not,
that by default popup looks a bit different on iPhone/iPod and iPad, on iPhone it is fullscreen.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse faucibus mauris leo, eu bibendum
neque congue non. Ut leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus,
viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis dignissim. Suspendisse non nisl semper
tellus malesuada suscipit eu et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare consequat
nunc viverra pellentesque. Aenean semper eu massa sit amet aliquam. Integer et neque sed libero mollis
elementum at vitae ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a faucibus lectus.
</p>
<p>Duis ut mauris sollicitudin, venenatis nisi sed, luctus ligula. Phasellus blandit nisl ut lorem semper
pharetra. Nullam tortor nibh, suscipit in consequat vel, feugiat sed quam. Nam risus libero, auctor vel
tristique ac, malesuada ut ante. Sed molestie, est in eleifend sagittis, leo tortor ullamcorper erat, at
vulputate eros sapien nec libero. Mauris dapibus laoreet nibh quis bibendum. Fusce dolor sem, suscipit in
iaculis id, pharetra at urna. Pellentesque tempor congue massa quis faucibus. Vestibulum nunc eros,
convallis blandit dui sit amet, gravida adipiscing libero.</p>
</div>
</div>
</div>
</div>
<div class="popup demo-popup-push">
<div class="view view-init">
<div class="page page-with-navbar-large">
<div class="navbar navbar-large navbar-transparent">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="title">Push Popup</div>
<div class="right"><a href="#" class="link popup-close">Close</a></div>
<div class="title-large">
<div class="title-large-text">Push Popup</div>
</div>
</div>
</div>
<div class="page-content">
<div class="block">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse faucibus mauris leo, eu bibendum
neque congue non. Ut leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus,
viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis dignissim. Suspendisse non nisl semper
tellus malesuada suscipit eu et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare
consequat nunc viverra pellentesque. Aenean semper eu massa sit amet aliquam. Integer et neque sed
libero mollis elementum at vitae ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a
faucibus lectus.</p>
<p>Duis ut mauris sollicitudin, venenatis nisi sed, luctus ligula. Phasellus blandit nisl ut lorem semper
pharetra. Nullam tortor nibh, suscipit in consequat vel, feugiat sed quam. Nam risus libero, auctor vel
tristique ac, malesuada ut ante. Sed molestie, est in eleifend sagittis, leo tortor ullamcorper erat, at
vulputate eros sapien nec libero. Mauris dapibus laoreet nibh quis bibendum. Fusce dolor sem, suscipit
in iaculis id, pharetra at urna. Pellentesque tempor congue massa quis faucibus. Vestibulum nunc eros,
convallis blandit dui sit amet, gravida adipiscing libero.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse faucibus mauris leo, eu bibendum
neque congue non. Ut leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus,
viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis dignissim. Suspendisse non nisl semper
tellus malesuada suscipit eu et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare
consequat nunc viverra pellentesque. Aenean semper eu massa sit amet aliquam. Integer et neque sed
libero mollis elementum at vitae ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a
faucibus lectus.</p>
</div>
</div>
</div>
</div>
</div>
<div class="popup demo-popup-swipe">
<div class="page">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="title">Swipe To Close</div>
<div class="right"><a href="#" class="link popup-close">Close</a></div>
</div>
</div>
<div class="page-content">
<div style="height: 100%" class="display-flex justify-content-center align-items-center">
<p>Swipe me up or down</p>
</div>
</div>
</div>
</div>
<div class="popup demo-popup-swipe-handler">
<div class="page">
<div class="swipe-handler"></div>
<div class="page-content">
<div class="block-title block-title-large">Hello!</div>
<div class="block block-strong">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse faucibus mauris leo, eu bibendum
neque congue non. Ut leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus,
viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis dignissim. Suspendisse non nisl semper
tellus malesuada suscipit eu et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare consequat
nunc viverra pellentesque. Aenean semper eu massa sit amet aliquam. Integer et neque sed libero mollis
elementum at vitae ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a faucibus lectus.
</p>
<p>Duis ut mauris sollicitudin, venenatis nisi sed, luctus ligula. Phasellus blandit nisl ut lorem semper
pharetra. Nullam tortor nibh, suscipit in consequat vel, feugiat sed quam. Nam risus libero, auctor vel
tristique ac, malesuada ut ante. Sed molestie, est in eleifend sagittis, leo tortor ullamcorper erat, at
vulputate eros sapien nec libero. Mauris dapibus laoreet nibh quis bibendum. Fusce dolor sem, suscipit in
iaculis id, pharetra at urna. Pellentesque tempor congue massa quis faucibus. Vestibulum nunc eros,
convallis blandit dui sit amet, gravida adipiscing libero.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse faucibus mauris leo, eu bibendum
neque congue non. Ut leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus,
viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis dignissim. Suspendisse non nisl semper
tellus malesuada suscipit eu et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare consequat
nunc viverra pellentesque. Aenean semper eu massa sit amet aliquam. Integer et neque sed libero mollis
elementum at vitae ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a faucibus lectus.
</p>
<p>Duis ut mauris sollicitudin, venenatis nisi sed, luctus ligula. Phasellus blandit nisl ut lorem semper
pharetra. Nullam tortor nibh, suscipit in consequat vel, feugiat sed quam. Nam risus libero, auctor vel
tristique ac, malesuada ut ante. Sed molestie, est in eleifend sagittis, leo tortor ullamcorper erat, at
vulputate eros sapien nec libero. Mauris dapibus laoreet nibh quis bibendum. Fusce dolor sem, suscipit in
iaculis id, pharetra at urna. Pellentesque tempor congue massa quis faucibus. Vestibulum nunc eros,
convallis blandit dui sit amet, gravida adipiscing libero.</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default (props, { $f7, $onMounted, $onBeforeUnmount }) => {
let popup;
let popupSwipe;
let popupSwipeHandler;
let popupPush;
const createPopup = () => {
// Create popup
if (!popup) {
popup = $f7.popup.create({
content: /*html*/`
<div class="popup">
<div class="page">
<div class="navbar">
<div class="navbar-bg"></div>
<div class="navbar-inner">
<div class="title">Dynamic Popup</div>
<div class="right"><a href="#" class="link popup-close">Close</a></div>
</div>
</div>
<div class="page-content">
<div class="block">
<p>This popup was created dynamically</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse faucibus mauris leo, eu bibendum neque congue non. Ut leo mauris, eleifend eu commodo a, egestas ac urna. Maecenas in lacus faucibus, viverra ipsum pulvinar, molestie arcu. Etiam lacinia venenatis dignissim. Suspendisse non nisl semper tellus malesuada suscipit eu et eros. Nulla eu enim quis quam elementum vulputate. Mauris ornare consequat nunc viverra pellentesque. Aenean semper eu massa sit amet aliquam. Integer et neque sed libero mollis elementum at vitae ligula. Vestibulum pharetra sed libero sed porttitor. Suspendisse a faucibus lectus.</p>
</div>
</div>
</div>
</div>
`
});
}
// Open it
popup.open();
}
$onMounted(() => {
popupSwipe = $f7.popup.create({
el: '.demo-popup-swipe',
swipeToClose: true,
});
popupSwipeHandler = $f7.popup.create({
el: '.demo-popup-swipe-handler',
swipeToClose: 'to-bottom',
swipeHandler: '.swipe-handler'
});
popupPush = $f7.popup.create({
el: '.demo-popup-push',
swipeToClose: true,
push: true,
});
})
$onBeforeUnmount(() => {
// Destroy popup when page removed
if (popup) popup.destroy();
if (popupSwipe) popupSwipe.destroy();
if (popupSwipeHandler) popupSwipeHandler.destroy();
if (popupPush) popupPush.destroy();
})
return $render;
}
</script>
|
framework7io/Framework7
|
kitchen-sink/core/pages/popup.html
|
HTML
|
mit
| 12,855 |
#if defined(PEGASUS_OS_HPUX)
# include "UNIX_MemoryResourcePrivate_HPUX.h"
#elif defined(PEGASUS_OS_LINUX)
# include "UNIX_MemoryResourcePrivate_LINUX.h"
#elif defined(PEGASUS_OS_DARWIN)
# include "UNIX_MemoryResourcePrivate_DARWIN.h"
#elif defined(PEGASUS_OS_AIX)
# include "UNIX_MemoryResourcePrivate_AIX.h"
#elif defined(PEGASUS_OS_FREEBSD)
# include "UNIX_MemoryResourcePrivate_FREEBSD.h"
#elif defined(PEGASUS_OS_SOLARIS)
# include "UNIX_MemoryResourcePrivate_SOLARIS.h"
#elif defined(PEGASUS_OS_ZOS)
# include "UNIX_MemoryResourcePrivate_ZOS.h"
#elif defined(PEGASUS_OS_VMS)
# include "UNIX_MemoryResourcePrivate_VMS.h"
#elif defined(PEGASUS_OS_TRU64)
# include "UNIX_MemoryResourcePrivate_TRU64.h"
#else
# include "UNIX_MemoryResourcePrivate_STUB.h"
#endif
|
brunolauze/openpegasus-providers-old
|
src/Providers/UNIXProviders/MemoryResource/UNIX_MemoryResourcePrivate.h
|
C
|
mit
| 765 |
Chip8 Rust
========
A Chip8 emulator written in Rust.

### Tested Chip8 Programs
* Pong [Paul Vervalin, 1990]
* IBM Logo
* SQRT Test [Sergey Naydenov, 2010]
* Random Number Test [Matthew Mikolay, 2010]
* Delay Timer Test [Matthew Mikolay, 2010]
* Chip8 emulator Logo [Garstyciuks]
* Minimal game [Revival Studios, 2007]
* Sierpinski [Sergey Naydenov, 2010]
* Lunar Lander [Udo Pernisz, 1979]
* Brix [Andreas Gustafsson, 1990]
* Tetris [Fran Dachille, 1991]
### Known Issues
* Flickering issues
|
mchesser/chip8_emu
|
README.md
|
Markdown
|
mit
| 534 |
using System;
using SQLite.Net.Attributes;
namespace TunnelSnakesPropertyManagement
{
public class WorkRequest
{
[PrimaryKey, AutoIncrement]
public int work_request_id { get; set; }
public int property_id { get; set; }
public int planned { get; set; }
public string cost { get; set; }
public WorkRequest ()
{
}
}
}
|
MSSE2015-TunnelSnakes/TunnelSnakesPropertyManagement
|
trunk/TunnelSnakesPropertyManagement/Models/WorkRequest.cs
|
C#
|
mit
| 340 |
/*global angular */
(function () {
'use strict';
function TabscrollTestController($timeout) {
var self = this;
self.replay = function () {
self.ready = false;
$timeout(function () {
self.ready = true;
}, 200);
};
$timeout(function () {
self.ready = true;
}, 2000);
}
TabscrollTestController.$inject = ['$timeout'];
angular.module('stache').controller('TabscrollTestController', TabscrollTestController);
}());
|
Blackbaud-LukeJones/skyux
|
js/sky/src/tabscroll/docs/demo.js
|
JavaScript
|
mit
| 539 |
// The MIT License (MIT)
// Copyright (c) 2016, Microsoft
// Permission is hereby granted, free of charge, to any person 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, sublicense, 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:
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "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. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#include <sstream>
#include "gtest/gtest.h"
#include "TermToText.h"
namespace BitFunnel
{
namespace TermToTextTest
{
// Add then verify mappings added to a TermToText.
TEST(TermToText, AddTerm)
{
TermToText terms;
Term::Hash maxHash = 100;
for (Term::Hash hash = 0; hash < maxHash; ++hash)
{
std::string text = std::to_string(hash);
terms.AddTerm(hash, text);
}
for (Term::Hash hash = 0; hash < maxHash; ++hash)
{
std::string expected = std::to_string(hash);
std::string const & observed = terms.Lookup(hash);
EXPECT_TRUE(expected.compare(observed) == 0);
}
}
// Write TermToText to stream, then construct new TermToText from
// from stream and verify contents.
TEST(TermToText, RoundTrip)
{
TermToText terms;
Term::Hash maxHash = 100;
for (Term::Hash hash = 0; hash < maxHash; ++hash)
{
std::string text = std::to_string(hash);
terms.AddTerm(hash, text);
}
std::stringstream stream;
terms.Write(stream);
TermToText terms2(stream);
for (Term::Hash hash = 0; hash < maxHash; ++hash)
{
std::string expected = std::to_string(hash);
std::string const & observed = terms2.Lookup(hash);
EXPECT_TRUE(expected.compare(observed) == 0);
}
}
}
}
|
BitFunnel/BitFunnel
|
src/Index/test/TermToTextTest.cpp
|
C++
|
mit
| 2,748 |
// we need at least compile scala compilation
// unit to generate the classes dir under target
object App
|
softprops/less-sbt
|
src/sbt-test/less-sbt/custom-target/src/main/scala/app.scala
|
Scala
|
mit
| 106 |
'use strict';
var React = require('react');
var StylePropable = require('../mixins/style-propable');
var Transitions = require('../styles/transitions');
var Colors = require('../styles/colors');
var AutoPrefix = require('../styles/auto-prefix');
var pulsateDuration = 750;
var FocusRipple = React.createClass({
displayName: 'FocusRipple',
mixins: [StylePropable],
propTypes: {
color: React.PropTypes.string,
opacity: React.PropTypes.number,
show: React.PropTypes.bool,
innerStyle: React.PropTypes.object
},
getDefaultProps: function getDefaultProps() {
return {
color: Colors.darkBlack
};
},
componentDidMount: function componentDidMount() {
this._setRippleSize();
this._pulsate();
},
render: function render() {
var outerStyles = this.mergeAndPrefix({
height: '100%',
width: '100%',
position: 'absolute',
top: 0,
left: 0,
transition: Transitions.easeOut(null, ['transform', 'opacity']),
transform: this.props.show ? 'scale(1)' : 'scale(0)',
opacity: this.props.show ? 1 : 0,
overflow: 'hidden'
}, this.props.style);
var innerStyles = this.mergeAndPrefix({
position: 'absolute',
height: '100%',
width: '100%',
borderRadius: '50%',
opacity: this.props.opacity ? this.props.opacity : 0.16,
backgroundColor: this.props.color,
transition: Transitions.easeOut(pulsateDuration + 'ms', 'transform', null, Transitions.easeInOutFunction)
}, this.props.innerStyle);
return React.createElement(
'div',
{ style: outerStyles },
React.createElement('div', { ref: 'innerCircle', style: innerStyles })
);
},
_pulsate: function _pulsate() {
if (!this.isMounted()) return;
var startScale = 'scale(0.75)';
var endScale = 'scale(0.85)';
var innerCircle = React.findDOMNode(this.refs.innerCircle);
var currentScale = innerCircle.style[AutoPrefix.single('transform')];
var nextScale = undefined;
currentScale = currentScale || startScale;
nextScale = currentScale === startScale ? endScale : startScale;
innerCircle.style[AutoPrefix.single('transform')] = nextScale;
setTimeout(this._pulsate, pulsateDuration);
},
_setRippleSize: function _setRippleSize() {
var el = React.findDOMNode(this.refs.innerCircle);
var height = el.offsetHeight;
var width = el.offsetWidth;
var size = Math.max(height, width);
el.style.height = size + 'px';
el.style.top = size / 2 * -1 + height / 2 + 'px';
}
});
module.exports = FocusRipple;
|
checkraiser/material-ui2
|
lib/ripples/focus-ripple.js
|
JavaScript
|
mit
| 2,583 |
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8">
</head>
<body>
<h2>Congratulations Dear User!</h2>
<div>
You now have an account on our platfor <b>IMS Soft</b>, Your account has been
created and now you can login and use the platform for your inventory management.
Thanks for trusting and using IMS Soft400. <br />
[no-reply]
</div>
</body>
</html>
|
Roc4rdho/IMS_Soft400
|
app/views/mails/verify_account.blade.php
|
PHP
|
mit
| 489 |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Creature()
result.template = "object/mobile/shared_dressed_blood_razor_pirate_scout_hum_m.iff"
result.attribute_template_id = 9
result.stfName("npc_name","human_base_male")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result
|
anhstudios/swganh
|
data/scripts/templates/object/mobile/shared_dressed_blood_razor_pirate_scout_hum_m.py
|
Python
|
mit
| 463 |
<?php
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Framework\App\Test\Unit\PageCache;
use \Magento\Framework\App\PageCache\Kernel;
class KernelTest extends \PHPUnit_Framework_TestCase
{
/** @var Kernel */
protected $kernel;
/** @var \Magento\Framework\App\PageCache\Cache|\PHPUnit_Framework_MockObject_MockObject */
protected $cacheMock;
/** @var \Magento\Framework\App\PageCache\Identifier|\PHPUnit_Framework_MockObject_MockObject */
protected $identifierMock;
/** @var \Magento\Framework\App\Request\Http|\PHPUnit_Framework_MockObject_MockObject */
protected $requestMock;
/** @var \Magento\Framework\App\Response\Http|\PHPUnit_Framework_MockObject_MockObject */
protected $responseMock;
/** @var \PHPUnit_Framework_MockObject_MockObject|\Magento\PageCache\Model\Cache\Type */
private $fullPageCacheMock;
/**
* Setup
*/
protected function setUp()
{
$this->cacheMock = $this->getMock('Magento\Framework\App\PageCache\Cache', [], [], '', false);
$this->fullPageCacheMock = $this->getMock('\Magento\PageCache\Model\Cache\Type', [], [], '', false);
$this->identifierMock =
$this->getMock('Magento\Framework\App\PageCache\Identifier', [], [], '', false);
$this->requestMock = $this->getMock('Magento\Framework\App\Request\Http', [], [], '', false);
$this->kernel = new Kernel($this->cacheMock, $this->identifierMock, $this->requestMock);
$reflection = new \ReflectionClass('\Magento\Framework\App\PageCache\Kernel');
$reflectionProperty = $reflection->getProperty('fullPageCache');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue($this->kernel, $this->fullPageCacheMock);
$this->responseMock = $this->getMockBuilder(
'Magento\Framework\App\Response\Http'
)->setMethods(
['getHeader', 'getHttpResponseCode', 'setNoCacheHeaders', 'clearHeader', '__wakeup']
)->disableOriginalConstructor()->getMock();
}
/**
* @dataProvider loadProvider
* @param mixed $expected
* @param string $id
* @param mixed $cache
* @param bool $isGet
* @param bool $isHead
*/
public function testLoad($expected, $id, $cache, $isGet, $isHead)
{
$this->requestMock->expects($this->once())->method('isGet')->will($this->returnValue($isGet));
$this->requestMock->expects($this->any())->method('isHead')->will($this->returnValue($isHead));
$this->fullPageCacheMock->expects(
$this->any()
)->method(
'load'
)->with(
$this->equalTo($id)
)->will(
$this->returnValue(serialize($cache))
);
$this->identifierMock->expects($this->any())->method('getValue')->will($this->returnValue($id));
$this->assertEquals($expected, $this->kernel->load());
}
/**
* @return array
*/
public function loadProvider()
{
$data = [1, 2, 3];
return [
[$data, 'existing key', $data, true, false],
[$data, 'existing key', $data, false, true],
[
new \Magento\Framework\DataObject($data),
'existing key',
new \Magento\Framework\DataObject($data),
true,
false
],
[false, 'existing key', $data, false, false],
[false, 'non existing key', false, true, false],
[false, 'non existing key', false, false, false]
];
}
/**
* @param $httpCode
* @dataProvider testProcessSaveCacheDataProvider
*/
public function testProcessSaveCache($httpCode, $at)
{
$cacheControlHeader = \Zend\Http\Header\CacheControl::fromString(
'Cache-Control: public, max-age=100, s-maxage=100'
);
$this->responseMock->expects(
$this->at(0)
)->method(
'getHeader'
)->with(
'Cache-Control'
)->will(
$this->returnValue($cacheControlHeader)
);
$this->responseMock->expects(
$this->any()
)->method(
'getHttpResponseCode'
)->willReturn($httpCode);
$this->requestMock->expects($this->once())
->method('isGet')
->willReturn(true);
$this->responseMock->expects($this->once())
->method('setNoCacheHeaders');
$this->responseMock->expects($this->at($at[0]))
->method('getHeader')
->with('X-Magento-Tags');
$this->responseMock->expects($this->at($at[1]))
->method('clearHeader')
->with($this->equalTo('Set-Cookie'));
$this->responseMock->expects($this->at($at[2]))
->method('clearHeader')
->with($this->equalTo('X-Magento-Tags'));
$this->fullPageCacheMock->expects($this->once())
->method('save');
$this->kernel->process($this->responseMock);
}
public function testProcessSaveCacheDataProvider()
{
return [
[200, [3, 4, 5]],
[404, [4, 5, 6]]
];
}
/**
* @dataProvider processNotSaveCacheProvider
* @param string $cacheControlHeader
* @param int $httpCode
* @param bool $isGet
* @param bool $overrideHeaders
*/
public function testProcessNotSaveCache($cacheControlHeader, $httpCode, $isGet, $overrideHeaders)
{
$header = \Zend\Http\Header\CacheControl::fromString("Cache-Control: $cacheControlHeader");
$this->responseMock->expects(
$this->once()
)->method(
'getHeader'
)->with(
'Cache-Control'
)->will(
$this->returnValue($header)
);
$this->responseMock->expects($this->any())->method('getHttpResponseCode')->will($this->returnValue($httpCode));
$this->requestMock->expects($this->any())->method('isGet')->will($this->returnValue($isGet));
if ($overrideHeaders) {
$this->responseMock->expects($this->once())->method('setNoCacheHeaders');
}
$this->fullPageCacheMock->expects($this->never())->method('save');
$this->kernel->process($this->responseMock);
}
/**
* @return array
*/
public function processNotSaveCacheProvider()
{
return [
['private, max-age=100', 200, true, false],
['private, max-age=100', 200, false, false],
['private, max-age=100', 500, true, false],
['no-store, no-cache, must-revalidate, max-age=0', 200, true, false],
['no-store, no-cache, must-revalidate, max-age=0', 200, false, false],
['no-store, no-cache, must-revalidate, max-age=0', 404, true, false],
['no-store, no-cache, must-revalidate, max-age=0', 500, true, false],
['public, max-age=100, s-maxage=100', 500, true, true],
['public, max-age=100, s-maxage=100', 200, false, true]
];
}
}
|
j-froehlich/magento2_wk
|
vendor/magento/framework/App/Test/Unit/PageCache/KernelTest.php
|
PHP
|
mit
| 7,138 |
---
layout: master
include: person
name: Anders Sparre Conrad
home: <a href="http://www.ku.dk/">Det Kgl. Bibliotek</a>
country: DK
photo:
email: [email protected]
phone:
on_contract:
has_been_on_contract: no
groups:
data-management-wg:
finished: yes
---
|
neicnordic/experimental.neic.nordforsk.org
|
_people/anders-sparre-conrad.md
|
Markdown
|
mit
| 252 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: metrics.proto
package io_prometheus_client
import proto "gx/ipfs/QmZHU2gx42NPTYXzw6pJkuX6xCE7bKECp6e8QcPdoLx8sx/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type MetricType int32
const (
MetricType_COUNTER MetricType = 0
MetricType_GAUGE MetricType = 1
MetricType_SUMMARY MetricType = 2
MetricType_UNTYPED MetricType = 3
MetricType_HISTOGRAM MetricType = 4
)
var MetricType_name = map[int32]string{
0: "COUNTER",
1: "GAUGE",
2: "SUMMARY",
3: "UNTYPED",
4: "HISTOGRAM",
}
var MetricType_value = map[string]int32{
"COUNTER": 0,
"GAUGE": 1,
"SUMMARY": 2,
"UNTYPED": 3,
"HISTOGRAM": 4,
}
func (x MetricType) Enum() *MetricType {
p := new(MetricType)
*p = x
return p
}
func (x MetricType) String() string {
return proto.EnumName(MetricType_name, int32(x))
}
func (x *MetricType) UnmarshalJSON(data []byte) error {
value, err := proto.UnmarshalJSONEnum(MetricType_value, data, "MetricType")
if err != nil {
return err
}
*x = MetricType(value)
return nil
}
func (MetricType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{0}
}
type LabelPair struct {
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LabelPair) Reset() { *m = LabelPair{} }
func (m *LabelPair) String() string { return proto.CompactTextString(m) }
func (*LabelPair) ProtoMessage() {}
func (*LabelPair) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{0}
}
func (m *LabelPair) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LabelPair.Unmarshal(m, b)
}
func (m *LabelPair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LabelPair.Marshal(b, m, deterministic)
}
func (dst *LabelPair) XXX_Merge(src proto.Message) {
xxx_messageInfo_LabelPair.Merge(dst, src)
}
func (m *LabelPair) XXX_Size() int {
return xxx_messageInfo_LabelPair.Size(m)
}
func (m *LabelPair) XXX_DiscardUnknown() {
xxx_messageInfo_LabelPair.DiscardUnknown(m)
}
var xxx_messageInfo_LabelPair proto.InternalMessageInfo
func (m *LabelPair) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *LabelPair) GetValue() string {
if m != nil && m.Value != nil {
return *m.Value
}
return ""
}
type Gauge struct {
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Gauge) Reset() { *m = Gauge{} }
func (m *Gauge) String() string { return proto.CompactTextString(m) }
func (*Gauge) ProtoMessage() {}
func (*Gauge) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{1}
}
func (m *Gauge) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Gauge.Unmarshal(m, b)
}
func (m *Gauge) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Gauge.Marshal(b, m, deterministic)
}
func (dst *Gauge) XXX_Merge(src proto.Message) {
xxx_messageInfo_Gauge.Merge(dst, src)
}
func (m *Gauge) XXX_Size() int {
return xxx_messageInfo_Gauge.Size(m)
}
func (m *Gauge) XXX_DiscardUnknown() {
xxx_messageInfo_Gauge.DiscardUnknown(m)
}
var xxx_messageInfo_Gauge proto.InternalMessageInfo
func (m *Gauge) GetValue() float64 {
if m != nil && m.Value != nil {
return *m.Value
}
return 0
}
type Counter struct {
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Counter) Reset() { *m = Counter{} }
func (m *Counter) String() string { return proto.CompactTextString(m) }
func (*Counter) ProtoMessage() {}
func (*Counter) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{2}
}
func (m *Counter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Counter.Unmarshal(m, b)
}
func (m *Counter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Counter.Marshal(b, m, deterministic)
}
func (dst *Counter) XXX_Merge(src proto.Message) {
xxx_messageInfo_Counter.Merge(dst, src)
}
func (m *Counter) XXX_Size() int {
return xxx_messageInfo_Counter.Size(m)
}
func (m *Counter) XXX_DiscardUnknown() {
xxx_messageInfo_Counter.DiscardUnknown(m)
}
var xxx_messageInfo_Counter proto.InternalMessageInfo
func (m *Counter) GetValue() float64 {
if m != nil && m.Value != nil {
return *m.Value
}
return 0
}
type Quantile struct {
Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"`
Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Quantile) Reset() { *m = Quantile{} }
func (m *Quantile) String() string { return proto.CompactTextString(m) }
func (*Quantile) ProtoMessage() {}
func (*Quantile) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{3}
}
func (m *Quantile) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Quantile.Unmarshal(m, b)
}
func (m *Quantile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Quantile.Marshal(b, m, deterministic)
}
func (dst *Quantile) XXX_Merge(src proto.Message) {
xxx_messageInfo_Quantile.Merge(dst, src)
}
func (m *Quantile) XXX_Size() int {
return xxx_messageInfo_Quantile.Size(m)
}
func (m *Quantile) XXX_DiscardUnknown() {
xxx_messageInfo_Quantile.DiscardUnknown(m)
}
var xxx_messageInfo_Quantile proto.InternalMessageInfo
func (m *Quantile) GetQuantile() float64 {
if m != nil && m.Quantile != nil {
return *m.Quantile
}
return 0
}
func (m *Quantile) GetValue() float64 {
if m != nil && m.Value != nil {
return *m.Value
}
return 0
}
type Summary struct {
SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"`
SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"`
Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Summary) Reset() { *m = Summary{} }
func (m *Summary) String() string { return proto.CompactTextString(m) }
func (*Summary) ProtoMessage() {}
func (*Summary) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{4}
}
func (m *Summary) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Summary.Unmarshal(m, b)
}
func (m *Summary) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Summary.Marshal(b, m, deterministic)
}
func (dst *Summary) XXX_Merge(src proto.Message) {
xxx_messageInfo_Summary.Merge(dst, src)
}
func (m *Summary) XXX_Size() int {
return xxx_messageInfo_Summary.Size(m)
}
func (m *Summary) XXX_DiscardUnknown() {
xxx_messageInfo_Summary.DiscardUnknown(m)
}
var xxx_messageInfo_Summary proto.InternalMessageInfo
func (m *Summary) GetSampleCount() uint64 {
if m != nil && m.SampleCount != nil {
return *m.SampleCount
}
return 0
}
func (m *Summary) GetSampleSum() float64 {
if m != nil && m.SampleSum != nil {
return *m.SampleSum
}
return 0
}
func (m *Summary) GetQuantile() []*Quantile {
if m != nil {
return m.Quantile
}
return nil
}
type Untyped struct {
Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Untyped) Reset() { *m = Untyped{} }
func (m *Untyped) String() string { return proto.CompactTextString(m) }
func (*Untyped) ProtoMessage() {}
func (*Untyped) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{5}
}
func (m *Untyped) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Untyped.Unmarshal(m, b)
}
func (m *Untyped) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Untyped.Marshal(b, m, deterministic)
}
func (dst *Untyped) XXX_Merge(src proto.Message) {
xxx_messageInfo_Untyped.Merge(dst, src)
}
func (m *Untyped) XXX_Size() int {
return xxx_messageInfo_Untyped.Size(m)
}
func (m *Untyped) XXX_DiscardUnknown() {
xxx_messageInfo_Untyped.DiscardUnknown(m)
}
var xxx_messageInfo_Untyped proto.InternalMessageInfo
func (m *Untyped) GetValue() float64 {
if m != nil && m.Value != nil {
return *m.Value
}
return 0
}
type Histogram struct {
SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"`
SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"`
Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Histogram) Reset() { *m = Histogram{} }
func (m *Histogram) String() string { return proto.CompactTextString(m) }
func (*Histogram) ProtoMessage() {}
func (*Histogram) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{6}
}
func (m *Histogram) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Histogram.Unmarshal(m, b)
}
func (m *Histogram) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Histogram.Marshal(b, m, deterministic)
}
func (dst *Histogram) XXX_Merge(src proto.Message) {
xxx_messageInfo_Histogram.Merge(dst, src)
}
func (m *Histogram) XXX_Size() int {
return xxx_messageInfo_Histogram.Size(m)
}
func (m *Histogram) XXX_DiscardUnknown() {
xxx_messageInfo_Histogram.DiscardUnknown(m)
}
var xxx_messageInfo_Histogram proto.InternalMessageInfo
func (m *Histogram) GetSampleCount() uint64 {
if m != nil && m.SampleCount != nil {
return *m.SampleCount
}
return 0
}
func (m *Histogram) GetSampleSum() float64 {
if m != nil && m.SampleSum != nil {
return *m.SampleSum
}
return 0
}
func (m *Histogram) GetBucket() []*Bucket {
if m != nil {
return m.Bucket
}
return nil
}
type Bucket struct {
CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"`
UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Bucket) Reset() { *m = Bucket{} }
func (m *Bucket) String() string { return proto.CompactTextString(m) }
func (*Bucket) ProtoMessage() {}
func (*Bucket) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{7}
}
func (m *Bucket) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Bucket.Unmarshal(m, b)
}
func (m *Bucket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Bucket.Marshal(b, m, deterministic)
}
func (dst *Bucket) XXX_Merge(src proto.Message) {
xxx_messageInfo_Bucket.Merge(dst, src)
}
func (m *Bucket) XXX_Size() int {
return xxx_messageInfo_Bucket.Size(m)
}
func (m *Bucket) XXX_DiscardUnknown() {
xxx_messageInfo_Bucket.DiscardUnknown(m)
}
var xxx_messageInfo_Bucket proto.InternalMessageInfo
func (m *Bucket) GetCumulativeCount() uint64 {
if m != nil && m.CumulativeCount != nil {
return *m.CumulativeCount
}
return 0
}
func (m *Bucket) GetUpperBound() float64 {
if m != nil && m.UpperBound != nil {
return *m.UpperBound
}
return 0
}
type Metric struct {
Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"`
Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"`
Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"`
Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"`
Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"`
Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"`
TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Metric) Reset() { *m = Metric{} }
func (m *Metric) String() string { return proto.CompactTextString(m) }
func (*Metric) ProtoMessage() {}
func (*Metric) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{8}
}
func (m *Metric) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Metric.Unmarshal(m, b)
}
func (m *Metric) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Metric.Marshal(b, m, deterministic)
}
func (dst *Metric) XXX_Merge(src proto.Message) {
xxx_messageInfo_Metric.Merge(dst, src)
}
func (m *Metric) XXX_Size() int {
return xxx_messageInfo_Metric.Size(m)
}
func (m *Metric) XXX_DiscardUnknown() {
xxx_messageInfo_Metric.DiscardUnknown(m)
}
var xxx_messageInfo_Metric proto.InternalMessageInfo
func (m *Metric) GetLabel() []*LabelPair {
if m != nil {
return m.Label
}
return nil
}
func (m *Metric) GetGauge() *Gauge {
if m != nil {
return m.Gauge
}
return nil
}
func (m *Metric) GetCounter() *Counter {
if m != nil {
return m.Counter
}
return nil
}
func (m *Metric) GetSummary() *Summary {
if m != nil {
return m.Summary
}
return nil
}
func (m *Metric) GetUntyped() *Untyped {
if m != nil {
return m.Untyped
}
return nil
}
func (m *Metric) GetHistogram() *Histogram {
if m != nil {
return m.Histogram
}
return nil
}
func (m *Metric) GetTimestampMs() int64 {
if m != nil && m.TimestampMs != nil {
return *m.TimestampMs
}
return 0
}
type MetricFamily struct {
Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"`
Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"`
Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MetricFamily) Reset() { *m = MetricFamily{} }
func (m *MetricFamily) String() string { return proto.CompactTextString(m) }
func (*MetricFamily) ProtoMessage() {}
func (*MetricFamily) Descriptor() ([]byte, []int) {
return fileDescriptor_metrics_c97c9a2b9560cb8f, []int{9}
}
func (m *MetricFamily) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MetricFamily.Unmarshal(m, b)
}
func (m *MetricFamily) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MetricFamily.Marshal(b, m, deterministic)
}
func (dst *MetricFamily) XXX_Merge(src proto.Message) {
xxx_messageInfo_MetricFamily.Merge(dst, src)
}
func (m *MetricFamily) XXX_Size() int {
return xxx_messageInfo_MetricFamily.Size(m)
}
func (m *MetricFamily) XXX_DiscardUnknown() {
xxx_messageInfo_MetricFamily.DiscardUnknown(m)
}
var xxx_messageInfo_MetricFamily proto.InternalMessageInfo
func (m *MetricFamily) GetName() string {
if m != nil && m.Name != nil {
return *m.Name
}
return ""
}
func (m *MetricFamily) GetHelp() string {
if m != nil && m.Help != nil {
return *m.Help
}
return ""
}
func (m *MetricFamily) GetType() MetricType {
if m != nil && m.Type != nil {
return *m.Type
}
return MetricType_COUNTER
}
func (m *MetricFamily) GetMetric() []*Metric {
if m != nil {
return m.Metric
}
return nil
}
func init() {
proto.RegisterType((*LabelPair)(nil), "io.prometheus.client.LabelPair")
proto.RegisterType((*Gauge)(nil), "io.prometheus.client.Gauge")
proto.RegisterType((*Counter)(nil), "io.prometheus.client.Counter")
proto.RegisterType((*Quantile)(nil), "io.prometheus.client.Quantile")
proto.RegisterType((*Summary)(nil), "io.prometheus.client.Summary")
proto.RegisterType((*Untyped)(nil), "io.prometheus.client.Untyped")
proto.RegisterType((*Histogram)(nil), "io.prometheus.client.Histogram")
proto.RegisterType((*Bucket)(nil), "io.prometheus.client.Bucket")
proto.RegisterType((*Metric)(nil), "io.prometheus.client.Metric")
proto.RegisterType((*MetricFamily)(nil), "io.prometheus.client.MetricFamily")
proto.RegisterEnum("io.prometheus.client.MetricType", MetricType_name, MetricType_value)
}
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_metrics_c97c9a2b9560cb8f) }
var fileDescriptor_metrics_c97c9a2b9560cb8f = []byte{
// 591 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0xdb, 0x4e,
0x14, 0xfc, 0x99, 0xd8, 0x09, 0x7e, 0x86, 0x5f, 0xad, 0x15, 0x07, 0xab, 0x2d, 0x25, 0xcd, 0x89,
0xf6, 0x10, 0x54, 0x04, 0xaa, 0x44, 0xdb, 0x03, 0x50, 0x1a, 0x2a, 0xd5, 0x40, 0x37, 0xc9, 0x81,
0x5e, 0xac, 0x8d, 0x59, 0x25, 0x56, 0xbd, 0xb6, 0x6b, 0xef, 0x22, 0xe5, 0xdc, 0x43, 0xbf, 0x47,
0xbf, 0x68, 0xab, 0xfd, 0xe3, 0x18, 0x24, 0xc3, 0xa9, 0xb7, 0xb7, 0xf3, 0x66, 0xde, 0x8e, 0x77,
0xc7, 0x0b, 0x9b, 0x8c, 0xf2, 0x32, 0x89, 0xab, 0x61, 0x51, 0xe6, 0x3c, 0x47, 0x5b, 0x49, 0x2e,
0x2b, 0x46, 0xf9, 0x82, 0x8a, 0x6a, 0x18, 0xa7, 0x09, 0xcd, 0xf8, 0xe0, 0x10, 0xdc, 0x2f, 0x64,
0x46, 0xd3, 0x2b, 0x92, 0x94, 0x08, 0x81, 0x9d, 0x11, 0x46, 0x03, 0xab, 0x6f, 0xed, 0xba, 0x58,
0xd5, 0x68, 0x0b, 0x9c, 0x5b, 0x92, 0x0a, 0x1a, 0xac, 0x29, 0x50, 0x2f, 0x06, 0xdb, 0xe0, 0x8c,
0x88, 0x98, 0xdf, 0x69, 0x4b, 0x8d, 0x55, 0xb7, 0x77, 0xa0, 0x77, 0x9a, 0x8b, 0x8c, 0xd3, 0xf2,
0x01, 0xc2, 0x7b, 0x58, 0xff, 0x2a, 0x48, 0xc6, 0x93, 0x94, 0xa2, 0xa7, 0xb0, 0xfe, 0xc3, 0xd4,
0x86, 0xb4, 0x5a, 0xdf, 0xdf, 0x7d, 0xa5, 0xfe, 0x65, 0x41, 0x6f, 0x2c, 0x18, 0x23, 0xe5, 0x12,
0xbd, 0x84, 0x8d, 0x8a, 0xb0, 0x22, 0xa5, 0x51, 0x2c, 0x77, 0x54, 0x13, 0x6c, 0xec, 0x69, 0x4c,
0x99, 0x40, 0xdb, 0x00, 0x86, 0x52, 0x09, 0x66, 0x26, 0xb9, 0x1a, 0x19, 0x0b, 0x86, 0x8e, 0xee,
0xec, 0xdf, 0xe9, 0x77, 0x76, 0xbd, 0xfd, 0x17, 0xc3, 0xb6, 0xb3, 0x1a, 0xd6, 0x8e, 0x1b, 0x7f,
0xf2, 0x43, 0xa7, 0x19, 0x5f, 0x16, 0xf4, 0xe6, 0x81, 0x0f, 0xfd, 0x69, 0x81, 0x7b, 0x9e, 0x54,
0x3c, 0x9f, 0x97, 0x84, 0xfd, 0x03, 0xb3, 0x07, 0xd0, 0x9d, 0x89, 0xf8, 0x3b, 0xe5, 0xc6, 0xea,
0xf3, 0x76, 0xab, 0x27, 0x8a, 0x83, 0x0d, 0x77, 0x30, 0x81, 0xae, 0x46, 0xd0, 0x2b, 0xf0, 0x63,
0xc1, 0x44, 0x4a, 0x78, 0x72, 0x7b, 0xdf, 0xc5, 0x93, 0x06, 0xd7, 0x4e, 0x76, 0xc0, 0x13, 0x45,
0x41, 0xcb, 0x68, 0x96, 0x8b, 0xec, 0xc6, 0x58, 0x01, 0x05, 0x9d, 0x48, 0x64, 0xf0, 0x67, 0x0d,
0xba, 0xa1, 0xca, 0x18, 0x3a, 0x04, 0x27, 0x95, 0x31, 0x0a, 0x2c, 0xe5, 0x6a, 0xa7, 0xdd, 0xd5,
0x2a, 0x69, 0x58, 0xb3, 0xd1, 0x1b, 0x70, 0xe6, 0x32, 0x46, 0x6a, 0xb8, 0xb7, 0xff, 0xac, 0x5d,
0xa6, 0x92, 0x86, 0x35, 0x13, 0xbd, 0x85, 0x5e, 0xac, 0xa3, 0x15, 0x74, 0x94, 0x68, 0xbb, 0x5d,
0x64, 0xf2, 0x87, 0x6b, 0xb6, 0x14, 0x56, 0x3a, 0x33, 0x81, 0xfd, 0x98, 0xd0, 0x04, 0x0b, 0xd7,
0x6c, 0x29, 0x14, 0xfa, 0x8e, 0x03, 0xe7, 0x31, 0xa1, 0x09, 0x02, 0xae, 0xd9, 0xe8, 0x03, 0xb8,
0x8b, 0xfa, 0xea, 0x83, 0x9e, 0x92, 0x3e, 0x70, 0x30, 0xab, 0x84, 0xe0, 0x46, 0x21, 0xc3, 0xc2,
0x13, 0x46, 0x2b, 0x4e, 0x58, 0x11, 0xb1, 0x2a, 0xe8, 0xf6, 0xad, 0xdd, 0x0e, 0xf6, 0x56, 0x58,
0x58, 0x0d, 0x7e, 0x5b, 0xb0, 0xa1, 0x6f, 0xe0, 0x13, 0x61, 0x49, 0xba, 0x6c, 0xfd, 0x83, 0x11,
0xd8, 0x0b, 0x9a, 0x16, 0xe6, 0x07, 0x56, 0x35, 0x3a, 0x00, 0x5b, 0x7a, 0x54, 0x47, 0xf8, 0xff,
0x7e, 0xbf, 0xdd, 0x95, 0x9e, 0x3c, 0x59, 0x16, 0x14, 0x2b, 0xb6, 0x0c, 0x9f, 0x7e, 0x53, 0x02,
0xfb, 0xb1, 0xf0, 0x69, 0x1d, 0x36, 0xdc, 0xd7, 0x21, 0x40, 0x33, 0x09, 0x79, 0xd0, 0x3b, 0xbd,
0x9c, 0x5e, 0x4c, 0xce, 0xb0, 0xff, 0x1f, 0x72, 0xc1, 0x19, 0x1d, 0x4f, 0x47, 0x67, 0xbe, 0x25,
0xf1, 0xf1, 0x34, 0x0c, 0x8f, 0xf1, 0xb5, 0xbf, 0x26, 0x17, 0xd3, 0x8b, 0xc9, 0xf5, 0xd5, 0xd9,
0x47, 0xbf, 0x83, 0x36, 0xc1, 0x3d, 0xff, 0x3c, 0x9e, 0x5c, 0x8e, 0xf0, 0x71, 0xe8, 0xdb, 0x27,
0x18, 0x5a, 0x5f, 0xb2, 0x6f, 0x47, 0xf3, 0x84, 0x2f, 0xc4, 0x6c, 0x18, 0xe7, 0x6c, 0xaf, 0xe9,
0xee, 0xe9, 0x6e, 0xc4, 0xf2, 0x1b, 0x9a, 0xee, 0xcd, 0xf3, 0x77, 0x49, 0x1e, 0x35, 0xdd, 0x48,
0x77, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x45, 0x21, 0x7f, 0x64, 0x2b, 0x05, 0x00, 0x00,
}
|
OpenBazaar/openbazaar-go
|
vendor/gx/ipfs/QmYaVovLzgcdBpCLEAnW41p8ujvCUxe3TFpfJxjK5qbzn7/client_model/go/metrics.pb.go
|
GO
|
mit
| 21,598 |
read = input
n, k = map(int, read().split())
s = read()
k -= 1
s= s[:k] + str.lower(s[k]) + s[k+1:]
print(s)
|
xsthunder/a
|
at/abc126/a.py
|
Python
|
mit
| 109 |
#### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/ship/attachment/engine/shared_blacksun_light_engine_s02.iff"
result.attribute_template_id = 8
result.stfName("item_n","ship_attachment")
#### BEGIN MODIFICATIONS ####
#### END MODIFICATIONS ####
return result
|
obi-two/Rebelion
|
data/scripts/templates/object/tangible/ship/attachment/engine/shared_blacksun_light_engine_s02.py
|
Python
|
mit
| 473 |
<a name="v0.2.0"></a>
## v0.2.0 (2013-11-12)
#### Features
* **GruntFile:** add concated and uglified version ([cb8aab2d](https://github.com/angular-adaptive/adaptive-scroll/commit/cb8aab2d6a38c6f8464b56264e313cf368120295))
* **conventional-changelog:** adds grunt-conventional-changelog support ([f11e9a41](https://github.com/angular-adaptive/adaptive-scroll/commit/f11e9a410ed49d3c728cbe2d9cd1f8e43771bdf4))
#### Breaking Changes
* src/adaptive-scroll.js is now renamed into src/angular-adaptive-scroll.js
([cb8aab2d](https://github.com/angular-adaptive/adaptive-scroll/commit/cb8aab2d6a38c6f8464b56264e313cf368120295))
|
janantala/angular-adaptive-scroll
|
CHANGELOG.md
|
Markdown
|
mit
| 630 |
// Copyright (c) 2019 The PIVX developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef ADDRESSLABELROW_H
#define ADDRESSLABELROW_H
#include <QWidget>
namespace Ui {
class AddressLabelRow;
}
class AddressLabelRow : public QWidget
{
Q_OBJECT
public:
explicit AddressLabelRow(QWidget *parent = nullptr);
~AddressLabelRow();
void init(bool isLightTheme, bool isHover);
void updateState(bool isLightTheme, bool isHovered, bool isSelected);
void updateView(const QString& address, const QString& label);
protected:
virtual void enterEvent(QEvent *);
virtual void leaveEvent(QEvent *);
private:
Ui::AddressLabelRow *ui;
};
#endif // ADDRESSLABELROW_H
|
Darknet-Crypto/Darknet
|
src/qt/pivx/addresslabelrow.h
|
C
|
mit
| 791 |
/**
* @copyright
* Copyright (c) 2017 Stanislav Ivochkin
* Licensed under the MIT License (see LICENSE)
*/
#pragma once
#include <dfk/context.h>
int dfk__close(dfk_t* dfk, void* dfkhandle, int sock);
|
ivochkin/dfk
|
src/include/dfk/close.h
|
C
|
mit
| 207 |
package Test::Unit::TestCase;
use strict;
use base qw(Test::Unit::Test);
use Test::Unit::Debug qw(debug);
use Test::Unit::Failure;
use Test::Unit::Error;
use Test::Unit::Result;
use Devel::Symdump;
use Class::Inner;
use Error qw/:try/;
sub new {
my $class = shift;
my ($name) = @_;
bless {
__PACKAGE__ . '_name' => $name,
__PACKAGE__ . '_annotations' => '',
}, $class;
}
sub annotate {
my $self = shift;
$self->{__PACKAGE__ . '_annotations'} .= join '', @_;
}
sub annotations { $_[0]->{__PACKAGE__ . '_annotations'} }
sub count_test_cases {
my $self = shift;
return 1;
}
sub create_result {
my $self = shift;
return Test::Unit::Result->new();
}
sub name {
my $self = shift;
return $self->{__PACKAGE__ . '_name'};
}
sub run {
my $self = shift;
debug(ref($self), "::run() called on ", $self->name, "\n");
my ($result, $runner) = @_;
$result ||= create_result();
$result->run($self);
return $result;
}
sub run_bare {
my $self = shift;
debug(" ", ref($self), "::run_bare() called on ", $self->name, "\n");
$self->set_up();
# Make sure tear_down happens if and only if set_up() succeeds.
try {
$self->run_test();
1;
}
finally {
$self->tear_down;
};
}
sub run_test {
my $self = shift;
debug(" ", ref($self) . "::run_test() called on ", $self->name, "\n");
my $method = $self->name();
if ($self->can($method)) {
debug(" running `$method'\n");
$self->$method();
} else {
$self->fail(" Method `$method' not found");
}
}
sub set_up { 1 }
sub tear_down { 1 }
sub to_string {
my $self = shift;
my $class = ref($self);
return ($self->name() || "ANON") . "(" . $class . ")";
}
sub make_test_from_coderef {
my ($self, $coderef, @args) = @_;
die "Need a coderef argument" unless $coderef;
return Class::Inner->new(parent => ($self || ref $self),
methods => {run_test => $coderef},
args => [ @args ]);
}
# Returns a list of the tests run by this class and its superclasses.
# DO NOT OVERRIDE THIS UNLESS YOU KNOW WHAT YOU ARE DOING!
sub list_tests {
my $class = ref($_[0]) || $_[0];
my @tests = ();
no strict 'refs';
if (defined(@{"$class\::TESTS"})) {
push @tests, @{"$class\::TESTS"};
}
else {
push @tests, $class->get_matching_methods(qr/::(test[^:]*)$/);
}
push @tests, map {$_->can('list_tests') ? $_->list_tests : () } @{"$class\::ISA"};
my %tests = map {$_ => ''} @tests;
return keys %tests;
}
sub get_matching_methods {
my $class = ref($_[0]) || $_[0];
my $re = $_[1];
my $st = Devel::Symdump->new($class);
return map { /$re/ ? $1 : () } $st->functions();
}
sub list {
my $self = shift;
my $show_testcases = shift;
return $show_testcases ?
[ ($self->name() || 'anonymous testcase') . "\n" ]
: [];
}
1;
__END__
=head1 NAME
Test::Unit::TestCase - unit testing framework base class
=head1 SYNOPSIS
package FooBar;
use base qw(Test::Unit::TestCase);
sub new {
my $self = shift()->SUPER::new(@_);
# your state for fixture here
return $self;
}
sub set_up {
# provide fixture
}
sub tear_down {
# clean up after test
}
sub test_foo {
my $self = shift;
my $obj = ClassUnderTest->new(...);
$self->assert_not_null($obj);
$self->assert_equals('expected result', $obj->foo);
$self->assert(qr/pattern/, $obj->foobar);
}
sub test_bar {
# test the bar feature
}
=head1 DESCRIPTION
Test::Unit::TestCase is the 'workhorse' of the PerlUnit framework.
When writing tests, you generally subclass Test::Unit::TestCase, write
C<set_up> and C<tear_down> functions if you need them, a bunch of
C<test_*> test methods, then do
$ TestRunner.pl My::TestCase::Class
and watch as your tests fail/succeed one after another. Or, if you
want your tests to work under Test::Harness and the standard perlish
'make test', you'd write a t/foo.t that looked like:
use Test::Unit::HarnessUnit;
my $r = Test::Unit::HarnessUnit->new();
$r->start('My::TestCase::Class');
=head2 How To Use Test::Unit::TestCase
(Taken from the JUnit TestCase class documentation)
A test case defines the "fixture" (resources need for testing) to run
multiple tests. To define a test case:
=over 4
=item 1
implement a subclass of TestCase
=item 2
define instance variables that store the state of the fixture (I
suppose if you are using Class::MethodMaker this is possible...)
=item 3
initialize the fixture state by overriding C<set_up()>
=item 4
clean-up after a test by overriding C<tear_down()>.
=back
Implement your tests as methods. By default, all methods that match
the regex C</^test/> are taken to be test methods (see
L</list_tests()> and L</get_matching_methods()>). Note that, by
default all the tests defined in the current class and all of its
parent classes will be run. To change this behaviour, see L</NOTES>.
By default, each test runs in its own fixture so there can be no side
effects among test runs. Here is an example:
package MathTest;
use base qw(Test::Unit::TestCase);
sub new {
my $self = shift()->SUPER::new(@_);
$self->{value_1} = 0;
$self->{value_2} = 0;
return $self;
}
sub set_up {
my $self = shift;
$self->{value_1} = 2;
$self->{value_2} = 3;
}
For each test implement a method which interacts with the fixture.
Verify the expected results with assertions specified by calling
C<$self-E<gt>assert()> with a boolean value.
sub test_add {
my $self = shift;
my $result = $self->{value_1} + $self->{value_2};
$self->assert($result == 5);
}
Once the methods are defined you can run them. The normal way to do
this uses reflection to implement C<run_test>. It dynamically finds
and invokes a method. For this the name of the test case has to
correspond to the test method to be run. The tests to be run can be
collected into a TestSuite. The framework provides different test
runners, which can run a test suite and collect the results. A test
runner either expects a method C<suite()> as the entry point to get a
test to run or it will extract the suite automatically.
=head2 Writing Test Methods
The return value of your test method is completely irrelevant. The
various test runners assume that a test is executed successfully if no
exceptions are thrown. Generally, you will not have to deal directly
with exceptions, but will write tests that look something like:
sub test_something {
my $self = shift;
# Execute some code which gives some results.
...
# Make assertions about those results
$self->assert_equals('expected value', $resultA);
$self->assert_not_null($result_object);
$self->assert(qr/some_pattern/, $resultB);
}
The assert methods throw appropriate exceptions when the assertions fail,
which will generally stringify nicely to give you sensible error reports.
L<Test::Unit::Assert> has more details on the various different
C<assert> methods.
L<Test::Unit::Exception> describes the Exceptions used within the
C<Test::Unit::*> framework.
=head2 Helper methods
=over 4
=item make_test_from_coderef (CODEREF, [NAME])
Takes a coderef and an optional name and returns a Test case that
inherits from the object on which it was called, which has the coderef
installed as its C<run_test> method. L<Class::Inner> has more details
on how this is generated.
=item list_tests
Returns the list of test methods in this class and its parents. You
can override this in your own classes, but remember to call
C<SUPER::list_tests> in there too. Uses C<get_matching_methods>.
=item get_matching_methods (REGEXP)
Returns the list of methods in this class matching REGEXP.
=item set_up
=item tear_down
If you don't have any setup or tear down code that needs to be run, we
provide a couple of null methods. Override them if you need to.
=item annotate (MESSAGE)
You can accumulate helpful debugging for each testcase method via this
method, and it will only be outputted if the test fails or encounters
an error.
=back
=head2 How it All Works
The PerlUnit framework is achingly complex. The basic idea is that you
get to write your tests independently of the manner in which they will
be run, either via a C<make test> type script, or through one of the
provided TestRunners, the framework will handle all that for you. And
it does. So for the purposes of someone writing tests, in the majority
of cases the answer is 'It just does.'.
Of course, if you're trying to extend the framework, life gets a
little more tricky. The core class that you should try and grok is
probably Test::Unit::Result, which, in tandem with whichever
TestRunner is being used mediates the process of running tests,
stashes the results and generally sits at the centre of everything.
Better docs will be forthcoming.
=head1 NOTES
Here's a few things to remember when you're writing your test suite:
Tests are run in 'random' order; the list of tests in your TestCase
are generated automagically from its symbol table, which is a hash, so
methods aren't sorted there.
If you need to specify the test order, you can do one of the
following:
=over 4
=item * Set @TESTS
our @TESTS = qw(my_test my_test_2);
This is the simplest, and recommended way.
=item * Override the C<list_tests()> method
to return an ordered list of methodnames
=item * Provide a C<suite()> method
which returns a Test::Unit::TestSuite.
=back
However, even if you do manage to specify the test order, be careful,
object data will not be retained from one test to another, if you want
to use persistent data you'll have to use package lexicals or globals.
(Yes, this is probably a bug).
If you only need to restrict which tests are run, there is a filtering
mechanism available. Override the C<filter()> method in your testcase
class to return a hashref whose keys are filter tokens and whose
values are either arrayrefs of test method names or coderefs which take
the method name as the sole parameter and return true if and only if it
should be filtered, e.g.
sub filter {{
slow => [ qw(my_slow_test my_really_slow_test) ],
matching_foo => sub {
my $method = shift;
return $method =~ /foo/;
}
}}
Then, set the filter state in your runner before the test run starts:
# @filter_tokens = ( 'slow', ... );
$runner->filter(@filter_tokens);
$runner->start(@args);
This interface is public, but currently undocumented (see
F<doc/TODO>).
=head1 BUGS
See note 1 for at least one bug that's got me scratching my head.
There's bound to be others.
=head1 AUTHOR
Copyright (c) 2000-2002, 2005 the PerlUnit Development Team
(see L<Test::Unit> or the F<AUTHORS> file included in this
distribution).
All rights reserved. This program is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
=over 4
=item *
L<Test::Unit::Assert>
=item *
L<Test::Unit::Exception>
=item *
L<Test::Unit::TestSuite>
=item *
L<Test::Unit::TestRunner>
=item *
L<Test::Unit::TkTestRunner>
=item *
For further examples, take a look at the framework self test
collection (t::tlib::AllTests).
=back
=cut
|
carlgao/lenga
|
images/lenny64-peon/usr/share/perl5/Test/Unit/TestCase.pm
|
Perl
|
mit
| 11,546 |
var vuetap = {
// https://github.com/MeCKodo/vue-tap
isFn: true,
acceptStatement: true,
bind: function() {
//bind callback
},
update: function(fn) {
var self = this;
self.tapObj = {};
if (typeof fn !== 'function') {
return console.error('The param of directive "v-tap" must be a function!');
}
self.handler = function(e) { //This directive.handler
e.tapObj = self.tapObj;
fn.call(self, e);
};
if (self.isPC()) {
self.el.addEventListener('click', function(e) {
fn.call(self, e);
}, false);
} else {
this.el.addEventListener('touchstart', function(e) {
if (self.modifiers.prevent)
e.preventDefault();
if (self.modifiers.stop)
e.stopPropagation();
self.touchstart(e, self);
}, false);
this.el.addEventListener('touchend', function(e) {
self.touchend(e, self, fn);
}, false);
}
},
unbind: function() {},
isTap: function() {
var tapObj = this.tapObj;
return this.time < 150 && Math.abs(tapObj.distanceX) < 2 && Math.abs(tapObj.distanceY) < 2;
},
isPC: function() {
var uaInfo = navigator.userAgent;
var agents = ["Android", "iPhone", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (var i = 0; i < agents.length; i++) {
if (uaInfo.indexOf(agents[i]) > 0) {
flag = false;
break;
}
}
return flag;
},
touchstart: function(e, self) {
var touches = e.touches[0];
var tapObj = self.tapObj;
tapObj.pageX = touches.pageX;
tapObj.pageY = touches.pageY;
tapObj.clientX = touches.clientX;
tapObj.clientY = touches.clientY;
self.time = +new Date();
},
touchend: function(e, self) {
var touches = e.changedTouches[0];
var tapObj = self.tapObj;
self.time = +new Date() - self.time;
tapObj.distanceX = tapObj.pageX - touches.pageX;
tapObj.distanceY = tapObj.pageY - touches.pageY;
if (self.isTap(tapObj))
self.handler(e);
}
}
exports.tap = vuetap;
|
TopWebGhost/VeriForms-Vuejs
|
src/directive.js
|
JavaScript
|
mit
| 2,346 |
{
matrix_id: '2073',
name: 'mk9-b2',
group: 'JGD_Homology',
description: 'Simplicial complexes from Homology from Volkmar Welker.',
author: 'V. Welker',
editor: 'J.-G. Dumas',
date: '2008',
kind: 'combinatorial problem',
problem_2D_or_3D: '0',
num_rows: '1260',
num_cols: '378',
nonzeros: '3780',
num_explicit_zeros: '0',
num_strongly_connected_components: '1',
num_dmperm_blocks: '1',
structural_full_rank: 'true',
structural_rank: '378',
pattern_symmetry: '0.000',
numeric_symmetry: '0.000',
rb_type: 'integer',
structure: 'rectangular',
cholesky_candidate: 'no',
positive_definite: 'no',
notes: 'Simplicial complexes from Homology from Volkmar Welker.
From Jean-Guillaume Dumas\' Sparse Integer Matrix Collection,
http://ljk.imag.fr/membres/Jean-Guillaume.Dumas/simc.html
http://www.mathematik.uni-marburg.de/~welker/
Filename in JGD collection: Homology/mk9.b2.1260x378.sms
',
norm: '4.242641e+00',
min_singular_value: '1.014848e-15',
condition_number: '4180566424297883',
svd_rank: '343',
sprank_minus_rank: '35',
null_space_dimension: '35',
full_numerical_rank: 'no',
svd_gap: '671370552848734.375000',
image_files: 'mk9-b2.png,mk9-b2_svd.png,mk9-b2_graph.gif,',
}
|
ScottKolo/UFSMC-Web
|
db/collection_data/matrices/JGD_Homology/mk9-b2.rb
|
Ruby
|
mit
| 1,452 |
class A {
x: number = 42
foo(x:number) {}
}
class B extends A { // ok
foo() { } // TS9255
}
interface C { }
class D implements C { } // OK
class G<T> { } // Generics now supported
class X extends G<number> {} // TS9228 - cannot extend generic type
class S {
public static x: number
public static m() { }
}
S.x = 42
S.m()
|
switch-education/pxt
|
tests/errors-test/cases/classes.ts
|
TypeScript
|
mit
| 342 |
process.env.NODE_ENV = "test";
var chai = require("chai");
var chaiHttp = require("chai-http");
var <%= modelNameUCase%> = require("../app/models/<%= modelNameLCase%>");
var server = require("../server");
var should = chai.should();
var added<%= modelNameUCase%>;
chai.use(chaiHttp);
describe("<%= modelNameUCase %>", function() {
<%=modelNameUCase%>.collection.drop();
beforeEach(function(done) {
// ADD FIELDS FOR THE MODEL {FIELD_NAME: FIELD_VALUE}
<%=modelNameUCase%>.create({name: "Test Field"}, function(err, <%=modelNameLCase%>) {
added<%= modelNameUCase%> = <%=modelNameLCase%>;
done();
});
});
afterEach(function(done) {
<%=modelNameUCase%>.collection.drop();
done();
});
it("Should add a new <%= modelNameUCase %>", function(done) {
// ADD FIELDS FOR THE MODEL TO ADD {FIELD_NAME: FIELD_VALUE}
var new<%=modelNameUCase%> = { name: "New Test Field" };
chai.request(server)
.post("/api/<%=modelPluralLCase%>")
.send(new<%=modelNameUCase%>)
.end(function(err, res) {
res.should.have.status(200);
res.should.be.json;
res.should.be.a("object");
res.body.should.have.property("_id");
// ADD CHECKS TO ENSURE THE DATA YOU WANT IS RETURNED
// res.body.should.have.property("FIELD_NAME");
// res.body.FIELD_NAME.should.equal("FIELD_VALUE");
res.body.should.have.property("name");
res.body.name.should.equal("New Test Field");
res.body.should.not.have.property("deleted");
done();
});
});
it("Should get a listing of all <%= modelNameUCase %>", function(done) {
chai.request(server)
.get("/api/<%=modelPluralLCase%>")
.end(function(err, res) {
res.should.have.status(200);
res.should.be.json;
res.body.should.be.a("array");
res.body.length.should.equal(1);
res.body[0].should.have.property("_id");
// ADD CHECKS TO ENSURE THE DATA YOU WANT IS RETURNED
// res.body[0].should.have.property("FIELD_NAME");
// res.body[0].FIELD_NAME.should.equal("FIELD_VALUE");
res.body[0].should.have.property("name");
res.body[0].name.should.equal("Test Field");
res.body[0].should.not.have.property("deleted");
done();
});
});
it("Should get a single <%= modelNameUCase %>", function(done) {
chai.request(server)
.get("/api/<%=modelPluralLCase%>/" + added<%= modelNameUCase %>._id)
.end(function(err, res) {
res.should.have.status(200);
res.should.json;
res.should.be.a("object");
res.body.should.have.property("_id");
res.body._id.should.equal(added<%= modelNameUCase %>._id.toString());
// ADD CHECKS TO ENSURE THE DATA YOU WANT IS RETURNED
// res.body.should.have.property("FIELD_NAME");
// res.body.FIELD_NAME.should.equal("FIELD_VALUE");
res.body.should.have.property("name");
res.body.name.should.equal("Test Field");
res.body.should.not.have.property("deleted");
done();
});
});
it("Should update a single <%= modelNameUCase %>", function(done) {
chai.request(server)
.put("/api/<%=modelPluralLCase%>/" + added<%= modelNameUCase %>._id)
// INSERT FIELDS TO UPDATE {description: test, active: false}
.send({name: 'Updated Field'})
.end(function(err, res) {
res.should.have.status(200);
res.should.json;
res.should.be.a("object");
// ADD CHECKS TO ENSURE THE DATA YOU WANT IS RETURNED
// res.body.should.have.property("FIELD_NAME");
// res.body.FIELD_NAME.should.equal("FIELD_VALUE");
res.body.should.have.property("name");
res.body.name.should.equal("Updated Field");
res.body.should.not.have.property("deleted");
done();
});
});
it("Should delete a <%= modelNameUCase %>", function(done) {
chai.request(server)
.delete("/api/<%=modelPluralLCase%>/" + added<%= modelNameUCase %>._id)
.end(function(err, res) {
res.should.have.status(200);
res.should.json;
res.should.be.a("object");
chai.request(server)
.get("/api/<%=modelPluralLCase%>")
.end(function(err, res) {
res.should.have.status(200);
res.should.json;
res.body.should.be.a("array");
res.body.length.should.equal(0);
done();
})
});
});
});
|
amplitudesolutions/slush-nodeapi
|
templates/tests/test.js
|
JavaScript
|
mit
| 5,236 |
/**
* \file
*
* \brief Autogenerated API include file for the Atmel Software Framework (ASF)
*
* Copyright (c) 2012 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name of Atmel may not be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. This software may only be redistributed and used in connection with an
* Atmel microcontroller product.
*
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* \asf_license_stop
*
*/
#ifndef ASF_H
#define ASF_H
/*
* This file includes all API header files for the selected drivers from ASF.
* Note: There might be duplicate includes required by more than one driver.
*
* The file is automatically generated and will be re-written when
* running the ASF driver selector tool. Any changes will be discarded.
*/
// From module: Common SAM compiler driver
#include <compiler.h>
#include <status_codes.h>
// From module: Delay routines
#include <delay.h>
// From module: FLASHCALW Controller Software Driver
#include <flashcalw.h>
// From module: Generic board support
#include <board.h>
// From module: Generic components of unit test framework
#include <unit_test/suite.h>
// From module: IISC - Inter-IC Sound Controller
#include <iisc.h>
// From module: IOPORT - General purpose I/O service
#include <ioport.h>
// From module: Interrupt management - SAM implementation
#include <interrupt.h>
// From module: PDCA - Peripheral DMA Controller
#include <pdca.h>
// From module: Part identification macros
#include <parts.h>
// From module: Power Management
#include <bpm.h>
// From module: SAM4L startup code
#include <exceptions.h>
#include <system_sam4l.h>
// From module: SAM4L-EK LED support enabled
#include <led.h>
// From module: Sleep manager - SAM4L implementation
#include <sam4l/sleepmgr.h>
#include <sleepmgr.h>
// From module: Standard serial I/O (stdio) - SAM implementation
#include <stdio_serial.h>
// From module: System Clock Control - SAM4L implementation
#include <sysclk.h>
// From module: USART - Serial interface- SAM implementation for devices with only USART
#include <serial.h>
// From module: USART - Univ. Syn Async Rec/Trans
#include <usart.h>
// From module: WDT - Watchdog Timer
#include <wdt_sam4l.h>
#endif // ASF_H
|
femtoio/femto-usb-blink-example
|
blinky/blinky/asf-3.21.0/sam/drivers/iisc/unit_tests/sam4lc4c_sam4l_ek/iar/asf.h
|
C
|
mit
| 3,643 |
require 'ucb_ldap'
username = 'uid=eecs_vdms,ou=applications,dc=berkeley,dc=edu'
password = 'wh3nsth3mtg?'
UCB::LDAP.authenticate(username, password) if Rails.env == 'production'
|
mikesmayer/vdms
|
config/initializers/ldap.rb
|
Ruby
|
mit
| 187 |
---
author:
display_name: Bert Granberg
email: [email protected]
tags: []
date: 2011-12-01 15:18:09 -0700
title: Utah Addressing Systems (Address Grids)
categories: []
---
<p>James Wingate, formerly of Blue Stakes, has compiled most of the address coordinate system descriptions listed below.
UGRC will update this list as more information is brought to our attention. If you have additional information or
corrections to contribute, please <a
href="{{ site.github.repository_url }}/edit/master/{{ page.path }}">contribute</a> {% include contact.html
subject=page.title contact=site.data.contacts.address_grids text='or email' %}</p>
<p>UGRC has created a <a href="{% link data/location/address-data/index.html %}#AddressSystemQuadrants">polygon feature
class</a> that approximates the boundaries of each local address coordinate system (ACS) and each quadrant (NE, NW,
SE, SW) within each local ACS.</p>
<h2 class="text-left">Beaver County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Beaver – has own origin – Main St/Hwy 160 (0 E/W) and Center St/Hwy 21 (0 N/S)
<li>Milford – has own origin – Main St/Hwy 257 (0 E\W) and Center St/ Hwy 21 (0 N/S)
<li>Minersville – has own origin – Main St (0 N/S) and Center St/Hwy 130 (0 E/W)
</ul>
<p>Some county addresses count off of Beaver. There may be different origins for the county addresses, but it’s hard to
tell with all the null roads. Search 9300 S (8500 N next road north).<br />
<h2 class="text-left">Box Elder County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Bear River City – counts from Brigham City.
<li>Brigham City – has own origin – Main St/Hwy 30 (0 E/W) and Forest St (0 N/S)
<li>Corinne – counts from Brigham City.
<li>Deweyville – counts from Brigham City.
<li>Elwood – counts from Brigham City.
<li>Fielding – has own origin – Main St (0 N/S) and Center St (0 E/W)
<li>Garland – has own origin – Main St (0 E/W) and Factory St (0 N/S)
<li>Honeyville – counts from Brigham City
<li>Howell – counts from Brigham City.
<li>Mantua – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Perry – counts from Brigham City.
<li>Plymouth – counts from Brigham City.
<li>Portage – counts from Brigham City.
<li>Snowville – has own origin – Main St (0 N/S) and Stone Rd (0 E/W)
<li>Tremonton – has own origin – Main St (0 N/S) and Tremont St (0 E/W)
<li>Willard – has own origin – Main St (0 E/W) and Center St (0 N/S)
</ul>
<p>Unincorporated county – counts from Brigham City.</p>
<h2 class="text-left">Cache County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Amalga – follows unincorporated county (counts from Logan)
<li>Clarkston – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Cornish – follows unincorporated county (counts from Logan)
<li>Hyde Park – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Hyrum – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Lewiston – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Logan* – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Mendon – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Millville – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Newton – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Nibley – counts from Logan
<li>North Logan – counts from Logan
<li>Paradise – follows unincorporated county (counts from Logan)
<li>Providence – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Richmond – has own origin – Main St (0 N/S) & State St (0 E/W)
<li>River Heights – counts from Logan
<li>Smithfield – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Trenton – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Wellsville – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Unincorporated county – counts from Logan
</ul>
<p>* <em>Streets in Logan containing addresses that don't count from Logan's address origin correctly. Per Chuck Shaw,
Logan City GIS and Kent Braddy, Cache Co Planning. (11/12/2008)</em></p>
<ul>
<li>Crockett Ave
<li>River Park Dr
<li>Teal Loop
<li>Mallard Loop
<li>South Place Dr
<li>Somerset Pl
<li>Kensington Pl
<li>Hampton Ct
<li>Stirling Pl
<li>Coventry Pl
<li>Penhurst Ln
<li>Trail Cir
</ul>
<h7><strong>Address numbers for all of Cache County</strong></h7>
<ul class="dotless no-padding">
<li><strong>Even</strong> – always on South and East side of the street
<li><strong>Odd</strong> – always on North and West side of the street
</ul>
<p>This is <em>different</em> from most cities, where even addresses are typically on the right and odds on the left as
you move outward from the address origin. This is the case for the entire county, although supposedly a few addresses
have deviated.</p>
<h5>Carbon County</h5>
<div>Municipalities with their own address origins</div>
<ul>
<li>East Carbon – has its own origin? – SR 123 (0 N/S) & Grassy Trail Dr/ Main St (0 E/W)?
<li>Helper – has own origin – Janet St (0 N/S) & Main St/Hwy 244 (0 E/W)
<li>Price – has own origin – Main St (0 N/S) & Carbon Ave/Hwy 10 (0 E/W)
<li>Scofield – has own origin? – Missing (0 N/S) & Main St/Scofield Hwy/Hwy 96 (0 E/W)
<li>Sunnyside – Looks like it counts off East Carbon
<li>Wellington – has own origin – Main St/Hwy 191 (0 N/S) & Center St (0 E/W)
</ul>
<h2 class="text-left">Daggett County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Manila – has its own origin – SR 43 (0 N/S) & Main St/SR 44 (0 E/W)
</ul>
<div>Unincorporated areas with their own origins (updated 1/11)</div>
<ul>
<li>Birch Creek - Birch Creek Rd (0 E/W)
<li>Browns Park
<li>Clay Basin
<li>Deer Lodge
<li>Diamond Mountain
<li>Dutch John
<li>Greendale
<li>Spirit Lake
</ul>
<h2 class="text-left">Davis County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Bountiful – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Centerville – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Clearfield – has own origin – Center St (0 N/S) & Main St/State St/SR 126 (0 E/W)
<li>Clinton – counts off of Clearfield’s address origin (see Clearfield)
<li>Farmington – has own origin – State St/SR 227 (0 N/S) & Main St/SR 106 (0 E/W)
<li>Fruit Heights – counts off of Kaysville’s address origin (see Kaysville)
<li>Kaysville – has own origin – Center St (0 N/S) & Main St/SR 273 (0 E/W)
<li>Layton – has own origin – Gentile St/SR 109 (0 N/S) & Main St/ SR 126 (0 E/W)
<li>North Salt Lake – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>South Weber – counts off of Ogden’s address origin (see Ogden in Weber Co)
<li>Sunset – counts off of Clearfield’s address origin (see Clearfield)
<li>Syracuse – counts off of Clearfield’s address origin (see Clearfield)
<li>West Bountiful – counts off of Bountiful’s address origin (see Bountiful)
<li>West Point – counts off of Clearfield’s address origin (see Clearfield)
<li>Woods Cross – counts off of Bountiful’s address origin (see Bountiful)
</ul>
<div>Address origins for unincorporated cities</div>
<ul>
<li>Hill Air Force Base
</ul>
<div>Notes</div>
<ul>
<li>There is a large pocket of unincorporated county between Bountiful and NSL – addresses count from Bountiful’s
origin in this area.
</ul>
<h2 class="text-left">Duchesne County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Duchesne – intersection of Main St (0 N/S) and Center St (0 E/W)
<li>Myton – intersection of Main St (0 N/S) and Center St (0 E/W)
<li>Roosevelt – intersection of Lagoon St (0 N/S) and State St (0 E/W)
</ul>
<div>Municipalities that count from Unincorporated County address origin located at: Intersection of South Cove Rd/US 40
[200 N Roosevelt] (0 N/S) and State St (0 E/W) in Roosevelt</div>
<ul>
<li>Altamont
<li>Tabiona
</ul>
<p>The unincorporated county origin covers all of Duchesne County except for the areas within Duchesne City, Myton and
Roosevelt city boundaries. A significant portion of Uintah County also counts from this origin, including the
municipality of Ballard Town and roughly 25% of the unincorporated area.</p>
<p>Roosevelt City grid and County grid both have same 0 E/W, but their 0 N/S locations differ by two blocks. This can be
slightly confusing, as evidenced by traveling north along State St in Roosevelt. Proceeding north from Lagoon St,
after a few blocks you will hit 500 N (City), then 600 N (City) and then 500 N (County). This is because the county
origin begins two blocks farther north than the city origin.</p>
<h2 class="text-left">Emery County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Castle Dale – has own origin – Main St (0 N/S) & Hwy 10 (0 E/W)
<li>Clawson – has own origin – Center St/Old Hwy 6 (0 N/S) & Main St (0 E/W)
<li>Cleveland – has own origin – Main St/Hwy 155 (0 N/S) & Center St/Hwy 155 (0 E/W)
<li>Elmo – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Emery – has own origin – Main St/Hwy 10 (0 N/S) & Center St (0 E/W)
<li>Ferron – has own origin – Main St (0 N/S) & State St/SR 10 (0 E/W)
<li>Green River – has own origin – Main St/SR 19 (0 N/S) & Long St (0 E/W)
<li>Huntington – has own origin – Center St (0 N/S) & Main St/Hwy 10 (0 E/W)
<li>Orangeville – has own origin – Center St (0 N/S) & Main St (0 E/W)
</ul>
<h2 class="text-left">Garfield County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Antimony – ?
<li>Boulder – ?
<li>Bryce Canyon City – ?
<li>Cannonville – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Escalante – has own origin – Main St/Hwy 12 (0 N/S) & Center St (0 E/W)
<li>Hatch – has own origin – Center St (0 N/S) & Main St/Hwy 89 (0 E/W)
<li>Henrieville – has own origin – Main St/Hwy 12 (0 N/S) & Center St (0 E/W)
<li>Panguitch – has own origin – Center St/Hwy 89 (0 N/S) & Main St/Hwy 89/143 (0 E/W)
<li>Tropic – has own origin – Center St (0 N/S) & Main St/Hwy 12 (0 E/W)
</ul>
<h2 class="text-left">Grand County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Castle Valley – has own origin – Center St/Shafer Ln (0 N/S) & Castle Valley Dr(0 E/W)
<li>Moab – has own origin – Center St (0 N/S) & Main St/Hwy 191 (0 E/W)
</ul>
<h2 class="text-left">Iron County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Brian Head – has own origin – Bear Flat Rd (0 N/S) & SR 143 (0 E/W) (confirmed 8/10)
<li>Cedar City – has own origin – Center St/SR 14 (0 N/S) & Main St/SR 130 (0 E/W)
<li>Enoch – addresses based on Cedar City origin
<li>Kanarraville – has own origin – Center St (0 N/S) & Main St/Kanarraville Rd (0 E/W)
<li>Paragonah – has own origin – Center St (0 N/S) & Main St/SR 271 (0 E/W)
<li>Parowan – has own origin – Center St/SR 143 (0 N/S) & Main St/SR 274 (0 E/W)
</ul>
<h2 class="text-left">Juab County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Eureka – has own origin – Main St/Hwy 6 (0 N/S) & Center St (0 E/W)
<li>Levan – has own origin – Center St (0 N/S) & Main St/Hwy 28 (0 E/W)
<li>Mona – has own origin – Center St (0 N/S) & Main St/Hwy 91 (0 E/W)
<li>Nephi – has own origin – Center St (0 N/S) & Main St/Hwy 41 (0 E/W)
<li>Rocky Ridge – ?no addresses for any roads?
<li>Santaquin – *See Utah Co*
</ul>
<div>Other</div>
<ul>
<li>Juab County West Grid - has own origin - Snake Valley Rd & Pole Line
</ul>
<h2 class="text-left">Kane County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Alton – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Big Water – has own origin - US 89 (0 N/S) & Arron Burr Dr (0 E/W)
<li>Glendale – has own origin - Center St/Mill St (0 N/S) & Main St/SR (0 E/W)
<li>Kanab – has own origin - Center St/US 89 (0 N/S) & Main St (0 E/W)
<li>Orderville - has own origin- State St/US 89 (0 N/S) & Center ST (0 E/W) (updated 1/11)
</ul>
<div>Unincorporated areas with their own address origins (updated 1/11) </div>
<ul>
<li>Bullfrog
<li>Cannonville
<li>Duck Creek
</ul>
<h2 class="text-left">Millard County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Delta – has own origin – Main St/Hwy 50 (0 N/S) & Center St (0 E/W)
<li>Fillmore – has own origin – Center St/Eagle Ave (0 N/S) & Main St/SR 99 (0 E/W)
<li>Hinckley – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Holden – has own origin – Center St (0 N/S) & Main St/Hwy 64 (0 E/W)
<li>Kanosh – has own origin – Center St (0 N/S) & Main St/SR 133 (0 E/W)
<li>Leamington – has own origin – Main St/Hwy 132 (0 N/S) & Center St (0 E/W)
<li>Lynndyl – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Meadow – has own origin – Center St (0 N/S) & Main St/SR 133 (0 E/W)
<li>Oak City – has own origin – Center St (0 N/S) & Main St/Hwy 125 (0 E/W)
<li>Scipio – has own origin – Center St (0 N/S) & State St/Hwy 50 (0 E/W)
</ul>
<h2 class="text-left">Morgan County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Morgan – has own origin – Young St (0 N/S) & State St/SR 66 (0 E/W)
</ul>
<h2 class="text-left">Piute County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Circleville – has own origin – Main St/US 89 (0 N/S) & Center St (0 E/W)
<li>Junction – has own origin – Center St/SR 153 (0 N/S) & Main St/US 89 (0 E/W)
<li>Kingston – has own origin – Main St/SR 62 (0 N/S) & Center St/Kingston Ln (0 E/W)
<li>Marysvale – has own origin – Center St/Bullion Ave (0 N/S) & Main St/US 89 (0 E/W)
</ul>
<div>Unincorporated towns with their own address origins</div>
<ul>
<li>Angle - has own origin - Mani St (0 N/S) & SR 62 (0 E/W) (updated 1/11)
<li>Greenwich - has own origin - Center St (0 N/S) & Main St/SR 62 (0 E/W) (updated 1/11)
<li>Otter Creek - has own origin - Junction of SR 62 & SR 22 (updated 1/11)
</ul>
<h2 class="text-left">Rich County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Garden City – has own origin – Logan Rd/US 89 (0 N/S) & Bear Lake Blvd/Us 89/SR 30 (0 E/W)
<li>Lake Town – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Randolph – has own origin – Church St (0 N/S) & Main St/SR 16 (0 E/W)
<li>Woodruff – has own origin – Center St/Monte Cristo Hwy/SR 39 (0 N/S) & Main St/SR 16 (0 E/W)
</ul>
<h2 class="text-left">Salt Lake County</h2>
<p>Address origins</p>
<div>All cities in Salt Lake County count off the same address origin in downtown Salt Lake City at the intersection of
South Temple (0 N/S) & Main St (0 E/W) <em><strong>with the exception of the following two areas</strong></em>:
</div>
<ul>
<li>Copperton – located between county coordinates of 10200 S and 10600 S (approximately) & 8500 W and 8900 W
(approximately)
<li>Pepperwood Subdivision – located in the city of Sandy and extends from 2000 E to Wasatch Blvd (3265 E) and from
Dimple Dell Rd (10650 S) to Lone Hollow Rd (11270 S).
</ul>
<h2 class="text-left">San Juan County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Blanding – has own origin – Center St/Hwy 191 (0 N/S) & Main St/Hwy 191 (0 E/W)
<li>Monticello – has own origin – Center St/Hwy 491 (0 N/S) & Main St/Hwy 191 (0 E/W)
</ul>
<h2 class="text-left">Sanpete County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Centerfield – has own origin – Center St (0 N/S) & Main St/Hwy 89 (0 E/W)
<li>Ephraim – has own origin – Center St (0 N/S) & Main St/Hwy 89 (0 E/W)
<li>Fairview – has own origin – Center St (0 N/S) & State St/Hwy 89 (0 E/W)
<li>Fayette – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Fountain Green – has own origin – Center St (0 N/S) & State St/Hwy 132 (0 E/W)
<li>Gunnison – has own origin – Center St (0 N/S) & Main St/Hwy 89 (0 E/W)
<li>Manti – has own origin – Union Rd (0 N/S) & Main St/Hwy 89 (0 E/W)
<li>Mayfield – has own origin – Canyon Rd (0 N/S) & Main St/Hwy 137 (0 E/W)
<li>Maroni – has own origin – Main St/Hwy 132 (0 N/S) & Center St (0 E/W)
<li>Mount Pleasant – has own origin – Main St/Hwy 116 (0 N/S) & State St/Hwy 89 (0 E/W)
<li>Spring City – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Sterling – has own origin – Center St (0 N/S) & Hwy 89 (0 E/W)
<li>Wales – has own origin – Center St (0 N/S) & State St (0 E/W)
</ul>
<h2 class="text-left">Sevier County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Annabella – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Aurora – has own origin – Hwy 260 (0 E/W) and Center St (0 N/S)
<li>Central Valley – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Elsinore – has own origin – Main St (0 N/S) and Center St (0 E/W)
<li>Glenwood – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Joseph – has own origin – Main St (0 N/S) and Center St (0 E/W)
<li>Koosharem – has own origin – Torgersen Ln/Hwy 62 (0 E/W) and Center St/Langdon Mtn/Monroe Mtn (0 N/S)
<li>Monroe – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Redmond – has own origin – Main St (0 N/S) and Center St (0 E/W)
<li>Richfield – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Salina – has own origin – Main St (0 N/S) and State St (0 E/W)
<li>Sigurd – has own origin - Main St & Center St
</ul>
<div>Unincorporated areas with their own address origins</div>
<ul>
<li>Accord Lakes - ?
<li>Fish Lake - Twin Creek Road & SR 25 (?)
<li>Monroe Mountain - Around Cove Mountain Road & White Pine Creek Rd (?)
<li>Venice – Venice Main St (0 E/W) & Venice Center St (0 N/S)
<li>Sevier – ?
</ul>
<h2 class="text-left">Summit County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Coalville – has own origin – Center St (0 N/S) and Main St (0 E/W)
<li>Francis – counts off of Kamas’ address origin (see Kamas).
<li>Henefer – has own origin – Center St (0 N/S) and Main St/SR 86 (0 E/W)
<li>Kamas – has own origin – Center St/SR 150 (0 N/S) and Main St/SR 32 (0 E/W)
<li>Oakley – counts off of Kamas’ address origin (see Kamas)
<li>Park City – ?
</ul>
<h2 class="text-left">Tooele County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Grantsville – has own origin – Main St/Hwy 138 (0 N/S) & Hale St (0 E/W)
<li>Ophir – has own origin – Ophir Canyon Rd/Main St (0 N\S) there is no E/W center line marked by a street. E/W is
divided at a random point along Ophir Canyon Rd
<li>Rush Valley – has own origin – SR 199 (0 N/S) & Main St (0 E/W)
<li>Stockton – has own origin although it is not exact – Silver Ave (0 N/S) & Connor Ave on the north side of
Silver Ave and Grant Ave on the south side of Silver Ave (0 E/W)
<li>Tooele – has own origin – Vine St (0 N/S) & Main St/SR 36 (0 E/W)
<li>Vernon – has own origin – Castagno Rd (0 N/S) & Main St (0 E/W)
<li>Wendover – has own origin although it is not exact – Wnedover Blvd/East Wendover Blvd (0 N/S) & Aria Blvd on
the north side of Wendover Blvd and 1st St on the south side of Wendover Blvd (0 E/W)
</ul>
<h2 class="text-left">Uintah County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Ballard – counts from Duchesne Co origin - US 40 [200 N Roosevelt] (0 N/S – Ballard) & State St (0 E/W –
Roosevelt)
<li>Naples – addresses based on Vernal’s origin
<li>Vernal – has own origin – Main St/US 40 (0 N/S) & Vernal Ave/US 191 (0 E/W)
<li>Unincorporated county – approx 75% counts from Vernal, approx 25% counts from Duchesne Co origin
</ul>
<h2 class="text-left">Utah County</h2>
<ul>
<li>Alpine – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>American Fork – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Cedar Fort – has own origin – Center St (0 N/S) & Church St (0 E/W)
<li>Cedar Hills – follows unincorporated Utah County address grid
<li>Draper – follows Salt Lake County address grid
<li>Eagle Mountain – has own origin – section corner for the extreme SW corner of section 35 of T6S R2W (approx
lat/long 40.24693, -112.04393) on their city limit border with Fairfield. The vast majority of all addresses count
north and east from this point; however the city limits do allow for a very few south or west addresses.
<li>Elk Ridge – has own origin – section line of sections 23 & 26 of T9S R2E (0 N/S) and Hillside Dr (0 E/W).
<li>Fairfield – follows unincorporated Utah County address grid
<li>Genola – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Goshen – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Highland – follows unincorporated Utah County address grid
<li>Lehi – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Lindon – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Mapleton – has own origin – Maple St (0 N/S) & Main St (0 E/W)
<li>Orem – has own origin – Center St (0 N/S) & where Main St (0 E/W) would cross Center St if it existed in that
area (Main St does not exist between 400 S & 300 N). The 0 E/W point is also the section line between sections
14 & 15 of T6S R2E.
<li>Payson – has own origin – Utah Ave (0 N/S) & Main St (0 E/W)
<li>Pleasant Grove – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Provo – has own origin – Center St (0 N/S) & University Ave (0 E/W)
<li>Salem – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Santaquin – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Saratoga Springs – has own origin – section line between sections 23 & 26 of T5S R1W (0 N/S) & Redwood Rd
/ Main St (0 E/W)
<li>Spanish Fork – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Springville – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Vineyard – has own origin – Center St / Gammon Rd (0 N/S) & Main St (0 E/W)
<li>Woodland Hills – has own origin – north city limit boundary (0 N/S) where Woodland Hills Dr (0 E/W) meets Salem
City. This is on the border of sec 13 of T9S R2E and sec 18 of T9S R3E (approx lat/long 40.03098, -111.65381). Thus,
there would be no north addresses in Woodland Hills.
<li>Unincorporated Utah County – origin is in Provo at approx 120 S 120 E at section corner of sections 1 & 12 of
T7S R2E and sections 6 & 7 of T7S R3E. This is the origin for all unincorporated areas as well as Cedar Hills,
Fairfield and Highland, but not Provo.
</ul>
<h2 class="text-left">Wasatch County</h2>
<div>Municipalities with their own address origins</div>
<ul>
<li>Charleston – counts from Heber City
<li>Daniel – counts from Heber City
<li>Heber City – has own origin – Main St (0 E/W) and Center St (0 N/S)
<li>Midway – has own origin – Main St (0 N/S) and Center St (0 E/W) *Note: N/S origin is very close to the same as
Heber City (about 2.5 blocks off)
<li>Park City – see Summit County
<li>Unincorporated county – Mostly from Heber City (could have some different areas?)
<li>Wallsburg – has own origin – E Main St/ W Main Canyon Rd (0 N/S) and N Center St/S Main Canyon Rd (0 E/W)
</ul>
<p>Add Independence and Hideout once their municipality borders are obtained</p>
<h2 class="text-left">Washington County</h2>
<div>Address origins (last edited 10/29/08)</div>
<ul>
<li>Springdale – No prefix or suffix directionals used. There is also no official address origin. If there was an
origin, it would be where Zion Park Blvd (SR 9) meets the north city boundary line, which is also the border of Zion
National Park. Zion Park Blvd (ZPB) would be the zero road, where addresses along the cross streets get larger as
they get farther away from ZPB. But there is no standard of how far addresses count; the addresses could jump by 2
from house to house or by 50. All segments of ZPB have S as the prefix directional, since the origin would be the
north city boundary. E-911 is uses address points for Springdale. (per Tom Dansie – Director of Community
Development – 10/29/08)
</ul>
<ul>
<li>Toquerville – Center St (0 N/S) & Toquerville Blvd (0 E/W)
<li>Leeds – Center St (0 N/S) & Main St (0 E/W)
<li>Rockville – Main St (0 N/S) & Center St (0 E/W)
<li>Virgin – SR 9 (0 N/S) & Mill St (0 E/W) – note: Main St was formerly 0 N/S; entire address grid changed in
June 2008
<li>LaVerkin – Center St (0 N/S) & Main St (0 E/W)
<li>Hurricane – State St / SR 9 (0 N/S) & Main St (0 E/W)
<li>Apple Valley – State St / SR 59 (0 N/S) & Main St (0 E/W)
<li>Hilldale – address origin is in Colorado City, Arizona, at Township Ave (0 N/S) & Midway St (0 E/W). All N-S
roads in Utah have N addresses.
<li>Enterprise – Main St (0 N/S) & Center St (0 E/W)
<li>New Harmony – Center St (0 N/S) & Main St (0 E/W)
<li>Ivins – Center St (0 N/S) & Main St (0 E/W)
<li>St George – Tabernacle St (0 N/S) & Main St (0 E/W)
<li>Santa Clara – addresses count from St George origin
<li>Washington – Telegraph St (0 N/S) & Main St (0 E/W)
</ul>
<p><strong>Irregularities</strong>: Some alpha roads that have <coe>SUF_DIR</coe> populated (e.g. Bloomington Dr N) and
numeric roads with <coder>S_TYPE</coder> populated (e.g. 2780 S Cir).</p>
<p>There are likely other origins for unincorporated towns – Veyo, Central, Pine Valley, and Gunlock. Pintura counts
from the Toquerville address grid. Pinto?</p>
<h2 class="text-left">Wayne County </h2>
<div>Address origins</div>
<ul>
<li>Bicknell – has own origin – Main St/SR 24 (0 N/S) & Center St (0 E/W)
<li>Caineville- has own origin- SR 24 (0 N/S) & Center St (0 E/W) (updated 1/11)
<li>Grover- has own origin- SR 12 (0 N/S) & Center St (0 E/W) (updated 1/11)
<li>Fremont- has own origin- Main St (0 N/S) & SR 72 (0 E/W) (updated 1/11)
<li>Hanksville – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Loa – has own origin – Center St (0 N/S) & Main St/SR 24 (0 E/W)
<li>Lyman – has own origin – Center St (0 N/S) & Main St (0 E/W)
<li>Teasdale- has own origin- Center St (0 N/S) & Main St (0 E/W) (updated 1/11)
<li>Torrey – has own origin – Main St (0 N/S) & Center St (0 E/W)
<li>Others as per 2007? countywide address grid and resigning project?
<li>Others as of 2011- Old Fishlake, Capitol Reef National Park, Notom
</ul>
<h2 class="text-left">Weber County</h2>
<div>Countywide origin – Wall Ave (100 E/W) between addresses of 120 N Wall and 106 (S) Wall Ave (in Ogden)</div>
|
agrc/agrc.github.io
|
data/address/address-grids/index.html
|
HTML
|
mit
| 27,904 |
package cn.newcapec.framework.plugins.cache;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public abstract class AbstractCacheEngine implements CacheEngine {
public static Log log = LogFactory.getLog(AbstractCacheEngine.class);
private String jndiName;
@Override
public Long getDefaultTime() {
return 60L;
}
/****
* 所有缓存都要支持jndi装载
*/
public abstract void loadJndi();
public String getJndiName() {
return jndiName;
}
public void setJndiName(String jndiName) {
this.jndiName = jndiName;
this.loadJndi();
}
}
|
3203317/ppp
|
plugin-caches/src/main/java/cn/newcapec/framework/plugins/cache/AbstractCacheEngine.java
|
Java
|
mit
| 607 |
# SobotKit
<<<<<<< HEAD
Sobot sdk for ios
========
智齿客服
>>>>>> 9392edf24d8c5b3b703839b5a01bc59bd55fb42b
|
kafeidou1991/JiuJiuWu
|
Pods/SobotKit/README.md
|
Markdown
|
mit
| 114 |
/*
* Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
*
* This software is open source.
* See the bottom of this file for the licence.
*/
package org.dom4j.dtd;
import junit.textui.TestRunner;
import org.dom4j.AbstractTestCase;
/**
* Tests the {@link ElementDecl}functionality. Tests each of the property
* access methods and the serialization mechanisms. Correct parsing is tested by
* {@link DocTypeTest}.
*
* <P>
* </p>
*
* @author Bryan Thompson
* @author Maarten Coene
* @version $Revision: 1.3 $
*
* @todo The dom4j documentation needs to describe what representation SHOULD be
* generated by {@link ElementDecl#toString()}.
*/
public class ElementDeclTest extends AbstractTestCase {
public static void main(String[] args) {
TestRunner.run(ElementDeclTest.class);
}
// Test case(s)
// -------------------------------------------------------------------------
/**
* Test
*
* <pre>
*
* <!ELEMENT an-element (#PCDATA)>
*
* </pre>
*/
public void testSimpleElementDecl() {
String expectedName = "an-element";
String expectedModel = "(#PCDATA)";
String expectedText = "<!ELEMENT an-element (#PCDATA)>";
ElementDecl actual = new ElementDecl(expectedName, expectedModel);
assertEquals("name is correct", expectedName, actual.getName());
assertEquals("model is correct", expectedModel, actual.getModel());
assertEquals("toString() is correct", expectedText, actual.toString());
}
// Implementation methods
// -------------------------------------------------------------------------
}
/*
* Redistribution and use of this software and associated documentation
* ("Software"), with or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain copyright statements and
* notices. Redistributions must also contain a copy of this document.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The name "DOM4J" must not be used to endorse or promote products derived
* from this Software without prior written permission of MetaStuff, Ltd. For
* written permission, please contact [email protected].
*
* 4. Products derived from this Software may not be called "DOM4J" nor may
* "DOM4J" appear in their names without prior written permission of MetaStuff,
* Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
*
* 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
*
* THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
*/
|
teslaworksumn/lightshow-visualizer
|
lib/dom4j-1.6.1/src/test/org/dom4j/dtd/ElementDeclTest.java
|
Java
|
mit
| 3,730 |
<!DOCTYPE html>
<!--
Copyright (c) 2015 by Rafael Angel Aznar Aparici (rafaaznar at gmail dot com)
openAUSIAS: The stunning micro-library that helps you to develop easily
AJAX web applications by using Java and jQuery
openAUSIAS is distributed under the MIT License (MIT)
Sources at https://github.com/rafaelaznar/
Permission is hereby granted, free of charge, to any person 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, sublicense, 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:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "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. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<div class="panel-heading" style="font-family:Oswald , serif;" ng-include="'js/system/header.html'"></div>
<div class="panel-body" ng-cloak>
<div class="row-fluid">
<div class="span6 offset3">
<table class="table table-striped table-condensed">
<thead>
<tr>
<th>campo</th>
<th>valor</th>
</tr>
</thead>
<tbody>
<tr><td>id</td><td>{{bean.id}}</td></tr>
<tr><td>Descripción</td><td>{{bean.descripcion}}</td></tr>
</tbody>
</table>
<div class="text-right" >
<a class="btn btn-primary" href="#/grupo/edit/{{bean.id}}">Editar</a>
<a class="btn btn-danger" href="#/grupo/remove/{{bean.id}}">Borrar</a>
<a class="btn btn-default" ng-click="plist()">Ir al listado de grupos</a>
<a class="btn btn-default" ng-click="close()">Cerrar</a>
</div>
</div>
</div>
</div>
<div class="panel-footer" style="font-family: Questrial, serif;" ng-include="'js/system/footer.html'"></div>
|
juliomiguel1/redsocialclase
|
src/main/webapp/js/grupo/view.html
|
HTML
|
mit
| 2,613 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2013 Konstantin Gribov
*
* Permission is hereby granted, free of charge, to any person 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, sublicense, 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:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "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. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#ifndef MISC_H_
#define MISC_H_
void delay_ms(u32 delay);
u16 min(u16 a, u16 b);
u16 max(u16 a, u16 b);
u16 sat(u16 val, u16 vmin, u16 vmax);
#endif /* MISC_H_ */
|
grossws/stm32-lcd
|
misc.h
|
C
|
mit
| 1,317 |
#!/usr/bin/env node
var sys = require("sys"),
fs = require("fs"),
chat = require('../lib/server'),
router = require("../lib/router");
// create chat server
var chatServer = chat.createServer();
chatServer.listen(8001);
// create a channel and log all activity to stdout
chatServer.addChannel({
basePath: "/chat"
}).addListener("msg", function(msg) {
sys.puts("<" + msg.nick + "> " + msg.text);
}).addListener("join", function(msg) {
sys.puts(msg.nick + " join");
}).addListener("part", function(msg) {
sys.puts(msg.nick + " part");
});
// server static web files
function serveFiles(localDir, webDir) {
fs.readdirSync(localDir).forEach(function(file) {
var local = localDir + "/" + file,
web = webDir + "/" + file;
if (fs.statSync(local).isDirectory()) {
serveFiles(local, web);
} else {
chatServer.passThru(web, router.staticHandler(local));
}
});
}
serveFiles(__dirname + "/web", "");
chatServer.passThru("/js/nodechat.js", router.staticHandler(__dirname + "/../web/nodechat.js"));
chatServer.passThru("/", router.staticHandler(__dirname + "/web/index.html"));
|
wangqian50815/node-chat
|
demo/chat.js
|
JavaScript
|
mit
| 1,095 |
<?php
namespace opensrs\backwardcompatibility\dataconversion\trust;
use opensrs\backwardcompatibility\dataconversion\DataConversion;
class ProcessPending extends DataConversion
{
// New structure for API calls handled by
// the toolkit.
//
// index: field name
// value: location of data to map to this
// field from the original structure
//
// example 1:
// "cookie" => 'data->cookie'
// this will map ->data->cookie in the
// original object to ->cookie in the
// new format
//
// example 2:
// ['attributes']['domain'] = 'data->domain'
// this will map ->data->domain in the original
// to ->attributes->domain in the new format
protected $newStructure = array(
'attributes' => array(
'order_id' => 'data->order_id',
),
);
public function convertDataObject($dataObject, $newStructure = null)
{
$p = new parent();
if (is_null($newStructure)) {
$newStructure = $this->newStructure;
}
$newDataObject = $p->convertDataObject($dataObject, $newStructure);
return $newDataObject;
}
}
|
detain/osrs-toolkit-php
|
opensrs/backwardcompatibility/dataconversion/trust/ProcessPending.php
|
PHP
|
mit
| 1,167 |
<!DOCTYPE html>
<html>
<head>
<script src="../packages/jspsych/dist/index.browser.js"></script>
<script src="../packages/plugin-image-keyboard-response/dist/index.browser.js"></script>
<script src="../packages/plugin-preload/dist/index.browser.js"></script>
<link rel="stylesheet" href="../packages/jspsych/css/jspsych.css">
</head>
<body></body>
<script>
var jsPsych = initJsPsych({
on_finish: function() {
// add completed field to every trial in the data
jsPsych.data.addProperties({
completed: true
});
// when data is displayed, you should see a subject and completed field for each trial
jsPsych.data.displayData();
}
});
var preload = {
type: jsPsychPreload,
auto_preload: true
};
var block_1 = {
type: jsPsychImageKeyboardResponse,
stimulus: 'img/happy_face_1.jpg',
choices: ['y','n'],
render_on_canvas: false,
stimulus_width: 300,
prompt: '<p>The data displayed on the next page should have a subject and completed property. Press "y" or "n".</p>'
};
// add the subject number to every trial in the data
jsPsych.data.addProperties({
subject: 1
});
jsPsych.run([preload, block_1]);
</script>
</html>
|
jspsych/jsPsych
|
examples/data-add-properties.html
|
HTML
|
mit
| 1,296 |
using System;
using System.IO;
using GroupDocs.Conversion.Options.Convert;
namespace GroupDocs.Conversion.Examples.CSharp.BasicUsage
{
/// <summary>
/// This example demonstrates how to convert MPT file into CSV format.
/// For more details about Microsoft Project Template (.mpt) to Comma Separated Values File (.csv) conversion please check this documentation article
/// https://docs.groupdocs.com/conversion/net/convert-mpt-to-csv
/// </summary>
internal static class ConvertMptToCsv
{
public static void Run()
{
string outputFolder = Constants.GetOutputDirectoryPath();
string outputFile = Path.Combine(outputFolder, "mpt-converted-to.csv");
// Load the source MPT file
using (var converter = new GroupDocs.Conversion.Converter(Constants.SAMPLE_MPT))
{
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions { Format = GroupDocs.Conversion.FileTypes.SpreadsheetFileType.Csv };
// Save converted CSV file
converter.Convert(outputFile, options);
}
Console.WriteLine("\nConversion to csv completed successfully. \nCheck output in {0}", outputFolder);
}
}
}
|
groupdocsconversion/GroupDocs_Conversion_NET
|
Examples/GroupDocs.Conversion.Examples.CSharp/BasicUsage/ConvertToSpreadsheet/ConvertToCsv/ConvertMptToCsv.cs
|
C#
|
mit
| 1,274 |
/*
YUI 3.11.0 (build d549e5c)
Copyright 2013 Yahoo! Inc. All rights reserved.
Licensed under the BSD License.
http://yuilibrary.com/license/
*/
YUI.add('datatype-date-parse', function (Y, NAME) {
/**
* Parse number submodule.
*
* @module datatype-date
* @submodule datatype-date-parse
* @for Date
*/
Y.mix(Y.namespace("Date"), {
/**
* Converts data to type Date.
*
* @method parse
* @param data {Date|Number|String} date object, timestamp (string or number), or string parsable by Date.parse
* @return {Date} a Date object or null if unable to parse
*/
parse: function(data) {
var val = new Date(+data || data);
if (Y.Lang.isDate(val)) {
return val;
} else {
Y.log("Could not convert data " + Y.dump(val) + " to type Date", "warn", "date");
return null;
}
}
});
// Add Parsers shortcut
Y.namespace("Parsers").date = Y.Date.parse;
Y.namespace("DataType");
Y.DataType.Date = Y.Date;
}, '3.11.0');
|
Simounet/pvrEzCommentBundle
|
Resources/public/js/yui/3.11.0/build/datatype-date-parse/datatype-date-parse-debug.js
|
JavaScript
|
mit
| 1,017 |
<div class="container">
<div class="row">
<div class="col l6 m6 s12">
<div class="card medium">
<div class="card-image waves-effect waves-block waves-light">
imagen A
</div>
<div class="card-content amber darken-2">
<p>contenido A</p>
</div>
</div>
<ul class="collection with_header">
<li class="collection-header"><h4>Taxistas Aprobados</h4></li>
<li class="collection-item avatar">
<i class="material-icons circle light-green accent-3">perm_identity</i>
<span id="ident_a1"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle light-green accent-3">perm_identity</i>
<span id="ident_a2"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle light-green accent-2">perm_identity</i>
<span id="ident_a3"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle light-green accent-2">perm_identity</i>
<span id="ident_a4"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle light-green accent-1">perm_identity</i>
<span id="ident_a5"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
</ul>
</div>
<div class="col l6 m6 s12">
<div class="card medium">
<div class="card-image waves-effect waves-block waves-light">
imagen R
</div>
<div class="card-content amber darken-2">
<p>contenido R</p>
</div>
</div>
<ul class="collection with_header">
<li class="collection-header"><h4>Taxistas Reprobados</h4></li>
<li class="collection-item avatar">
<i class="material-icons circle red">perm_identity</i>
<span id="ident_b1"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle red">perm_identity</i>
<span id="ident_b2"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle red lighten-1">perm_identity</i>
<span id="ident_b3"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle red lighten-1">perm_identity</i>
<span id="ident_b4"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
<li class="collection-item avatar">
<i class="material-icons circle red lighten-2">perm_identity</i>
<span id="ident_b5"></span>
<a href="#!" class="secondary-content"><i class="material-icons">comment</i></a>
</li>
</ul>
</div>
</div>
</div>
|
roco93/API-Taxi-v2
|
proyecto2/application/views/dashboard_taxistas.php
|
PHP
|
mit
| 3,998 |
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* @package Zend_Controller
* @subpackage Router
* @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
* @version $Id: Route.php 4806 2007-05-15 18:06:12Z matthew $
* @license http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
*/
/** Zend_Controller_Router_Exception */
require_once 'Zend/Controller/Router/Exception.php';
/** Zend_Controller_Router_Route_Interface */
require_once 'Zend/Controller/Router/Route/Interface.php';
/**
* Route
*
* @package Zend_Controller
* @subpackage Router
* @copyright Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://www.zend.com/license/framework/1_0.txt Zend Framework License version 1.0
* @see http://manuals.rubyonrails.com/read/chapter/65
*/
class Zend_Controller_Router_Route implements Zend_Controller_Router_Route_Interface
{
protected $_urlVariable = ':';
protected $_urlDelimiter = '/';
protected $_regexDelimiter = '#';
protected $_defaultRegex = null;
protected $_parts;
protected $_defaults = array();
protected $_requirements = array();
protected $_staticCount = 0;
protected $_vars = array();
protected $_params = array();
protected $_values = array();
/**
* Instantiates route based on passed Zend_Config structure
*/
public static function getInstance(Zend_Config $config)
{
$reqs = ($config->reqs instanceof Zend_Config) ? $config->reqs->toArray() : array();
$defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array();
return new self($config->route, $defs, $reqs);
}
/**
* Prepares the route for mapping by splitting (exploding) it
* to a corresponding atomic parts. These parts are assigned
* a position which is later used for matching and preparing values.
*
* @param string Map used to match with later submitted URL path
* @param array Defaults for map variables with keys as variable names
* @param array Regular expression requirements for variables (keys as variable names)
*/
public function __construct($route, $defaults = array(), $reqs = array())
{
$route = trim($route, $this->_urlDelimiter);
$this->_defaults = (array) $defaults;
$this->_requirements = (array) $reqs;
if ($route != '') {
foreach (explode($this->_urlDelimiter, $route) as $pos => $part) {
if (substr($part, 0, 1) == $this->_urlVariable) {
$name = substr($part, 1);
$regex = (isset($reqs[$name]) ? $reqs[$name] : $this->_defaultRegex);
$this->_parts[$pos] = array('name' => $name, 'regex' => $regex);
$this->_vars[] = $name;
} else {
$this->_parts[$pos] = array('regex' => $part);
if ($part != '*') {
$this->_staticCount++;
}
}
}
}
}
protected function _getWildcardData($parts, $unique)
{
$pos = count($parts);
if ($pos % 2) {
$parts[] = null;
}
foreach(array_chunk($parts, 2) as $part) {
list($var, $value) = $part;
$var = urldecode($var);
if (!array_key_exists($var, $unique)) {
$this->_params[$var] = urldecode($value);
$unique[$var] = true;
}
}
}
/**
* Matches a user submitted path with parts defined by a map. Assigns and
* returns an array of variables on a successful match.
*
* @param string Path used to match against this routing map
* @return array|false An array of assigned values or a false on a mismatch
*/
public function match($path)
{
$pathStaticCount = 0;
$defaults = $this->_defaults;
if (count($defaults)) {
$unique = array_combine(array_keys($defaults), array_fill(0, count($defaults), true));
} else {
$unique = array();
}
$path = trim($path, $this->_urlDelimiter);
if ($path != '') {
$path = explode($this->_urlDelimiter, $path);
foreach ($path as $pos => $pathPart) {
if (!isset($this->_parts[$pos])) {
return false;
}
if ($this->_parts[$pos]['regex'] == '*') {
$parts = array_slice($path, $pos);
$this->_getWildcardData($parts, $unique);
break;
}
$part = $this->_parts[$pos];
$name = isset($part['name']) ? $part['name'] : null;
$pathPart = urldecode($pathPart);
if ($name === null) {
if ($part['regex'] != $pathPart) {
return false;
}
} elseif ($part['regex'] === null) {
if (strlen($pathPart) == 0) {
return false;
}
} else {
$regex = $this->_regexDelimiter . '^' . $part['regex'] . '$' . $this->_regexDelimiter . 'iu';
if (!preg_match($regex, $pathPart)) {
return false;
}
}
if ($name !== null) {
// It's a variable. Setting a value
$this->_values[$name] = $pathPart;
$unique[$name] = true;
} else {
$pathStaticCount++;
}
}
}
$return = $this->_values + $this->_params + $this->_defaults;
// Check if all static mappings have been met
if ($this->_staticCount != $pathStaticCount) {
return false;
}
// Check if all map variables have been initialized
foreach ($this->_vars as $var) {
if (!array_key_exists($var, $return)) {
return false;
}
}
return $return;
}
/**
* Assembles user submitted parameters forming a URL path defined by this route
*
* @param array $data An array of variable and value pairs used as parameters
* @param boolean $reset Whether or not to set route defaults with those provided in $data
* @return string Route path with user submitted parameters
*/
public function assemble($data = array(), $reset = false)
{
$url = array();
$flag = false;
foreach ($this->_parts as $key => $part) {
$resetPart = false;
if (isset($part['name']) && array_key_exists($part['name'], $data) && $data[$part['name']] === null) {
$resetPart = true;
}
if (isset($part['name'])) {
if (isset($data[$part['name']]) && !$resetPart) {
$url[$key] = $data[$part['name']];
unset($data[$part['name']]);
} elseif (!$reset && !$resetPart && isset($this->_values[$part['name']])) {
$url[$key] = $this->_values[$part['name']];
} elseif (!$reset && !$resetPart && isset($this->_params[$part['name']])) {
$url[$key] = $this->_params[$part['name']];
} elseif (isset($this->_defaults[$part['name']])) {
$url[$key] = $this->_defaults[$part['name']];
} else
throw new Zend_Controller_Router_Exception($part['name'] . ' is not specified');
} else {
if ($part['regex'] != '*') {
$url[$key] = $part['regex'];
} else {
if (!$reset) $data += $this->_params;
foreach ($data as $var => $value) {
if ($value !== null) {
$url[$var] = $var . $this->_urlDelimiter . $value;
$flag = true;
}
}
}
}
}
$return = '';
foreach (array_reverse($url, true) as $key => $value) {
if ($flag || !isset($this->_parts[$key]['name']) || $value !== $this->getDefault($this->_parts[$key]['name'])) {
$return = '/' . $value . $return;
$flag = true;
}
}
return trim($return, '/');
}
/**
* Return a single parameter of route's defaults
*
* @param name Array key of the parameter
* @return string Previously set default
*/
public function getDefault($name) {
if (isset($this->_defaults[$name])) {
return $this->_defaults[$name];
}
return null;
}
/**
* Return an array of defaults
*
* @return array Route defaults
*/
public function getDefaults() {
return $this->_defaults;
}
}
|
KDVS/radio-library
|
library/Zend/Controller/Router/Route.php
|
PHP
|
mit
| 9,562 |
require 'spec_helper'
describe Slackistrano do
context "when :slackistrano is :disabled" do
before(:all) do
set :slackistrano, false
end
%w[starting updating reverting updated reverted failed].each do |stage|
it "doesn't post on slack:deploy:#{stage}" do
expect_any_instance_of(Slackistrano::Capistrano).not_to receive(:post)
Rake::Task["slack:deploy:#{stage}"].execute
end
end
end
end
|
supremegolf/slackistrano
|
spec/disabling_posting_to_slack_spec.rb
|
Ruby
|
mit
| 446 |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
errorHandler = require('./errors.server.controller'),
Status = mongoose.model('Status'),
_ = require('lodash');
/**
* Create a Status
*/
exports.create = function(req, res) {
var status = new Status(req.body);
status.user = req.user;
status.save(function(err) {
if (err) {
return res.status(400).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.jsonp(status);
}
});
};
/**
* Show the current Status
*/
exports.read = function(req, res) {
res.jsonp(req.status);
};
/**
* Update a Status
*/
exports.update = function(req, res) {
var status = req.status ;
status = _.extend(status , req.body);
status.save(function(err) {
if (err) {
return res.status(400).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.jsonp(status);
}
});
};
/**
* Delete an Status
*/
exports.delete = function(req, res) {
var status = req.status ;
status.remove(function(err) {
if (err) {
return res.status(400).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.jsonp(status);
}
});
};
/**
* List of Statuses
*/
exports.list = function(req, res) {
Status.find().sort('-created').populate('user', 'displayName').exec(function(err, statuses) {
if (err) {
return res.status(400).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.jsonp(statuses);
}
});
};
/**
* Status middleware
*/
exports.statusByID = function(req, res, next, id) {
Status.findById(id).populate('user', 'displayName').exec(function(err, status) {
if (err) return next(err);
if (! status) return next(new Error('Failed to load Status ' + id));
req.status = status ;
next();
});
};
/**
* Status authorization middleware
*/
exports.hasAuthorization = function(req, res, next) {
if (req.status.user.id !== req.user.id) {
return res.status(403).send('User is not authorized');
}
next();
};
|
bakkerjean/mean-socket
|
app/controllers/statuses.server.controller.js
|
JavaScript
|
mit
| 2,006 |
#!/usr/bin/env node
const { promirepl } = require('promirepl')
const repl = require('repl')
const SerialPort = require('serialport')
process.env.DEBUG = process.env.DEBUG || '*'
// outputs the path to an arduino or nothing
async function findArduino() {
const envPort = process.argv[2] || process.env.TEST_PORT
if (envPort) {
return envPort
}
const ports = await SerialPort.list()
for (const port of ports) {
if (/arduino/i.test(port.manufacturer)) {
return port.path
}
}
throw new Error(
'No arduinos found. You must specify a port to load.\n\nFor example:\n\tserialport-repl COM3\n\tserialport-repl /dev/tty.my-serialport'
)
}
findArduino()
.then(portName => {
console.log(`port = SerialPort("${portName}", { autoOpen: false })`)
console.log('globals { SerialPort, portName, port }')
const port = new SerialPort(portName, { autoOpen: false })
const spRepl = repl.start({ prompt: '> ' })
promirepl(spRepl)
spRepl.context.SerialPort = SerialPort
spRepl.context.portName = portName
spRepl.context.port = port
})
.catch(e => {
console.error(e.message)
process.exit(1)
})
|
EmergingTechnologyAdvisors/node-serialport
|
packages/repl/lib/index.js
|
JavaScript
|
mit
| 1,159 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
namespace Azure.Management.Resources.Models
{
/// <summary> An error response for a resource management request. </summary>
public partial class CloudError
{
/// <summary> Initializes a new instance of CloudError. </summary>
internal CloudError()
{
}
/// <summary> Initializes a new instance of CloudError. </summary>
/// <param name="error"> The resource management error response. </param>
internal CloudError(ErrorResponse error)
{
Error = error;
}
/// <summary> The resource management error response. </summary>
public ErrorResponse Error { get; }
}
}
|
hyonholee/azure-sdk-for-net
|
sdk/testcommon/Azure.Management.Resources.2017_05/src/Generated/Models/CloudError.cs
|
C#
|
mit
| 813 |
#include "script_component.hpp"
#include "script_config.hpp"
/**
* @class CfgPatches
* @brief Injection point addon into Arma 3
*/
class CfgPatches
{
/**
* @class rhs_c_sprut
* @brief Injection point of Sprut and BMD-4
* @ingroup patches
*/
class rhs_c_sprut
{
units[] = {rhs_sprut_vdv,rhs_bmd4_vdv,rhs_bmd4m_vdv,rhs_bmd4ma_vdv}; /**< The unit classes injected by this addon. */
weapons[] = {};
requiredVersion = 1.32; /**< The minimum version of the game required. */
requiredAddons[] = {
"rhs_main",
"rhs_c_heavyweapons",
"rhs_decals",
"rhs_optics",
"rhs_c_troops",
"A3_Armor_F",
"A3_Armor_F_Beta",
"A3_Armor_F_T100K",
"A3_CargoPoses_F"
}; /**< The addons required. */
version = VERSION;
};
};
class DefaultEventhandlers;
class WeaponFireGun;
class WeaponCloudsGun;
class WeaponFireMGun;
class WeaponCloudsMGun;
class RCWSOptics;
#include "cfgFunctions.hpp"
class CfgMovesBasic
{
class Default;
class DefaultDie;
class ManActions
{
rhs_sprut_commander = "rhs_sprut_commander";
rhs_sprut_gunner = "rhs_sprut_gunner";
rhs_bmd4_commander_in = "rhs_bmd4_commander_in";
rhs_bmd4_gunner_in = "rhs_bmd4_gunner_in";
rhs_bmd4_cargo_in = "rhs_bmd4_cargo_in";
};
};
class CfgMovesMaleSdr : CfgMovesBasic
{
class States
{
class Crew;
class rhs_crew_in: Default
{
actions = "CargoActions";
aiming = "aimingNo";
aimingBody = "aimingNo";
legs = "legsNo";
head = "headNo";
disableWeapons = 1;
interpolationRestart = 1;
soundEdge[] = {0.45};
//seems that bounding Sphere is crucial to hit detection
boundingSphere = 2.5;
canPullTrigger = 0;
leaning = "crewShake";
rightHandIKCurve[] = {1};
leftHandIKCurve[] = {1};
rightLegIKCurve[] = {1};
leftLegIKCurve[] = {1};
ConnectTo[] = {};
InterpolateTo[] = {"Unconscious",0.1};
};
class rhs_sprut_commander : rhs_crew_in
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_sprut_commander.rtm";
interpolateTo[] = {"kia_rhs_sprut_commander",1};
};
class kia_rhs_sprut_commander : DefaultDie
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_sprut_commander.rtm";
};
class rhs_sprut_gunner : rhs_crew_in
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_sprut_gunner.rtm";
interpolateTo[] = {"kia_rhs_sprut_gunner",1};
};
class kia_rhs_sprut_gunner : DefaultDie
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_sprut_gunner.rtm";
};
class rhs_bmd4_commander_in : rhs_crew_in
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_bmd4_commander_in.rtm";
interpolateTo[] = {"kia_rhs_bmd4_commander_in",1};
};
class kia_rhs_bmd4_commander_in : DefaultDie
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_bmd4_commander_in.rtm";
};
class rhs_bmd4_gunner_in : rhs_crew_in
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_bmd4_gunner_in.rtm";
interpolateTo[] = {"kia_rhs_bmd4_gunner_in",1};
};
class kia_rhs_bmd4_gunner_in : DefaultDie
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_bmd4_gunner_in.rtm";
};
class rhs_bmd4_cargo_in : rhs_crew_in
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_bmd4_cargo_in.rtm";
interpolateTo[] = {"kia_rhs_bmd4_cargo_in",1};
};
class kia_rhs_bmd4_cargo_in : DefaultDie
{
file = "\rhsafrf\addons\rhs_c_sprut\anims\rhs_bmd4_cargo_in.rtm";
};
};
};
class CfgVehicles
{
class LandVehicle;
class Tank: LandVehicle
{
class NewTurret;
class Sounds;
class HitPoints;
};
class Tank_F: Tank
{
class Turrets
{
class MainTurret: NewTurret
{
class Turrets
{
class CommanderOptics;
};
};
};
class AnimationSources;
class ViewPilot;
class ViewOptics;
class ViewCargo;
class HeadLimits;
class HitPoints: HitPoints
{
class HitHull;
class HitEngine;
class HitLTrack;
class HitRTrack;
};
class Sounds: Sounds
{
class Engine;
class Movement;
};
class EventHandlers;
};
/**
* @class rhs_a3spruttank_base
* @brief Sprut-SD Base Class
* @note Private class.
* @ingroup private
*/
class rhs_a3spruttank_base: Tank_F
{
category = "Armored";
slingLoadCargoMemoryPoints[] = {"SlingLoadCargo1","SlingLoadCargo2","SlingLoadCargo3","SlingLoadCargo4"};
AGM_FCSEnabled = 0;
driveOnComponent[]={"Slide"};
destrType=DestructDefault;
author = "RHS";
_generalMacro = "rhs_a3spruttank_base";
/// Vehicle class
vehicleClass = "rhs_vehclass_tank";
displayName = "$STR_SPRUT_Name";
accuracy = 0.3;
model = "\rhsafrf\addons\rhs_sprut\rhs_sprut";
picture = "\A3\armor_f_gamma\MBT_01\Data\UI\Slammer_M2A1_Base_ca.paa";
Icon = "\rhsafrf\addons\rhs_sprut\icon\ico_sprutsd_ca.paa";
mapSize = 11;
scope = 0;
weapons[] = {"rhs_weap_smokegen"};
magazines[] = {"rhs_mag_smokegen"};
/// Crew
crew = "rhs_vdv_combatcrew";
typicalCargo[] = {};
side = 0;
/// Faction
faction = "rhs_faction_vdv";
driverCanSee=2+4+8;
gunnerCanSee=2+4+8;
commanderCanSee = 2+4+8;
unitInfoType = "RHS_RscInfoSprut";
tf_range_api = 35000; //r173 - range 35-40km with standard 4m metal antenna
driverDoor="hatchD";
driverAction = "driver_apcwheeled2_out";
driverInAction = "driver_apcwheeled2_in";
driverOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_tvn5.p3d";
#include "physx_config_sprut.hpp"
#include "sound_config.hpp"
tracksSpeed = 1.35;
wheelCircumference = 2.01;
attenuationEffectType = "TankAttenuation";
cost = 1500000;
damageResistance = 0.02;
crewVulnerable = false;
armor = 200;
armorStructural=500;
class HitPoints: HitPoints {
class HitHull: HitHull {
armor=0.4;
material=-1;
name="telo";
visual="zbytek";
passThrough=0;
minimalHit = 0.54;
explosionShielding=0;
radius = 0.25;
};
class HitEngine: HitEngine {
armor=0.45;
material=-1;
name="motor";
passThrough=0;
minimalHit = 0.139;
explosionShielding=0.009;
radius = 0.17;
};
class HitLTrack: HitLTrack {
armor=0.15;
material=-1;
name="pas_L";
passThrough=0;
minimalHit = 0.15;
explosionShielding=0.15;
radius = 0.3;
};
class HitRTrack: HitRTrack {
armor=0.15;
material=-1;
name="pas_P";
passThrough=0;
minimalHit = 0.15;
explosionShielding=0.15;
radius = 0.3;
};
};
class TransportMagazines
{
class _xx_30Rnd_545x39_AK
{
magazine = "rhs_30Rnd_545x39_7N10_AK";
count = "10";
};
class _xx_HandGrenade_East
{
magazine = "rhs_mag_rgd5";
count = "10";
};
//it should be signal pistol rounds
class _xx_signal_rounds
{
magazine = "rhs_mag_nspn_red";
count = "10";
};
};
class TransportItems
{
class _xx_FirstAidKit
{
name = "FirstAidKit";
count = 4;
};
};
/**
* @class Turrets
* @brief Turrets
*/
class Turrets: Turrets
{
/**
* @class MainTurret
* @brief Main Turret
*/
class MainTurret: MainTurret
{
/**
* @class Turrets
* @brief Main Turret Turrets
*/
class Turrets: Turrets
{
/**
* @class CommanderOptics
* @brief Commander Turret
*/
class CommanderOptics: CommanderOptics
{
// Animation class
gunnerDoor="hatchC";
body = "obsTurret";
gun = "obsGun";
// Animation source
animationSourceBody = "obsTurret";
animationSourceGun = "obsGun";
// Servos
maxHorizontalRotSpeed = 1.8; // 1 = 45?/sec
maxVerticalRotSpeed = 1.8; // 1 = 45?/sec
stabilizedInAxes = StabilizedInAxesBoth;
soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
minElev=-05;
maxElev=+60;
initElev=0;
minTurn=-360;
maxTurn=+360;
initTurn=0;
// Weapon and magazines
memoryPointGun = "usti hlavne3";
gunBeg = "usti hlavne3";
gunEnd = "konec hlavne3";
/// Weapons
weapons[] = { SmokeLauncher}; // you may need different weapon class to provide firing effects emit from proper position.
/// Magazines
magazines[] = { SmokeLauncherMag};
// FCS
turretInfoType = "RHS_RscWeapon1k13_FCS";
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
// Optics view
memoryPointGunnerOutOptics = "commanderview";
memoryPointGunnerOptics= "commanderview";
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_1k13_3s_1x.p3d";
gunnerOutOpticsModel = "";
gunnerOpticsEffect[] = {}; // post processing effets
gunnerHasFlares = 1; // flare visual effect when looking at light source
class ViewOptics: ViewOptics {
initAngleX=0;
minAngleX=-30;
maxAngleX=+30;
initAngleY=0;
minAngleY=-100;
maxAngleY=+100;
// Field of view values: 1 = 120?
initFov=0.155;
minFov=0.034;
maxFov=0.155;
visionMode[] = {"Normal","TI"};
thermalMode[] = {0,1};
};
class OpticsIn {
class DayMain: ViewOptics {
initAngleX=0;
minAngleX=-30;
maxAngleX=+30;
initAngleY=0;
minAngleY=-100;
maxAngleY=+100;
initFov=0.7/1;
minFov=0.7/1;
maxFov=0.7/1;
visionMode[] = {"Normal"};
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_1k13_3s_1x.p3d";
gunnerOpticsEffect[] = {};
};
class Day2: DayMain {
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_1k13_3s_5x.p3d";
initFov=0.7/5;
minFov=0.7/5;
maxFov=0.7/5;
};
class Day3: DayMain {
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_1k13_3s_14x.p3d";
initFov=0.7/14;
minFov=0.7/14;
maxFov=0.7/14;
};
class night: daymain
{
initFov = 0.7/5;
minFov = 0.7/5;
maxFov = 0.7/5;
visionMode[] = {"NVG"};
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_1k13_3s_5x_nvg.p3d";
};
};
// Gunner operations
gunnerAction = mbt2_slot2b_out;
gunnerInAction = rhs_sprut_commander;
gunnerGetInAction = GetInHigh;
gunnerGetOutAction = GetOutHigh;
startEngine = 0; // Turning this turret should not turn engine on.
viewGunnerInExternal = 1;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
class HitPoints {
class HitTurret {
armor = 0.7;
material = -1;
name = "vezVelitele";
visual="vezVelitele";
passThrough = 0;
minimalHit = 0.13;
explosionShielding=0.001;
radius = 0.12;
};
class HitGun {
armor = 0.7;
material = -1;
name = "zbranVelitele";
visual="zbranVelitele";
passThrough = 0;
minimalHit = 0.13;
explosionShielding=0.001;
radius = 0.12;
};
};
selectionFireAnim = "zasleh3";
};
};
gunnerDoor="hatchG";
// Coaxial gun
memoryPointGun = "usti hlavne2";
selectionFireAnim = "zasleh2";
// Main gun
gunBeg = "usti hlavne";
gunEnd = "konec hlavne";
/// Weapons
weapons[]={rhs_weap_2a75,rhs_weap_pkt_bmd_coax, rhs_weap_PL1,rhs_weap_902a};
magazines[]=
{
rhs_mag_3bm42_10, rhs_mag_9m119rx_6,rhs_mag_3bk29_8,rhs_mag_3of26_6,rhs_mag_3d17_6,
rhs_mag_762x54mm_250,rhs_mag_762x54mm_250,rhs_mag_762x54mm_250,rhs_mag_762x54mm_250,
rhs_mag_762x54mm_250,rhs_mag_762x54mm_250,rhs_mag_762x54mm_250,rhs_mag_762x54mm_250,
rhs_lasermag
}; //
// Turret servos
maxHorizontalRotSpeed = 0.53;
maxVerticalRotSpeed = 0.12;
minElev=-5;
maxElev=+16;
initElev=10;
soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
startEngine=0;
// FCS
turretInfoType = "RHS_RscWeaponSprutSD_FCS";
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
// Optics view
memoryPointGunnerOptics= "gunnerview";
gunnerOutOpticsModel = "";
gunnerOutOpticsEffect[] = {};
gunnerOpticsEffect[] = {"TankGunnerOptics1", "WeaponsOptics", "OpticsCHAbera3"};
gunnerForceOptics = 1;
// Field of view values: 1 = 120?
class OpticsIn {
class DayMain: ViewOptics {
initAngleX=0;
minAngleX=-30;
maxAngleX=+30;
initAngleY=0;
minAngleY=-100;
maxAngleY=+100;
initFov=0.7/9;
minFov=0.7/9;
maxFov=0.7/9;
visionMode[] = {"Normal"};
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_sprut.p3d";
gunnerOpticsEffect[] = {};
};
class Rocket: DayMain {
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_1k113.p3d";
initFov=0.7/8;
minFov=0.7/8;
maxFov=0.7/8;
};
class Periscope: DayMain {
initFov = 0.466666;
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_tvn5.p3d";
gunnerOpticsEffect[] = {"TankGunnerOptics1","OpticsBlur2","OpticsCHAbera2"};
};
class night: daymain
{
initFov = 0.7/7;
minFov = 0.7/7;
maxFov = 0.7/7;
visionMode[] = {"NVG"};
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_empty";
};
};
// Gunner operations and animations
gunnerAction = mbt2_slot2a_out;
gunnerInAction = rhs_sprut_gunner;
forceHideGunner = 0;
inGunnerMayFire = 1; // set to 0 to let gunner look around the internal compartment if modeled
viewGunnerInExternal = 1; // Needed to make gunner possible to be killed with penetrating rounds.
class HitPoints {
class HitTurret {
armor = 0.5;
material = -1;
name = "vez";
visual="vez";
passThrough = 0;
minimalHit = 0.14;
explosionShielding=0.001;
radius = 0.25;
};
class HitGun {
armor = 0.6;
material = -1;
name = "zbran";
visual="";
passThrough = 0;
minimalHit = 0.13;
explosionShielding=0.001;
radius = 0.25;
};
};
class Reflectors {
class Right {
color[] = {1900, 1300, 950};
ambient[] = {5,5,5};
position = "R svetlo";
direction = "konec R svetla";
hitpoint = "R svetlo";
selection = "R svetlo";
size = 1;
innerAngle = 20;
outerAngle = 80;
coneFadeCoef = 8;
intensity = 1;
useFlare = 1;
dayLight = 0;
flareSize = 1.0;
class Attenuation
{
start = 1.0;
constant = 0;
linear = 0;
quadratic = 0.25;
hardLimitStart = 200;
hardLimitEnd = 300;
};
};
class Right2: Right {
direction = "konec R svetla";
useFlare = 1;
};
};
aggregateReflectors[] = {{"Right","Right2"}};
armorLights = 0.1;
};
};
/// Hidden selections for retexturability
/// - [0,1,2] = n1,n2,n3 => numbers
/// - 3 = i1 => insignia
hiddenSelections[] = {"n1","n2","n3","i1"};
hiddenSelectionsTextures[] =
{
"rhsafrf\addons\rhs_decals\Data\Labels\Misc\no_ca.paa",
"rhsafrf\addons\rhs_decals\Data\Labels\Misc\no_ca.paa",
"rhsafrf\addons\rhs_decals\Data\Labels\Misc\no_ca.paa",
"rhsafrf\addons\rhs_decals\Data\Labels\Misc\no_ca.paa"
};
// Damage textures - for sections: zbytek, vez, zbran, vezVelitele, zbranVelitele,
class Damage {
tex[] = {};
mat[] = {
"rhsafrf\addons\rhs_sprut\data\rhs_sprut_hull.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_dam_sprut_hull.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_destr_sprut_hull.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_sprut_turret.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_dam_sprut_turret.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_destr_sprut_turret.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_bmd34track.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_dam_bmd34track.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_destr_bmd34track.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_bmd34roadwheel.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_dam_bmd34roadwheel.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_destr_bmd34roadwheel.rvmat",
"a3\data_f\default.rvmat",
"a3\data_f\default.rvmat",
"a3\data_f\default_destruct.rvmat"
};
};
smokeLauncherGrenadeCount = 3;
smokeLauncherVelocity = 17;
smokeLauncherOnTurret = 1;
smokeLauncherAngle = 60;
class ViewOptics: ViewOptics {
visionMode[] = {"Normal","NVG"};
initFov = 0.7;
minFov = 0.7;
maxFov = 0.7;
};
class Exhausts
{
class Exhaust1
{
position = "exhaustl";
direction = "exhaustl_dir";
effect = "ExhaustEffectTankBack";
};
class Exhaust2
{
position = "exhaustr";
direction = "exhaustr_dir";
effect = "ExhaustEffectTankBack";
};
};
class Reflectors {
class Left {
color[] = {1900, 1300, 950};
ambient[] = {5,5,5};
position = "l svetlo";
direction = "konec l svetla";
hitpoint = "l svetlo";
selection = "L svetlo";
size = 1;
innerAngle = 30;
outerAngle = 100;
coneFadeCoef = 10;
intensity = 1; //17.5
useFlare = 0;
dayLight = 0;
flareSize = 1.0;
class Attenuation {
start = 1.0;
constant = 0;
linear = 0;
quadratic = 0.25;
hardLimitStart = 30;
hardLimitEnd = 60;
};
};
class Left2: Left {
direction = "konec l svetla";
useFlare = 1;
};
};
aggregateReflectors[] = {{"Left"}};
armorLights = 0.1;
class EventHandlers : DefaultEventhandlers
{
init = "_this call SLX_XEH_EH_Init;_this call compile preProcessFile '\rhsafrf\addons\rhs_c_sprut\scripts\rhs_sprut_init.sqf'";
fired = "_this call SLX_XEH_EH_Fired;_this spawn RHS_fnc_Sprut_autoloader; _this call (uinamespace getvariable 'RHS_fnc_effectFired')";
hitpart = "_this call SLX_XEH_EH_HitPart;_this call rhs_fnc_hitHandler";
};
class AnimationSources
{
class muzzle_rot_coax {source = "ammorandom"; weapon = "rhs_weap_pkt_bmd_coax";};
class recoil_source {source = "reload"; weapon = "rhs_weap_2a75";};
class muzzle_hide_cannon: recoil_source {};
class muzzle_rot_cannon: recoil_source
{
source="ammorandom";
};
class autoloader
{
source = "user";
animPeriod = 1.25; // seconds per mil
initPhase=0;
};
class elev {source="user";animperiod=16;};
class lead {source="user";animperiod=22;};
class smokecap_revolving_source
{
source = "revolving";
weapon = "rhs_weap_902a";
};
class hatchC
{
source="door";
animPeriod=0.80000001;
};
class HatchG: HatchC {};
class HatchD: HatchC {};
};
class UserActions
{
class LowerSusp
{
displayName = $STR_UA_LowerSusp;
position = "";
radius = 5;
condition = "(player == driver this) && (2 > speed this) && !(surfaceIsWater getPos this) && getmass this <19000";
//statement = "this setmass [18000*3,7];this setVelocity [0.01,0.01,0.01]";
statement = "this setmass [(getmass this)*5,6];this setVelocity [0.01,0.01,0.01]";
onlyForPlayer = true;
};
class RaiseSusp: LowerSusp
{
displayName = $STR_UA_RaiseSusp;
condition = "(player == driver this) && (2 > speed this) && !(surfaceIsWater getPos this) && getmass this >19000";
//statement = "this setmass [18000,7];this setVelocity [0.01,0.01,0.01]";
statement = "this setmass [18000,6];this setVelocity [0.01,0.01,0.01]";
};
};
class ViewPilot: ViewPilot
{
initAngleX = 7;
minAngleX = -15;
maxAngleX = 25;
initAngleY = 0;
minAngleY = -90;
maxAngleY = 90;
initFov = 0.7;
minFov = 0.7;
maxFov = 0.7;
};
};
/**
* @class rhs_sprut_vdv
* @brief VDV Sprut-SD
* @ingroup 2s25
*/
class rhs_sprut_vdv: rhs_a3spruttank_base
{
author = "RHS";
_generalMacro = "rhs_sprut_vdv";
scope = 2;
displayName = "$STR_SPRUT_Name";
};
/**
* @class rhs_bmd4_vdv
* @brief VDV BMD-4
* @ingroup bmd
*/
class rhs_bmd4_vdv: rhs_a3spruttank_base
{
author = "RHS";
_generalMacro = "rhs_bmd4_vdv";
vehicleClass = "rhs_vehclass_ifv";
scope = 2;
model = "\rhsafrf\addons\rhs_bmd_34\rhs_bmd_4.p3d"; // path to model
displayName = $STR_BMD4_Name; // as seen in the editor
#include "physx_config_BMD4.hpp"
Icon = "\rhsafrf\addons\rhs_bmd_34\data\icons\bmd4_mapicon_ca.paa";
mapSize = 6.5;
transportSoldier=5;
unloadInCombat = 1;
weapons[] = {"rhs_weap_smokegen"};
magazines[] = {"rhs_mag_smokegen"};
//ai will man those fake turrets yet those cargo places might be still manned using moveincargo
cargoAction[] ={"YouShallNotSitHere"};
cargoCompartments[] = {"Compartment3"};
class SpeechVariants
{
class Default
{
speechSingular[] = {"veh_vehicle_APC_s"};
speechPlural[] = {"veh_vehicle_APC_p"};
};
};
textSingular = "BMP";
textPlural = "BMPs";
nameSound = "veh_vehicle_APC_s";
class Turrets: Turrets
{
class MainTurret: MainTurret
{
class Turrets: Turrets
{
class CommanderOptics: CommanderOptics
{
// Animation class
body = "obsTurret";
gun = "obsGun";
gunnerDoor="hatchC";
// Animation source
animationSourceBody = "obsTurret";
animationSourceGun = "obsGun";
commanding = 5;
// Servos
maxHorizontalRotSpeed = 1.8; // 1 = 45?/sec
maxVerticalRotSpeed = 1.8; // 1 = 45?/sec
stabilizedInAxes = StabilizedInAxesBoth;
soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
minElev=-05;
maxElev=+60;
initElev=0;
minTurn=-360;
maxTurn=+360;
initTurn=0;
// Weapon and magazines
memoryPointGun = "usti hlavne3";
gunBeg = "usti hlavne3";
gunEnd = "konec hlavne3";
weapons[] = {}; // you may need different weapon class to provide firing effects emit from proper position.
magazines[] = {};
// FCS
turretInfoType = "RHS_RscWeaponESSA_commander_FCS";
discreteDistance[] = {};
discreteDistanceInitIndex = 0;
// Optics view
memoryPointGunnerOutOptics = "commanderview";
memoryPointGunnerOptics= "commanderview";
gunnerOpticsModel = "\A3\weapons_f\reticle\Optics_Commander_02_F";
gunnerOutOpticsModel = "";
gunnerOpticsEffect[] = {}; // post processing effets
gunnerHasFlares = 1; // flare visual effect when looking at light source
class ViewOptics: ViewOptics {
initAngleX=0;
minAngleX=-30;
maxAngleX=+30;
initAngleY=0;
minAngleY=-100;
maxAngleY=+100;
// Field of view values: 1 = 120?
initFov=0.155;
minFov=0.034;
maxFov=0.155;
visionMode[] = {"Normal","TI"};
thermalMode[] = {0};
};
class OpticsIn {
class Wide: ViewOptics {
initAngleX=0;
minAngleX=-30;
maxAngleX=+30;
initAngleY=0;
minAngleY=-100;
maxAngleY=+100;
initFov=0.7/3;
minFov=0.7/3;
maxFov=0.7/3;
visionMode[] = {"Normal","Ti"};
thermalMode[] = {0}; //WHOT
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_thermalscreen_empty.p3d";
};
class Medium: Wide {
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_thermalscreen_empty.p3d";
initFov=0.7/12;
minFov=0.7/12;
maxFov=0.7/12;
};
class Narrow: Wide {
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_thermalscreen_empty.p3d";
initFov=0.7/24;
minFov=0.7/24;
maxFov=0.7/24;
};
};
// Gunner operations
gunnerAction = mbt2_slot2b_out;
gunnerInAction = rhs_bmd4_commander_in;
gunnerGetInAction = GetInHigh;
gunnerGetOutAction = GetOutHigh;
startEngine = 0; // Turning this turret should not turn engine on.
viewGunnerInExternal = 1;
outGunnerMayFire = 1;
inGunnerMayFire = 1;
dontCreateAI=1;
class HitPoints {
class HitTurret {
armor = 0.7;
material = -1;
name = "vezVelitele";
visual="vezVelitele";
passThrough = 0;
minimalHit = 0.13;
explosionShielding=0.001;
radius = 0.12;
};
class HitGun {
armor = 0.7;
material = -1;
name = "zbranVelitele";
visual="zbranVelitele";
passThrough = 0;
minimalHit = 0.13;
explosionShielding=0.001;
radius = 0.12;
};
};
selectionFireAnim = "zasleh3";
};
};
gunnerDoor="hatchG";
// Coaxial gun
memoryPointGun = "usti hlavne2";
selectionFireAnim = "zasleh2";
// Main gun
gunBeg = "usti hlavne";
gunEnd = "konec hlavne";
/// Weapons
weapons[]={"rhs_weap_2a70", "rhs_weap_2a72", "rhs_weap_pkt_bmd_coax","rhs_weap_902a"};
/// Magazines
magazines[]={"rhs_mag_3UOF17_22", "rhs_mag_9m117_8", "rhs_mag_3uof8_340","rhs_mag_3ubr6_160","rhs_mag_9m113_4","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_3d17_6"};
// Turret servos
maxHorizontalRotSpeed = 0.55;
maxVerticalRotSpeed = 0.55;
minElev=-5;
maxElev=+20;
initElev=10;
soundServo[]= {"A3\Sounds_F\vehicles\armor\noises\servo_best", db-40, 1.0,50};
startEngine = 0;
// FCS
turretInfoType = "RHS_RscWeaponESSA_FCS";
discreteDistance[] = {};
discreteDistanceInitIndex = 0; // start at 600 meters
// Optics view
memoryPointGunnerOptics= "gunnerview";
gunnerOutOpticsModel = "";
gunnerOpticsEffect[] = {};
gunnerOutOpticsEffect[] = {"TankGunnerOptics1","BWTV"};
gunnerForceOptics = 1;
commanding = 3;
// Field of view values: 1 = 120?
class OpticsIn {
class Wide: ViewOptics {
initAngleX=0;
minAngleX=-30;
maxAngleX=+30;
initAngleY=0;
minAngleY=-100;
maxAngleY=+100;
initFov=0.7/3;
minFov=0.7/3;
maxFov=0.7/3;
visionMode[] = {"Normal","Ti"};
thermalMode[] = {0}; //WHOT
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_thermalscreen_empty.p3d";
};
class Medium: Wide {
initFov=0.7/12;
minFov=0.7/12;
maxFov=0.7/12;
};
class Narrow: Wide {
initFov=0.7/24;
minFov=0.7/24;
maxFov=0.7/24;
};
};
// Gunner operations and animations
gunnerAction = mbt2_slot2a_out;
gunnerInAction = rhs_bmd4_gunner_in;
forceHideGunner = 0;
inGunnerMayFire = 1; // set to 0 to let gunner look around the internal compartment if modeled
viewGunnerInExternal = 1; // Needed to make gunner possible to be killed with penetrating rounds.
class HitPoints {
class HitTurret {
armor = 0.5;
material = -1;
name = "vez";
visual="vez";
passThrough = 0;
minimalHit = 0.14;
explosionShielding=0.001;
radius = 0.25;
};
class HitGun {
armor = 0.6;
material = -1;
name = "zbran";
visual="";
passThrough = 0;
minimalHit = 0.13;
explosionShielding=0.001;
radius = 0.25;
};
};
class Reflectors {};
};
class GPMGTurret1 : NewTurret
{
proxyType = "CPGunner";
proxyIndex = 2;
body = "obsTurret2";
gun = "obsGun2";
animationSourceBody = "obsTurret2";
animationSourceGun = "obsGun2";
animationSourceHatch = "";
gunnerDoor="hatchCR";
selectionFireAnim = "zasleh3";
gunnerName = $STR_MGFrontRight;
hasGunner = 1;
dontCreateAI=1;
forceHideGunner = 1;
primaryObserver = 0;
primaryGunner = 0;
commanding = 1;
minElev = -10;
maxElev = 10;
minTurn = -10;
maxTurn = 10;
weapons[] = {"rhs_weap_pkt_bmd_bow1"};
magazines[] = {"rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250","rhs_mag_762x54mm_250"};
ejectDeadGunner = 0;
class CargoLight {
ambient[] = {0.6,0,0.15,1};
brightness = 0.007;
color[] = {0,0,0,0};
};
gunBeg = "muzzle2";
gunEnd = "end2";
memoryPointGun = "memoryPointGun2";
memoryPointGunnerOptics = "gunnerview3";
memoryPointsGetInGunner = "pos cargo R";
memoryPointsGetInGunnerDir = "pos cargo R dir";
gunnerAction = mbt2_slot2a_out;
gunnerInAction = rhs_bmd4_cargo_in;
gunnerGetInAction = GetInHigh;
gunnerGetOutAction = GetOutHigh;
viewGunnerInExternal = 1;
startEngine = 0; // Don't start engine when operate with gun
class Turrets {};
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_tnpp220a";
gunnerOpticsColor[] = {1, 1, 1, 1};
gunnerForceOptics = 1;
gunnerOpticsEffect[] = {"TankGunnerOptics1", "WeaponsOptics", "OpticsCHAbera3"};
class ViewOptics
{
initAngleX = 0;
minAngleX = -30;
maxAngleX = 30;
initAngleY = 0;
minAngleY = -100;
maxAngleY = 100;
opticsZoomMin = 0.166666;
opticsZoomMax = 0.166666;
distanceZoomMin = 200;
distanceZoomMax = 2000;
initFov = 0.166666;
minFov = 0.166666;
maxFov = 0.166666;
};
unloadInCombat = 1;
};
class LeftBack : NewTurret
{
proxyType = "CPGunner";
body = "LB_Seat_turret";
gun = "LB_Seat_Gun";
animationSourceBody = "LB_Seat_Turret";
animationSourceGun = "LB_Seat_Gun";
animationSourceHatch = "";
selectionFireAnim = "";
gunnerDoor="hatchCL";
minElev = 0;
maxElev = 0;
initTurn = 60;
minTurn = 60;
maxTurn = 60;
maxHorizontalRotSpeed = 0;
maxVerticalRotSpeed = 0;
proxyIndex = 4;
memoryPointsGetInGunner = "pos cargo L";
memoryPointsGetInGunnerDir = "pos cargo L dir";
gunnerName = $STR_CargoBackLeft;
commanding = 2;
gunBeg = "";
gunEnd = "";
memoryPointGun = "";
memoryPointGunnerOptics = "lseat_view";
gunnerAction = mbt2_slot2a_out;
gunnerInAction = rhs_bmd4_cargo_in;
gunnerGetInAction = GetInHigh;
gunnerGetOutAction = GetOutHigh;
weapons[] = {};
magazines[] = {};
forceHideGunner = 1;
hasGunner = 1;
dontCreateAI=1;
primaryGunner = 0;
primaryObserver = 0;
gunnerOpticsModel = "\rhsafrf\addons\rhs_optics\vehicles\rhs_tnpo170a";
gunnerOpticsColor[] = {1, 1, 1, 1};
gunnerForceOptics = 1;
startEngine = 0;
class ViewOptics
{
initAngleX = 0;
minAngleX = -110;
maxAngleX = 110;
initAngleY = 0;
minAngleY = -110;
maxAngleY = 110;
opticsZoomMin = 0.700000;
opticsZoomMax = 0.700000;
distanceZoomMin = 20;
distanceZoomMax = 2000;
initFov = 0.700000;
minFov = 0.700000;
maxFov = 0.700000;
};
unloadInCombat = 1;
viewGunnerInExternal = 1;
};
class RightBack : LeftBack
{
body = "RB_Seat_Turret";
gun = "RB_Seat_gun";
animationSourceBody = "RB_Seat_Turret";
animationSourceGun = "RB_Seat_Gun";
initTurn = -60;
minTurn = -60;
maxTurn = -60;
gunnerName = $STR_CargoBackRight;
memoryPointGunnerOptics = "rseat_view";
gunnerDoor="hatchCR";
commanding = 2;
proxyIndex = 5;
memoryPointsGetInGunner = "pos cargo R";
memoryPointsGetInGunnerDir = "pos cargo R dir";
};
class MainFront : LeftBack
{
body = "LF_Seat_turret";
gun = "LF_Seat_gun";
animationSourceBody = "LF_Seat_Turret";
animationSourceGun = "LF_Seat_Gun";
initTurn =0;
minTurn = 0;
maxTurn =0;
gunnerName = Front Cargo;
memoryPointGunnerOptics = "gunnerView2";
commanding = 1;
proxyIndex = 3;
};
};
class AnimationSources
{
class recoil_source {source = "reload"; weapon = "rhs_weap_2a70";};
class recoil_source2 {source = "reload"; weapon = "rhs_weap_2a72";};
class muzzle_hide_cannon: recoil_source {};
class muzzle_rot_cannon: recoil_source
{
source="ammorandom";
};
class smokecap_revolving_source
{
source = "revolving";
weapon = "rhs_weap_902a";
};
class muzzle_hide_hmg: recoil_source2 {};
class muzzle_rot_hmg: recoil_source2
{
source="ammorandom";
};
class muzzle_rot_mg1: muzzle_rot_hmg { weapon = "rhs_weap_pkt_bmd_coax";};
class muzzle_rot_mg2: muzzle_rot_hmg { weapon = "rhs_weap_pkt_bmd_bow1";};
class autoloader
{
source = "user";
animPeriod = 1.25; // seconds per mil
initPhase=0;
};
class elev {source="user";animperiod=16;};
class lead {source="user";animperiod=22;};
class hatchCL
{
source="door";
animPeriod=0.80000001;
};
class hatchCLB: hatchCL {};
class hatchCR: hatchCL {};
class HatchC: hatchCL {};
class HatchG: HatchC {};
class HatchD: HatchC {};
};
class Damage {
tex[] = {};
mat[] = {
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd3_01.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd3_01.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd3_01.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4_02.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4_02.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4_02.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4_03.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4_03.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4_03.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_bmd34track.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_dam_bmd34track.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_destr_bmd34track.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_bmd34roadwheel.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_dam_bmd34roadwheel.rvmat",
"rhsafrf\addons\rhs_sprut\data\rhs_destr_bmd34roadwheel.rvmat",
"a3\data_f\default.rvmat",
"a3\data_f\default.rvmat",
"a3\data_f\default_destruct.rvmat"
};
};
class UserActions
{
class LowerSusp
{
displayName = $STR_UA_LowerSusp;
position = "";
radius = 5;
condition = "(player == driver this) && (2 > speed this) && !(surfaceIsWater getPos this) && getmass this <15000";
statement = "this setmass [(getmass this)*4,7];this setVelocity [0.01,0.01,0.01]";
onlyForPlayer = true;
};
class RaiseSusp: LowerSusp
{
displayName = $STR_UA_RaiseSusp;
condition = "(player == driver this) && (2 > speed this) && !(surfaceIsWater getPos this) && getmass this >15000";
statement = "this setmass [(getmass this)/4,7];this setVelocity [0.01,0.01,0.01]";
};
};
class TransportMagazines
{
class _xx_30Rnd_545x39_AK
{
magazine = "rhs_30Rnd_545x39_7N10_AK";
count = "30*1";
};
class _xx_10Rnd_762x54_SVD
{
magazine = "rhs_10Rnd_762x54mmR_7N1";
count = "10*1";
};
class _xx_100Rnd_762x54_PK
{
magazine = "rhs_100Rnd_762x54mmR";
count = "3*1";
};
class _xx_SmokeShellRed
{
magazine = "rhs_mag_rdg2_white";
count = "2*1";
};
class _xx_HandGrenade_East
{
magazine = "rhs_mag_rgd5";
count = "9*1";
};
class _xx_1Rnd_HE_GP25
{
magazine = "rhs_VOG25";
count = "20*1";
};
class _xx_1Rnd_SMOKE_GP25
{
magazine = "rhs_vg40op_white";
count = "5*1";
};
class _xx_FlareWhite_GP25
{
magazine = "rhs_GRD40_white";
count = "5*1";
};
class _xx_RPG26
{
magazine = "rhs_rpg26_mag";
count = "2*1";
};
};
class TransportWeapons
{
class _xx_AK74M
{
weapon = "rhs_weap_ak74m";
count = 2;
};
class _xx_RPG26
{
weapon = "rhs_weap_rpg26";
count = 2;
};
};
class TransportItems
{
class _xx_FirstAidKit
{
name = "FirstAidKit";
count = 4;
};
class _xx_Medikit
{
name = "Medikit";
count = 1;
};
};
class TransportBackpacks
{
class _xx_rhs_sidor
{
backpack = "rhs_sidor";
count = 7;
};
};
class EventHandlers : EventHandlers
{
init = "_this call SLX_XEH_EH_Init;_this call compile preProcessFile '\rhsafrf\addons\rhs_c_sprut\scripts\rhs_sprut_init.sqf'";
fired = "_this call SLX_XEH_EH_Fired;_this spawn RHS_fnc_BMD4_autoloader; _this call (uinamespace getvariable 'RHS_fnc_effectFired')";
};
};
/**
* @class rhs_bmd4_vdv
* @brief VDV BMD-4M
* @ingroup bmd
*/
class rhs_bmd4m_vdv: rhs_bmd4_vdv
{
author = "RHS";
_generalMacro = "rhs_bmd4_vdv";
vehicleClass = "rhs_vehclass_ifv";
scope = 2;
#include "physx_config_BMD4M.hpp"
model = "\rhsafrf\addons\rhs_bmd_34\rhs_bmd_4m.p3d"; // path to model
displayName = $STR_BMD4M_Name; // as seen in the editor
class Turrets: Turrets
{
class MainTurret: MainTurret
{
class Turrets: Turrets
{
class CommanderOptics: CommanderOptics {};
};
};
class GPMGTurret1 : GPMGTurret1 {};
class GPMGTurret2 : GPMGTurret1
{
weapons[] = {"rhs_weap_pkt_bmd_bow2"};
body = "LF_Seat_turret";
gun = "LF_Seat_gun";
animationSourceBody = "LF_Seat_Turret";
animationSourceGun = "LF_Seat_Gun";
gunnerName = Left Hull Gunner;
memoryPointGunnerOptics = "gunnerView2";
commanding = 1;
gunnerDoor="hatchCL";
memoryPointsGetInGunner = "pos cargo L";
memoryPointsGetInGunnerDir = "pos cargo L dir";
memoryPointGun = "memoryPointGun3";
gunBeg = "muzzle3";
gunEnd = "end3";
selectionFireAnim = "zasleh4";
proxyIndex = 3;
};
class RightBack : RightBack {};
class LeftBack : LeftBack
{
gunnerDoor="hatchCLB";
memoryPointsGetInGunner = "pos gunner";
memoryPointsGetInGunnerDir = "pos gunner dir";
};
};
class Damage {
tex[] = {};
mat[] = {
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4_02.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4_02.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4_02.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4_03.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4_03.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4_03.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4m_01.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4m_01.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4m_01.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4m_01a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4m_01a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4m_01a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4m_02a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4m_02a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4m_02a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4m_a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4m_a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4m_a.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4m_t.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4m_t.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4m_t.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_bmd4m_w.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_dam_bmd4m_w.rvmat",
"rhsafrf\addons\rhs_bmd_34\data\rhs_destr_bmd4m_w.rvmat",
"a3\data_f\default.rvmat",
"a3\data_f\default.rvmat",
"a3\data_f\default_destruct.rvmat"
};
};
class Exhausts
{
class Exhaust1
{
position = "exhaustl";
direction = "exhaustl_dir";
effect = "ExhaustEffectTankSide";
};
class Exhaust2
{
position = "exhaustr";
direction = "exhaustr_dir";
effect = "ExhaustEffectTankSide";
};
};
class AnimationSources: AnimationSources
{
class muzzle_rot_mg3 {source="ammorandom"; weapon = "rhs_weap_pkt_bmd_bow2";};
class smokecap_revolving_source
{
source = "revolving";
weapon = "rhs_weap_902a";
};
};
};
/**
* @class rhs_bmd4ma_vdv
* @brief VDV BMD-4M Armored
* @ingroup bmd
*/
class rhs_bmd4ma_vdv: rhs_bmd4m_vdv
{
author = "RHS";
_generalMacro = "rhs_bmd4_vdv";
vehicleClass = "rhs_vehclass_ifv";
scope = 2;
model = "\rhsafrf\addons\rhs_bmd_34\rhs_bmd_4ma.p3d"; // path to model
displayName = $STR_BMD4MA_Name; // as seen in the editor
};
};
|
ajvorobiev/DocForge
|
DocForge/mergetest/addon2/config.cpp
|
C++
|
mit
| 46,360 |
using Aspose.BarCode.Generation;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Aspose.BarCode.Examples.CSharp.ManageBarCodes
{
class BorderWidth
{
public static void Run()
{
// ExStart:BorderWidth
// For complete examples and data files, please go to https://github.com/aspose-barcode/Aspose.BarCode-for-.NET
// Instantiate barcode object and Set border width
BarcodeGenerator generator = new BarcodeGenerator(EncodeTypes.Code93Standard);
generator.Parameters.Border.Width.Millimeters = 0.5f;
// ExEnd:BorderWidth
}
}
}
|
asposebarcode/Aspose_BarCode_NET
|
Examples/CSharp/ManageBarCodes/BorderWidth.cs
|
C#
|
mit
| 685 |
---
title: XP in the Wild
author: Josh
date: 2014-08-14 11:49
template: article.jade
---
[<img class="img-responsive img-rounded" src="/articles/xp-in-the-wild/img.jpg" title="XP in the Wild">](/articles/xp-in-the-wild/img.jpg)
This is a photo of one of the directories at the Orlando outlet mall. These are large television screens outside that give you directions and show ads. The image is not the best (click to enlarge), but it says that the Windows XP End of Support was four months ago. The fact that the alert is dated in April and I took this in August shows how little they care. I'd like to know how long it will take for them to get updated.
|
JoshTheGeek/joshuaoldenburg.com
|
contents/articles/xp-in-the-wild/index.md
|
Markdown
|
mit
| 656 |
@charset "UTF-8";
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: url('../fonts/roboto-v15-latin-regular.eot');
/* IE9 Compat Modes */
src: local('Roboto'), local('Roboto-Regular'), url('../fonts/roboto-v15-latin-regular.eot?#iefix') format('embedded-opentype'),
/* IE6-IE8 */
url('../fonts/roboto-v15-latin-regular.woff2') format('woff2'),
/* Super Modern Browsers */
url('../fonts/roboto-v15-latin-regular.woff') format('woff'),
/* Modern Browsers */
url('../fonts/roboto-v15-latin-regular.ttf') format('truetype'),
/* Safari, Android, iOS */
url('../fonts/roboto-v15-latin-regular.svg#Roboto') format('svg');
/* Legacy iOS */
}
/* ----------------------------------------------------------------------------------------------------- */
html {
height: 100%;
}
body {
margin: 0px;
min-height: 100%;
padding: 0;
overflow-x: hidden;
overflow-y: auto;
font-family: 'Roboto', "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: normal;
color: #404C51;
-webkit-font-smoothing: antialiased;
font-size: 1em;
}
#layout-topbar {
background-color: #20272a;
box-sizing: border-box;
display: block;
padding: 0;
height: 70px;
box-sizing: border-box;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 999999;
-moz-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.3);
}
#layout-topbar .menu-button {
display: none;
color: #ffffff;
font-size: 24px;
position: absolute;
left: 0;
top: 0;
width: 60px;
height: 60px;
line-height: 58px;
text-align: center;
transition: background-color .3s;
}
#layout-topbar .menu-button:hover {
background-color: #4a4f52;
}
#layout-topbar .menu-button i {
line-height: inherit;
}
#layout-topbar .logo {
margin-left: 45px;
margin-top: 15px;
display: inline-block;
}
#layout-topbar .logo img {
height: 42px;
}
.topbar-menu {
display: inline-block;
list-style-type: none;
float: right;
margin: 0 60px 0 0;
padding: 0;
height: 100%;
}
.topbar-menu > li {
display: inline-block;
height: 100%;
}
.topbar-menu > li > a {
text-decoration: none;
color: #ffffff;
transition: background-color .3s;
min-width: 120px;
display: inline-block;
text-align: center;
box-sizing: border-box;
height: 100%;
line-height: 70px;
}
.topbar-menu > li > a:hover {
background-color: #4a4f52;
}
.topbar-menu > li > ul {
display: none;
}
.topbar-menu > li.topbar-menu-themes {
position: relative;
}
.topbar-menu > li.topbar-menu-themes > ul {
position: absolute;
top: 65px;
left: -50px;
width: 200px;
max-height: 300px;
background-color: #ffffff;
-moz-box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.3);
overflow: auto;
list-style-type: none;
padding: 15px 0;
margin: 0;
border-radius: 3px;
-webkit-animation-name: fadeInDown;
animation-name: fadeInDown;
animation-duration: .5s;
}
.topbar-menu > li.topbar-menu-themes > ul > li.topbar-submenu-header {
padding: 6px 12px;
font-weight: bold;
text-align: left;
background-image: linear-gradient(to left, #2bc0ec, #1b81d7);
color: #ffffff;
}
.topbar-menu > li.topbar-menu-themes > ul a {
text-decoration: none;
color: #404C51;
padding: 6px 12px;
display: block;
transition: all 0.5s ease;
}
.topbar-menu > li.topbar-menu-themes > ul a:hover {
background-color: #eeeeee;
}
.topbar-menu > li.topbar-menu-themes > ul a img {
width: 32px;
vertical-align: middle;
}
.topbar-menu > li.topbar-menu-themes > ul a .ui-text {
vertical-align: middle;
margin-left: 8px;
}
.topbar-menu > li.topbar-menu-themes:hover > ul {
display: block;
}
/* Sidebar */
#layout-sidebar {
position: fixed;
left: 0;
top: 70px;
height: 100%;
background-color: #ffffff;
overflow: hidden;
width: 300px;
-moz-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
-webkit-box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
}
#layout-sidebar .layout-menu > a {
width: 100%;
height: 50px;
display: block;
padding: 15px 0px 0px 25px;
cursor: pointer;
border-top: solid 1px #e3e9ea;
box-sizing: border-box;
}
#layout-sidebar .layout-menu > a.active-menuitem {
background-color: #ffffff !important;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#layout-sidebar .layout-menu > a.active-menuitem > span {
color: #1b82d7;
}
#layout-sidebar .layout-menu > a.active-menuitem img.layout-menu-icon-active {
display: inline;
}
#layout-sidebar .layout-menu > a.active-menuitem img.layout-menu-icon-inactive {
display: none;
}
#layout-sidebar .layout-menu > a:hover {
background-color: #eeeeee;
-webkit-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
-ms-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
transition: all 0.5s ease;
}
#layout-sidebar .layout-menu > a img {
width: 20px;
height: auto;
float: left;
}
#layout-sidebar .layout-menu > a img.layout-menu-icon-active {
display: none;
}
#layout-sidebar .layout-menu > a img.layout-menu-icon-inactive {
display: inline;
}
#layout-sidebar .layout-menu > a span {
color: #6d7879;
font-size: 16px;
margin: 0px 0px 0px 30px;
display: block;
}
#layout-sidebar .layout-menu > div {
width: auto;
padding: 20px 15px;
overflow: hidden;
background-color: #ffffff;
}
#layout-sidebar .layout-menu > div.submenuhide {
overflow: hidden;
max-height: 0;
padding-top: 0;
padding-bottom: 0;
margin-top: 0;
margin-bottom: 0;
-moz-transition-duration: 0.3s;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
transition-duration: 0.3s;
-moz-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
-webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
-o-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
}
#layout-sidebar .layout-menu > div.submenushow {
-moz-transition-duration: 0.3s;
-webkit-transition-duration: 0.3s;
-o-transition-duration: 0.3s;
transition-duration: 0.3s;
-moz-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
-webkit-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
-o-transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
transition-timing-function: cubic-bezier(0.86, 0, 0.07, 1);
max-height: 500px;
}
#layout-sidebar .layout-menu > div a {
width: 50%;
float: left;
padding: 6px;
box-sizing: border-box;
cursor: pointer;
border-radius: 4px;
-webkit-border-radius: 4px;
font-size: 14px;
color: #6d7879;
}
#layout-sidebar .layout-menu > div a:hover {
background-color: #eeeeee;
}
#layout-sidebar .layout-menu {
overflow: auto;
height: calc(100% - 70px);
}
#layout-content {
margin-left: 300px;
padding-top: 70px;
background-color: #ffffff;
}
.layout-mask {
z-index: 999997;
width: 100%;
height: 100%;
position: fixed;
top: 100px;
left: 0;
display: none;
background-color: #4c5254;
opacity: .7;
}
.content-section {
display: block;
border-bottom: solid 1px #dde3e6;
padding: 30px;
overflow: hidden;
background-color: #f5f7f8;
}
.content-section.introduction {
background-image: linear-gradient(to left, #2bc0ec, #1b81d7);
color: #ffffff;
}
.content-section:first-of-type > div > span {
line-height: 1.5em;
}
.content-section h2 {
margin-top: 0;
}
.feature-title {
font-size: 30px;
margin-bottom: 20px;
display: block;
}
.layout-footer {
font-size: 14px;
color: #84939f;
}
.layout-footer .footer-links {
float: right;
font-size: 24px;
}
.layout-footer .footer-links a {
color: #000000;
margin-left: 16px;
}
/* Demos */
.implementation {
background-color: #FFFFFF;
overflow: visible;
}
.implementation > h3 {
margin-top: 30px;
color: #5C666A;
}
.implementation h3.first {
margin-top: 0px !important;
}
.implementation h4 {
color: #5C666A;
}
.SubSubMenu {
padding: 15px 30px;
}
.SubSubMenu ul {
margin: 0;
padding: 0;
width: 100%;
}
.SubSubMenu ul li {
list-style: none;
width: 20%;
float: left;
margin-top: 5px;
}
.SubSubMenu ul li a:hover {
color: #229be0
}
/* Documentation Section */
.documentation .ui-tabview-panel {
color: #404C51 !important;
}
.documentation h3 {
margin-top: 25px;
margin-bottom: 0px;
font-size: 24px;
font-weight: normal;
}
.documentation h4 {
margin-top: 25px;
margin-bottom: 0px;
font-size: 20px;
font-weight: normal;
}
.documentation p {
font-size: 16px;
line-height: 24px;
margin: 10px 0;
opacity: .90;
}
.documentation .doc-tablewrapper {
margin: 10px 0;
}
.documentation a {
color: #0273D4;
}
.documentation .btn-viewsource {
background-color: #444444;
padding: .5em;
border-radius: 2px;
color: #ffffff;
font-weight: bold;
margin-bottom: 1em;
display: inline-block;
transition: background-color .3s;
}
.documentation .btn-viewsource i {
margin-right: .25em;
}
.documentation .btn-viewsource:hover {
background-color: #595959;
}
/* Tabs Source */
.documentation .ui-tabview {
background: none;
border: 0 none;
color: #5C666A;
font-weight: lighter;
-moz-border-radius: 4px !important;
-webkit-border-radius: 4px !important;
border-radius: 4px !important;
}
.documentation .ui-tabview .ui-tabview-nav {
background: #1976D2 !important;;
margin-bottom: -1px;
padding: 3px 3px 0px 3px !important;
border-top-right-radius: 4px !important;
border-top-left-radius: 4px !important;
border-bottom-right-radius: 0px;
border-bottom-left-radius: 0px;
}
.documentation .ui-tabview .ui-tabview-nav li,
.documentation .ui-tabview .ui-tabview-nav li.ui-state-hover {
border: 0px none !important;
background: #3F94E9 !important;;
border-color: #3F94E9 !important;;
box-shadow: none !important;
border-top-right-radius: 4px !important;
border-top-left-radius: 4px !important;
}
.documentation .ui-tabview .ui-tabview-nav li a {
padding: .5em 1em !important;
}
.documentation .ui-tabview .ui-tabview-nav li.tab-doc {
margin-right: 0;
}
.documentation .ui-tabview .ui-tabview-nav li.ui-state-default a {
color: #fff !important;
font-weight: normal !important;
text-shadow: none ;
}
.documentation .ui-tabview .ui-tabview-nav li.ui-state-active a {
color: #5C666A !important;
font-weight: normal !important;
}
.documentation .ui-tabview .ui-tabview-nav li.ui-state-hover {
box-shadow: none !important;;
}
.documentation .ui-tabview .ui-tabview-nav li.ui-tabview-selected {
background: #F5F6F7 !important;
}
.documentation .ui-tabview .ui-tabview-panels {
border-top: 1px solid #F5F6F7 !important;;
color: #5C666A !important;
background: #F5F6F7;
}
.documentation .ui-tabview.ui-tabview-top > .ui-tabview-nav li {
top: 0px !important;
}
/* Docs Table */
.doc-table {
border-collapse: collapse;
width: 100%;
}
.doc-table th {
background-color: #dae8ef;
color: #404C51;
border: solid 1px #C1D5DF;
padding: 5px;
font-size: 16px;
text-align: left;
}
.doc-table tbody td {
color: #404C51;
padding: 4px 10px;
border: 1px solid #E5EBF0;
font-size: 15px;
opacity: .90;
}
.doc-table tbody tr:nth-child(even) {
background-color: #FBFCFD;
}
.doc-table tbody tr:nth-child(odd) {
background-color: #F3F6F9;
}
@media screen and (max-width: 64em) {
.layout-mask {
display: block;
}
#layout-topbar {
text-align: center;
}
#layout-topbar .menu-button {
display: inline-block;
}
#layout-topbar .logo {
margin: 7px 0 7px 0;
}
.topbar-menu {
background-color: #363c3f;
float: none;
width: 100%;
height: 40px;
margin: 0;
text-align: center;
}
.topbar-menu > li > a {
padding-bottom: 0;
line-height: 40px;
min-width: 100px;
}
.topbar-menu > li.topbar-menu-themes > ul {
top: 40px;
}
#layout-sidebar {
top: 100px;
left: -300px;
transition: left .3s;
z-index: 999998;
}
#layout-sidebar.active {
left: 0;
}
#layout-content {
margin-left: 0;
padding-top: 100px;
}
.topbar-menu > li.topbar-menu-themes > ul {
text-align: left;
}
.home .introduction > div {
width: 100%;
}
.home .features > div {
width: 100%;
}
.home .whouses > div {
width: 100%;
}
.home .templates > div {
width: 100%;
}
.home .prosupport > div {
width: 100%;
text-align: center;
}
.home .book > div {
width: 100%;
}
.home .book .ui-g-12:last-child,
.home .book .ui-g-12:first-child {
text-align: center !important;
}
.home .testimonials > div {
width: 100%;
}
.support .support-image {
text-align: center;
}
.support .support-image .ui-md-6:last-child {
text-align: center;
padding-top: 2em;
}
.SubSubMenu ul li {
width: 50%;
}
}
@media (max-width: 768px) {
.doc-table tbody td {
word-break: break-word;
}
}
/* Code Styles */
pre {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
font-family: Courier, 'New Courier', monospace;
font-size: 14px;
border-radius: 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
padding: 1em;
background-color: #CFD8DC;
color: #404C51;
margin: 10px 0px;
}
.ui-tabview-left > .ui-tabview-nav {
height: 150px;
}
.col-button {
width: 10%;
text-align: center;
}
.col-icon {
width: 38px;
text-align: center;
}
.whouses {
background: #ffffff;
}
.whouses img {
width: 100%;
}
.ui-growl {
top: 100px;
}
a {
text-decoration: none;
color: #1b82d7;
}
/* Animation */
@-webkit-keyframes fadeInDown {
from {
opacity: 0;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
to {
opacity: 1;
-webkit-transform: none;
transform: none;
}
}
@keyframes fadeInDown {
from {
opacity: 0;
transform: translate3d(0, -20px, 0);
}
to {
opacity: 1;
transform: none;
}
}
@-webkit-keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
}
@keyframes fadeOutUp {
from {
opacity: 1;
}
to {
opacity: 0;
-webkit-transform: translate3d(0, -20px, 0);
transform: translate3d(0, -20px, 0);
}
}
/* Introduction */
.home p {
line-height: 1.5;
}
.home h3 {
font-size: 1.5em;
}
.home-button {
font-weight: bold;
background-color: #FBD17B;
color: #B27800;
padding: 8px 14px;
border-radius: 3px;
transition: background-color .3s;
display: inline-block;
min-width: 120px;
text-align: center;
}
.home-button:hover {
background-color: #f9c55a;
}
.home .introduction {
background-color: #1976d2;
background: url('../images/home/introduction.jpg');
background-repeat: no-repeat;
background-size: cover;
color: #ffffff;
padding: 80px 30px 80px 50px;
}
.home .introduction > div {
padding: 100px 100px 0 100px;
height: 200px;
}
.home .introduction img {
width: 480px;
position: absolute;
bottom: 0;
right: 0;
}
.home .introduction h1 {
font-weight: normal;
margin-bottom: 5px;
}
.home .introduction h2 {
font-weight: bold;
margin-bottom: 40px;
margin-top: 0;
}
/* Features */
.home .features {
background-color: #f5f7f8;
text-align: center;
padding: 30px;
}
.home .features h3 {
margin-bottom: 10px;
}
.home .features p {
margin-bottom: 30px;
}
.home .features p.features-tagline {
margin-bottom: 0;
margin-top: -5px;
}
.home .features p.features-description {
text-align: left;
}
.home .features .feature-name {
display: block;
font-size: 18px;
margin-top: 4px;
}
.home .features .ui-g p {
color: #535d62;
font-size: 14px;
margin-bottom: 30px;
}
.home .features .ui-g > div {
padding: .5em 2em;
}
.home .features img {
width: 57px;
}
/* Who Uses */
.home .whouses {
background-color: #20272a;
color: #ffffff;
text-align: center;
padding: 30px;
}
.home .whouses h3 {
margin-bottom: 10px;
}
.home .whouses p {
margin-bottom: 30px;
}
.home .whouses .ui-g > div {
padding: 1em .5em;
}
.home .whouses img {
height: 30px;
}
.home .testimonials {
border-top: 1px solid #4c5254;
padding-top: 20px;
margin-top: 30px;
}
.home .testimonials h3 {
margin-bottom: 10px;
}
.home .testimonials p {
font-size: 14px;
line-height: 1.5;
}
/* Book */
.home .book {
background-color: #1976d2;
padding: 30px;
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.3);
color: #ffffff;
}
.home .book .ui-g-12:last-child {
text-align: right;
}
.home .book .ui-g-12:first-child {
text-align: center;
}
.home .book img {
width: 200px;
-webkit-box-shadow: 0 10px 20px rgba(0,0,0,0.5);
-moz-box-shadow: 0 10px 20px rgba(0,0,0,0.5);
box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}
/* Templates */
.home .templates {
background-color: #f5f7f8;
text-align: center;
padding: 30px;
}
.home .templates h3 {
margin-bottom: 10px;
}
.home .templates img {
width: 100%;
}
.home .templates .ui-g > div {
padding: 1em;
}
.home .templates .ui-g > div img {
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.3);
transition: all .5s;
}
.home .templates .ui-g > div a:hover img {
-webkit-transform: scale(1.05);
-moz-transform: scale(1.05);
-o-transform: scale(1.05);
-ms-transform: scale(1.05);
transform: scale(1.05);
}
/* PRO */
.home .prosupport,
.support-image {
background-color: #20272a;
padding: 30px;
color: #ffffff;
}
.support-image .ui-md-6:last-child {
text-align: right;
}
.support li {
line-height: 1.5;
}
.home .prosupport p {
font-size: 14px;
line-height: 1.5;
}
.home .prosupport .ui-md-6:last-child {
text-align: center;
}
.home .prosupport .home-button {
margin-top: 10px;
}
.support p {
line-height: 1.5;
}
|
kcjonesevans/primeng
|
src/assets/showcase/css/site.css
|
CSS
|
mit
| 19,201 |
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
tags = db.Table(
'post_tags',
db.Column('post_id', db.Integer, db.ForeignKey('post.id')),
db.Column('tag_id', db.Integer, db.ForeignKey('tag.id'))
)
class User(db.Model):
id = db.Column(db.Integer(), primary_key=True)
username = db.Column(db.String(255))
password = db.Column(db.String(255))
posts = db.relationship('Post', backref='user', lazy='dynamic')
def __init__(self, username):
self.username = username
def __repr__(self):
return '<User {}>'.format(self.username)
class Post(db.Model):
id = db.Column(db.Integer(), primary_key=True)
title = db.Column(db.String(255))
text = db.Column(db.Text())
publish_date = db.Column(db.DateTime())
user_id = db.Column(db.Integer(), db.ForeignKey('user.id'))
comments = db.relationship(
'Comment',
backref='post',
lazy='dynamic'
)
tags = db.relationship(
'Tag',
secondary=tags,
backref=db.backref('posts', lazy='dynamic')
)
def __init__(self, title):
self.title = title
def __repr__(self):
return "<Post '{}'>".format(self.title)
class Comment(db.Model):
id = db.Column(db.Integer(), primary_key=True)
name = db.Column(db.String(255))
text = db.Column(db.Text())
date = db.Column(db.DateTime())
post_id = db.Column(db.Integer(), db.ForeignKey('post.id'))
def __repr__(self):
return "<Comment '{}'>".format(self.text[:15])
class Tag(db.Model):
id = db.Column(db.Integer(), primary_key=True)
title = db.Column(db.String(255))
def __init__(self, title):
self.title = title
def __repr__(self):
return "<Tag '{}'>".format(self.title)
|
nikitabrazhnik/flask2
|
Module 3/Chapter05/chapter_5/webapp/models.py
|
Python
|
mit
| 1,776 |
<div class="login-page">
<div class="row">
<div class="col-md-4 col-lg-4 col-md-offset-4 col-lg-offset-4"> <img src="img/avatar.jpg" class="user-avatar">
<h1>Science Documents <br \><small>Library Management System</small></h1>
<form role="form" ng-submit="register()">
<div class="form-content">
<div class="form-group">
<input type="text" class="form-control input-underline input-lg" placeholder="Username" ng-model="username">
</div>
<div class="form-group">
<input type="text" class="form-control input-underline input-lg" placeholder="Email" ng-model="email">
</div>
<div class="form-group">
<input type="password" class="form-control input-underline input-lg" placeholder="Password" ng-model="password">
</div>
<div class="form-group">
<input type="password" class="form-control input-underline input-lg" placeholder="Re-type Password" ng-model="retypepwd">
</div>
</div>
<button type="submit" class="btn btn-sm btn-info">Register</button>
</form>
If you have got an account, you can <a href="#/login" tooltip="I'm a tooltip!">login</a> to using the system!
</div>
</div>
</div>
|
tranduong/documentlib-client
|
src/templates/register/registeruser.html
|
HTML
|
mit
| 1,199 |
import { createStore, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import reducers from '../reducers';
const logger = (store) => (next) => (action) => {
if(typeof action !== "function"){
console.log('dispatching:', action);
}
return next(action);
}
const aircheapStore = createStore(
reducers,
applyMiddleware(logger, thunk)
);
export default aircheapStore;
|
pro-react/sample-code
|
chapter 6 (Redux)/aircheap/app/store/aircheapStore.js
|
JavaScript
|
mit
| 396 |
# Change Log
## [2.4.1] - February 20 2016
- Documented previously created/fixed bug #122 (thanks @jasonrhodes)
- Improved Makefile and test runner docs thanks (@kevinburke)
- fixed bug documented in #121 where pool could make incorrect decisions about which resources were eligible for removal. (thanks @mikemorris)
## [2.4.0] - January 18 2016
- Merged #118 - closes #110 - optional eslinting for test and lib using "standard" ruleset
- Merged #114 - closes #113 - "classes" now used internally instead of object literals and exports support being called as a constructor (along with old factory behaviour) (contributed by @felixfbecker)
- Move history from README.md to CHANGELOG.md and reformat
- Closes #122 - fixes trapped connection bug when destroying a connection while others are in use
## [2.3.1] - January 7 2016
- Documentation fixes and widened number of nodejs versions tested on travis
## [2.3.0] - January 1 2016
- Merged #105 - allow asynchronous validate functions (contributed by @felipou)
## [2.2.2] - December 13 2015
- Merged #106 - fix condition where non "resource pool" created objects could be returned to the pool. (contributed by @devzer01)
## [2.2.1] - October 30 2015
- Merged #104 - fix #103 - condition where pool can create > specified max number of connections (contributed by @devzer01)
## [2.2.0] - March 26 2015
- Merged #92 - add getMaxPoolSize function (contributed by platypusMaximus)
## [2.1.1] - July 5 2015
- fix README error about priority queueing (spotted by @kmdm)
## [2.1.0] - June 19 2014
- Merged #72 - Add optional returnToHead flag, if true, resources are returned to head of queue (stack like behaviour) upon release (contributed by calibr), also see #68 for further discussion.
## [2.0.4] - July 27 2013
- Merged #64 - Fix for not removing idle objects (contributed by PiotrWpl)
## [2.0.3] - January 16 2013
- Merged #56/#57 - Add optional refreshIdle flag. If false, idle resources at the pool minimum will not be destroyed/re-created. (contributed by wshaver)
- Merged #54 - Factory can be asked to validate pooled objects (contributed by tikonen)
## [2.0.2] - October 22 2012
- Fix #51, #48 - createResource() should check for null clientCb in err case (contributed by pooyasencha)
- Merged #52 - fix bug of infinite wait when create object aync error (contributed by windyrobin)
- Merged #53 - change the position of dispense and callback to ensure the time order (contributed by windyrobin)
## [2.0.1] - August 29 2012
- Fix #44 - leak of 'err' and 'obj' in createResource()
- Add devDependencies block to package.json
- Add travis-ci.org integration
## [2.0.0] - July 31 2012
- Non-backwards compatible change: remove adjustCallback
- acquire() callback must accept two params: (err, obj)
- Add optional 'min' param to factory object that specifies minimum number of resources to keep in pool
- Merged #38 (package.json/Makefile changes - contributed by strk)
## [1.0.12] - June 27 2012
- Merged #37 (Clear remove idle timer after destroyAllNow - contributed by dougwilson)
## [1.0.11] - June 17 2012
- Merged #36 ("pooled" method to perform function decoration for pooled methods - contributed by cosbynator)
## [1.0.10] - May 3 2012
- Merged #35 (Remove client from availbleObjects on destroy(client) - contributed by blax)
## [1.0.9] - Dec 18 2011
- Merged #25 (add getName() - contributed by BryanDonovan)
- Merged #27 (remove sys import - contributed by botker)
- Merged #26 (log levels - contributed by JoeZ99)
## [1.0.8] - Nov 16 2011
- Merged #21 (add getter methods to see pool size, etc. - contributed by BryanDonovan)
## [1.0.7] - Oct 17 2011
- Merged #19 (prevent release on the same obj twice - contributed by tkrynski)
- Merged #20 (acquire() returns boolean indicating whether pool is full - contributed by tilgovi)
## [1.0.6] - May 23 2011
- Merged #13 (support error variable in acquire callback - contributed by tmcw)
- Note: This change is backwards compatible. But new code should use the two parameter callback format in pool.create() functions from now on.
- Merged #15 (variable scope issue in dispense() - contributed by eevans)
## [1.0.5] - Apr 20 2011
- Merged #12 (ability to drain pool - contributed by gdusbabek)
## [1.0.4] - Jan 25 2011
- Fixed #6 (objects reaped with undefined timeouts)
- Fixed #7 (objectTimeout issue)
## [1.0.3] - Dec 9 2010
- Added priority queueing (thanks to sylvinus)
- Contributions from Poetro
- Name changes to match conventions described here: http://en.wikipedia.org/wiki/Object_pool_pattern
- borrow() renamed to acquire()
- returnToPool() renamed to release()
- destroy() removed from public interface
- added JsDoc comments
- Priority queueing enhancements
## [1.0.2] - Nov 9 2010
- First NPM release
[unreleased]: https://github.com/coopernurse/node-pool/compare/v2.4.1...HEAD
[2.4.1]: https://github.com/coopernurse/node-pool/compare/v2.4.0...v2.4.1
[2.4.0]: https://github.com/coopernurse/node-pool/compare/v2.3.1...v2.4.0
[2.3.1]: https://github.com/coopernurse/node-pool/compare/v2.3.0...v2.3.1
[2.3.0]: https://github.com/coopernurse/node-pool/compare/v2.2.2...v2.3.0
[2.2.2]: https://github.com/coopernurse/node-pool/compare/v2.2.1...v2.2.2
[2.2.1]: https://github.com/coopernurse/node-pool/compare/v2.2.0...v2.2.1
[2.2.0]: https://github.com/coopernurse/node-pool/compare/v2.1.1...v2.2.0
[2.1.1]: https://github.com/coopernurse/node-pool/compare/v2.1.0...v2.1.1
[2.1.0]: https://github.com/coopernurse/node-pool/compare/v2.0.4...v2.1.0
[2.0.4]: https://github.com/coopernurse/node-pool/compare/v2.0.3...v2.0.4
[2.0.3]: https://github.com/coopernurse/node-pool/compare/v2.0.2...v2.0.3
[2.0.2]: https://github.com/coopernurse/node-pool/compare/v2.0.1...v2.0.2
[2.0.1]: https://github.com/coopernurse/node-pool/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/coopernurse/node-pool/compare/v1.0.12...v2.0.0
|
an-huynh/Block-and-Talk
|
node_modules/sequelize/node_modules/generic-pool/CHANGELOG.md
|
Markdown
|
mit
| 5,886 |
package com.sentenial.rest.client.api.directdebit.dto;
import java.util.Date;
import com.sentenial.rest.client.api.common.resource.PagingRequestParameters;
import com.sentenial.rest.client.utils.DateUtils;
public class ListFailedDirectDebitRequestParameters extends PagingRequestParameters{
private Date rejectCreateFrom;
private Date rejectCreateTo;
private Boolean technicalRejects;
public String generateRequestParamsString(){
StringBuilder builder = new StringBuilder();
if (rejectCreateFrom != null){
builder.append("rejectcreatefrom=" + DateUtils.fromDate(rejectCreateFrom) + "&");
}
if (rejectCreateTo != null){
builder.append("rejectcreateto=" + DateUtils.fromDate(rejectCreateTo) + "&");
}
if (technicalRejects != null){
builder.append("technicalrejects=" + technicalRejects + "&");
}
String paging = super.generatePagingRequestParamsString();
if (paging != null){
builder.append(paging);
}
if (builder.length() > 0){
builder.insert(0, "?");
if (builder.charAt(builder.length() - 1) == '&') {
builder.deleteCharAt(builder.length() - 1);
}
}
return builder.toString();
}
public ListFailedDirectDebitRequestParameters withRejectCreateFrom(Date rejectCreateFrom) {
this.rejectCreateFrom = rejectCreateFrom;
return this;
}
public ListFailedDirectDebitRequestParameters withRejectCreateTo(Date rejectCreateTo) {
this.rejectCreateTo = rejectCreateTo;
return this;
}
public ListFailedDirectDebitRequestParameters withTechnicalRejects(Boolean technicalRejects) {
this.technicalRejects = technicalRejects;
return this;
}
public Date getRejectCreateFrom() {
return rejectCreateFrom;
}
public void setRejectCreateFrom(Date rejectCreateFrom) {
this.rejectCreateFrom = rejectCreateFrom;
}
public Date getRejectCreateTo() {
return rejectCreateTo;
}
public void setRejectCreateTo(Date rejectCreateTo) {
this.rejectCreateTo = rejectCreateTo;
}
public Boolean getTechnicalRejects() {
return technicalRejects;
}
public void setTechnicalRejects(Boolean technicalRejects) {
this.technicalRejects = technicalRejects;
}
}
|
sentenial/nuapay-rest-client
|
src/main/java/com/sentenial/rest/client/api/directdebit/dto/ListFailedDirectDebitRequestParameters.java
|
Java
|
mit
| 2,228 |
package io.github.rhildred;
import java.sql.*;
import org.json.simple.*;
import java.util.*;
import java.io.*;
public class ResultSetValue {
public static String toJsonString(ResultSet oRs) throws SQLException{
//get metadata about SQL, which could be anything
ResultSetMetaData oMd = oRs.getMetaData();
int nCols = oMd.getColumnCount();
//make a list to hold results
List<Map<String, String>> aResults = new LinkedList<Map<String, String>>();
while(oRs.next()){
//for each row make a map
Map<String, String> oMap = new HashMap<String, String>();
//for each column (starting with 1!!!!!!) put a name value pair in the map
for(int n = 1; n <= nCols; n++){
oMap.put(oMd.getColumnLabel(n), oRs.getString(n));
}
aResults.add(oMap);
}
return JSONValue.toJSONString(aResults);
}
public static String toJsonString(InputStream inputStream)throws Exception{
StringBuilder stringBuilder = new StringBuilder();
BufferedReader bufferedReader = null;
try {
if (inputStream != null) {
bufferedReader = new BufferedReader(
new InputStreamReader(inputStream));
char[] charBuffer = new char[128];
int bytesRead = -1;
while ((bytesRead = bufferedReader.read(charBuffer)) > 0) {
stringBuilder.append(charBuffer, 0, bytesRead);
}
} else {
stringBuilder.append("");
}
} catch (IOException ex) {
throw ex;
} finally {
if (bufferedReader != null) {
try {
bufferedReader.close();
} catch (IOException ex) {
throw ex;
}
}
}
return stringBuilder.toString();
}
}
|
rhildred/SparkFrameworkOpenShift
|
src/main/java/io/github/rhildred/ResultSetValue.java
|
Java
|
mit
| 1,645 |
using Emby.Naming.Common;
using Emby.Naming.TV;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Emby.Naming.Tests.TV
{
[TestClass]
public class SeasonFolderTests
{
[TestMethod]
public void TestGetSeasonNumberFromPath1()
{
Assert.AreEqual(1, GetSeasonNumberFromPath(@"\Drive\Season 1"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath2()
{
Assert.AreEqual(2, GetSeasonNumberFromPath(@"\Drive\Season 2"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath3()
{
Assert.AreEqual(2, GetSeasonNumberFromPath(@"\Drive\Season 02"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath4()
{
Assert.AreEqual(1, GetSeasonNumberFromPath(@"\Drive\Season 1"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath5()
{
Assert.AreEqual(2, GetSeasonNumberFromPath(@"\Drive\Seinfeld\S02"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath6()
{
Assert.AreEqual(2, GetSeasonNumberFromPath(@"\Drive\Seinfeld\2"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath7()
{
Assert.AreEqual(2009, GetSeasonNumberFromPath(@"\Drive\Season 2009"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath8()
{
Assert.AreEqual(1, GetSeasonNumberFromPath(@"\Drive\Season1"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath9()
{
Assert.AreEqual(4, GetSeasonNumberFromPath(@"The Wonder Years\The.Wonder.Years.S04.PDTV.x264-JCH"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath10()
{
Assert.AreEqual(7, GetSeasonNumberFromPath(@"\Drive\Season 7 (2016)"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath11()
{
Assert.AreEqual(7, GetSeasonNumberFromPath(@"\Drive\Staffel 7 (2016)"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath12()
{
Assert.AreEqual(7, GetSeasonNumberFromPath(@"\Drive\Stagione 7 (2016)"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath14()
{
Assert.IsNull(GetSeasonNumberFromPath(@"\Drive\Season (8)"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath13()
{
Assert.AreEqual(3, GetSeasonNumberFromPath(@"\Drive\3.Staffel"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath15()
{
Assert.IsNull(GetSeasonNumberFromPath(@"\Drive\s06e05"));
}
[TestMethod]
public void TestGetSeasonNumberFromPath16()
{
Assert.IsNull(GetSeasonNumberFromPath(@"\Drive\The.Legend.of.Condor.Heroes.2017.V2.web-dl.1080p.h264.aac-hdctv"));
}
private int? GetSeasonNumberFromPath(string path)
{
var options = new NamingOptions();
var result = new SeasonPathParser(options)
.Parse(path, true, true);
return result.SeasonNumber;
}
}
}
|
MediaBrowser/MediaBrowser.Naming
|
Emby.Naming.Tests/TV/SeasonFolderTests.cs
|
C#
|
mit
| 3,306 |
package com.merakianalytics.orianna.types.data.staticdata;
import com.merakianalytics.orianna.types.data.CoreData;
public class RecommendedItems extends CoreData.ListProxy<ItemSet> {
private static final long serialVersionUID = 3130193939924356290L;
private boolean priority;
private String title, type, map, mode;
public RecommendedItems() {
super();
}
public RecommendedItems(final int initialCapacity) {
super(initialCapacity);
}
@Override
public boolean equals(final Object obj) {
if(this == obj) {
return true;
}
if(!super.equals(obj)) {
return false;
}
if(getClass() != obj.getClass()) {
return false;
}
final RecommendedItems other = (RecommendedItems)obj;
if(map == null) {
if(other.map != null) {
return false;
}
} else if(!map.equals(other.map)) {
return false;
}
if(mode == null) {
if(other.mode != null) {
return false;
}
} else if(!mode.equals(other.mode)) {
return false;
}
if(priority != other.priority) {
return false;
}
if(title == null) {
if(other.title != null) {
return false;
}
} else if(!title.equals(other.title)) {
return false;
}
if(type == null) {
if(other.type != null) {
return false;
}
} else if(!type.equals(other.type)) {
return false;
}
return true;
}
/**
* @return the map
*/
public String getMap() {
return map;
}
/**
* @return the mode
*/
public String getMode() {
return mode;
}
/**
* @return the title
*/
public String getTitle() {
return title;
}
/**
* @return the type
*/
public String getType() {
return type;
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + (map == null ? 0 : map.hashCode());
result = prime * result + (mode == null ? 0 : mode.hashCode());
result = prime * result + (priority ? 1231 : 1237);
result = prime * result + (title == null ? 0 : title.hashCode());
result = prime * result + (type == null ? 0 : type.hashCode());
return result;
}
/**
* @return the priority
*/
public boolean isPriority() {
return priority;
}
/**
* @param map
* the map to set
*/
public void setMap(final String map) {
this.map = map;
}
/**
* @param mode
* the mode to set
*/
public void setMode(final String mode) {
this.mode = mode;
}
/**
* @param priority
* the priority to set
*/
public void setPriority(final boolean priority) {
this.priority = priority;
}
/**
* @param title
* the title to set
*/
public void setTitle(final String title) {
this.title = title;
}
/**
* @param type
* the type to set
*/
public void setType(final String type) {
this.type = type;
}
}
|
robrua/Orianna
|
orianna/src/main/java/com/merakianalytics/orianna/types/data/staticdata/RecommendedItems.java
|
Java
|
mit
| 3,410 |
/*INVISIBLE ARIA-LABELS*/
.aria-label {
position:absolute !important;
left:0px !important;
width:auto !important;
height:auto !important;
overflow:auto !important;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); /*IE8*/
color: rgba(0,0,0,0) !important;
background: rgba(0,0,0,0) !important;
font-size: 1px !important;
padding:0 !important;
margin:0 !important;
line-height: normal !important;
}
/*FORCE ARIA-LABELS TO HIDE ON HIDDEN*/
.aria-label.aria-hidden {
display:none !important;
}
/*HIDDEN FOCUS GUARD*/
#a11y-focusguard {
left:0px !important;
bottom:0px !important;
width:auto !important;
height:auto !important;
overflow:auto !important;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); /*IE8*/
color: rgba(0,0,0,0) !important;
background: rgba(0,0,0,0) !important;
font-size: 1px !important;
padding:0 !important;
margin:0 !important;
line-height: normal !important;
}
/*IPAD: Stop accessibility cursor focusing until end of page;*/
#a11y-focusguard.touch {
position: relative !important;
}
/*DESTKOP: stop focus making window jump to bottom of page;*/
#a11y-focusguard.notouch {
position: fixed !important;
}
/*HIDDEN FOCUS/ALERT ELEMENT */
#a11y-selected, #a11y-selected * {
position:fixed !important;
left:0px !important;
bottom:0px !important;
width:auto !important;
height:auto !important;
overflow:auto !important;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); /*IE8*/
color: rgba(0,0,0,0) !important;
background: rgba(0,0,0,0) !important;
font-size: 1px !important;
padding:0 !important;
margin:0 !important;
line-height: normal !important;
}
/*FOCUS DISTRACTION*/
#a11y-focuser {
position:fixed !important;
left:0px !important;
top:0px !important;
width:auto !important;
height:auto !important;
overflow:auto !important;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); /*IE8*/
color: rgba(0,0,0,0) !important;
background: rgba(0,0,0,0) !important;
font-size: 1px !important;
padding:0 !important;
margin:0 !important;
line-height: normal !important;
}
|
cgkineo/jquery.a11y
|
jquery.a11y.css
|
CSS
|
mit
| 2,287 |
using SX.WebCore.MvcControllers;
namespace GE.WebUI.Controllers
{
public sealed class CommentsController : SxCommentsController
{
}
}
|
simlex-titul2005/GE
|
GE.WebUI/Controllers/CommentsController.cs
|
C#
|
mit
| 154 |
// DNSSEC
//
// DNSSEC (DNS Security Extension) adds a layer of security to the DNS. It
// uses public key cryptography to sign resource records. The
// public keys are stored in DNSKEY records and the signatures in RRSIG records.
//
// Requesting DNSSEC information for a zone is done by adding the DO (DNSSEC OK) bit
// to an request.
//
// m := new(dns.Msg)
// m.SetEdns0(4096, true)
//
// Signature generation, signature verification and key generation are all supported.
package dns
import (
"bytes"
"crypto"
"crypto/dsa"
"crypto/ecdsa"
"crypto/elliptic"
"crypto/md5"
"crypto/rsa"
"crypto/sha1"
"crypto/sha256"
"crypto/sha512"
"encoding/hex"
"hash"
"io"
"math/big"
"sort"
"strings"
"time"
)
// DNSSEC encryption algorithm codes.
const (
_ uint8 = iota
RSAMD5
DH
DSA
_ // Skip 4, RFC 6725, section 2.1
RSASHA1
DSANSEC3SHA1
RSASHA1NSEC3SHA1
RSASHA256
_ // Skip 9, RFC 6725, section 2.1
RSASHA512
_ // Skip 11, RFC 6725, section 2.1
ECCGOST
ECDSAP256SHA256
ECDSAP384SHA384
INDIRECT uint8 = 252
PRIVATEDNS uint8 = 253 // Private (experimental keys)
PRIVATEOID uint8 = 254
)
// DNSSEC hashing algorithm codes.
const (
_ uint8 = iota
SHA1 // RFC 4034
SHA256 // RFC 4509
GOST94 // RFC 5933
SHA384 // Experimental
SHA512 // Experimental
)
// DNSKEY flag values.
const (
SEP = 1
REVOKE = 1 << 7
ZONE = 1 << 8
)
// The RRSIG needs to be converted to wireformat with some of
// the rdata (the signature) missing. Use this struct to easy
// the conversion (and re-use the pack/unpack functions).
type rrsigWireFmt struct {
TypeCovered uint16
Algorithm uint8
Labels uint8
OrigTtl uint32
Expiration uint32
Inception uint32
KeyTag uint16
SignerName string `dns:"domain-name"`
/* No Signature */
}
// Used for converting DNSKEY's rdata to wirefmt.
type dnskeyWireFmt struct {
Flags uint16
Protocol uint8
Algorithm uint8
PublicKey string `dns:"base64"`
/* Nothing is left out */
}
func divRoundUp(a, b int) int {
return (a + b - 1) / b
}
// KeyTag calculates the keytag (or key-id) of the DNSKEY.
func (k *DNSKEY) KeyTag() uint16 {
if k == nil {
return 0
}
var keytag int
switch k.Algorithm {
case RSAMD5:
// Look at the bottom two bytes of the modules, which the last
// item in the pubkey. We could do this faster by looking directly
// at the base64 values. But I'm lazy.
modulus, _ := fromBase64([]byte(k.PublicKey))
if len(modulus) > 1 {
x, _ := unpackUint16(modulus, len(modulus)-2)
keytag = int(x)
}
default:
keywire := new(dnskeyWireFmt)
keywire.Flags = k.Flags
keywire.Protocol = k.Protocol
keywire.Algorithm = k.Algorithm
keywire.PublicKey = k.PublicKey
wire := make([]byte, DefaultMsgSize)
n, err := PackStruct(keywire, wire, 0)
if err != nil {
return 0
}
wire = wire[:n]
for i, v := range wire {
if i&1 != 0 {
keytag += int(v) // must be larger than uint32
} else {
keytag += int(v) << 8
}
}
keytag += (keytag >> 16) & 0xFFFF
keytag &= 0xFFFF
}
return uint16(keytag)
}
// ToDS converts a DNSKEY record to a DS record.
func (k *DNSKEY) ToDS(h uint8) *DS {
if k == nil {
return nil
}
ds := new(DS)
ds.Hdr.Name = k.Hdr.Name
ds.Hdr.Class = k.Hdr.Class
ds.Hdr.Rrtype = TypeDS
ds.Hdr.Ttl = k.Hdr.Ttl
ds.Algorithm = k.Algorithm
ds.DigestType = h
ds.KeyTag = k.KeyTag()
keywire := new(dnskeyWireFmt)
keywire.Flags = k.Flags
keywire.Protocol = k.Protocol
keywire.Algorithm = k.Algorithm
keywire.PublicKey = k.PublicKey
wire := make([]byte, DefaultMsgSize)
n, err := PackStruct(keywire, wire, 0)
if err != nil {
return nil
}
wire = wire[:n]
owner := make([]byte, 255)
off, err1 := PackDomainName(strings.ToLower(k.Hdr.Name), owner, 0, nil, false)
if err1 != nil {
return nil
}
owner = owner[:off]
// RFC4034:
// digest = digest_algorithm( DNSKEY owner name | DNSKEY RDATA);
// "|" denotes concatenation
// DNSKEY RDATA = Flags | Protocol | Algorithm | Public Key.
// digest buffer
digest := append(owner, wire...) // another copy
switch h {
case SHA1:
s := sha1.New()
io.WriteString(s, string(digest))
ds.Digest = hex.EncodeToString(s.Sum(nil))
case SHA256:
s := sha256.New()
io.WriteString(s, string(digest))
ds.Digest = hex.EncodeToString(s.Sum(nil))
case SHA384:
s := sha512.New384()
io.WriteString(s, string(digest))
ds.Digest = hex.EncodeToString(s.Sum(nil))
case GOST94:
/* I have no clue */
default:
return nil
}
return ds
}
// Sign signs an RRSet. The signature needs to be filled in with
// the values: Inception, Expiration, KeyTag, SignerName and Algorithm.
// The rest is copied from the RRset. Sign returns true when the signing went OK,
// otherwise false.
// There is no check if RRSet is a proper (RFC 2181) RRSet.
// If OrigTTL is non zero, it is used as-is, otherwise the TTL of the RRset
// is used as the OrigTTL.
func (rr *RRSIG) Sign(k PrivateKey, rrset []RR) error {
if k == nil {
return ErrPrivKey
}
// s.Inception and s.Expiration may be 0 (rollover etc.), the rest must be set
if rr.KeyTag == 0 || len(rr.SignerName) == 0 || rr.Algorithm == 0 {
return ErrKey
}
rr.Hdr.Rrtype = TypeRRSIG
rr.Hdr.Name = rrset[0].Header().Name
rr.Hdr.Class = rrset[0].Header().Class
if rr.OrigTtl == 0 { // If set don't override
rr.OrigTtl = rrset[0].Header().Ttl
}
rr.TypeCovered = rrset[0].Header().Rrtype
rr.Labels = uint8(CountLabel(rrset[0].Header().Name))
if strings.HasPrefix(rrset[0].Header().Name, "*") {
rr.Labels-- // wildcard, remove from label count
}
sigwire := new(rrsigWireFmt)
sigwire.TypeCovered = rr.TypeCovered
sigwire.Algorithm = rr.Algorithm
sigwire.Labels = rr.Labels
sigwire.OrigTtl = rr.OrigTtl
sigwire.Expiration = rr.Expiration
sigwire.Inception = rr.Inception
sigwire.KeyTag = rr.KeyTag
// For signing, lowercase this name
sigwire.SignerName = strings.ToLower(rr.SignerName)
// Create the desired binary blob
signdata := make([]byte, DefaultMsgSize)
n, err := PackStruct(sigwire, signdata, 0)
if err != nil {
return err
}
signdata = signdata[:n]
wire, err := rawSignatureData(rrset, rr)
if err != nil {
return err
}
signdata = append(signdata, wire...)
var h hash.Hash
switch rr.Algorithm {
case DSA, DSANSEC3SHA1:
// TODO: this seems bugged, will panic
case RSASHA1, RSASHA1NSEC3SHA1:
h = sha1.New()
case RSASHA256, ECDSAP256SHA256:
h = sha256.New()
case ECDSAP384SHA384:
h = sha512.New384()
case RSASHA512:
h = sha512.New()
case RSAMD5:
fallthrough // Deprecated in RFC 6725
default:
return ErrAlg
}
_, err = h.Write(signdata)
if err != nil {
return err
}
sighash := h.Sum(nil)
signature, err := k.Sign(sighash, rr.Algorithm)
if err != nil {
return err
}
rr.Signature = toBase64(signature)
return nil
}
// Verify validates an RRSet with the signature and key. This is only the
// cryptographic test, the signature validity period must be checked separately.
// This function copies the rdata of some RRs (to lowercase domain names) for the validation to work.
func (rr *RRSIG) Verify(k *DNSKEY, rrset []RR) error {
// First the easy checks
if len(rrset) == 0 {
return ErrRRset
}
if rr.KeyTag != k.KeyTag() {
return ErrKey
}
if rr.Hdr.Class != k.Hdr.Class {
return ErrKey
}
if rr.Algorithm != k.Algorithm {
return ErrKey
}
if strings.ToLower(rr.SignerName) != strings.ToLower(k.Hdr.Name) {
return ErrKey
}
if k.Protocol != 3 {
return ErrKey
}
for _, r := range rrset {
if r.Header().Class != rr.Hdr.Class {
return ErrRRset
}
if r.Header().Rrtype != rr.TypeCovered {
return ErrRRset
}
}
// RFC 4035 5.3.2. Reconstructing the Signed Data
// Copy the sig, except the rrsig data
sigwire := new(rrsigWireFmt)
sigwire.TypeCovered = rr.TypeCovered
sigwire.Algorithm = rr.Algorithm
sigwire.Labels = rr.Labels
sigwire.OrigTtl = rr.OrigTtl
sigwire.Expiration = rr.Expiration
sigwire.Inception = rr.Inception
sigwire.KeyTag = rr.KeyTag
sigwire.SignerName = strings.ToLower(rr.SignerName)
// Create the desired binary blob
signeddata := make([]byte, DefaultMsgSize)
n, err := PackStruct(sigwire, signeddata, 0)
if err != nil {
return err
}
signeddata = signeddata[:n]
wire, err := rawSignatureData(rrset, rr)
if err != nil {
return err
}
signeddata = append(signeddata, wire...)
sigbuf := rr.sigBuf() // Get the binary signature data
if rr.Algorithm == PRIVATEDNS { // PRIVATEOID
// TODO(mg)
// remove the domain name and assume its our
}
switch rr.Algorithm {
case RSASHA1, RSASHA1NSEC3SHA1, RSASHA256, RSASHA512, RSAMD5:
// TODO(mg): this can be done quicker, ie. cache the pubkey data somewhere??
pubkey := k.publicKeyRSA() // Get the key
if pubkey == nil {
return ErrKey
}
// Setup the hash as defined for this alg.
var h hash.Hash
var ch crypto.Hash
switch rr.Algorithm {
case RSAMD5:
h = md5.New()
ch = crypto.MD5
case RSASHA1, RSASHA1NSEC3SHA1:
h = sha1.New()
ch = crypto.SHA1
case RSASHA256:
h = sha256.New()
ch = crypto.SHA256
case RSASHA512:
h = sha512.New()
ch = crypto.SHA512
}
io.WriteString(h, string(signeddata))
sighash := h.Sum(nil)
return rsa.VerifyPKCS1v15(pubkey, ch, sighash, sigbuf)
case ECDSAP256SHA256, ECDSAP384SHA384:
pubkey := k.publicKeyECDSA()
if pubkey == nil {
return ErrKey
}
var h hash.Hash
switch rr.Algorithm {
case ECDSAP256SHA256:
h = sha256.New()
case ECDSAP384SHA384:
h = sha512.New384()
}
io.WriteString(h, string(signeddata))
sighash := h.Sum(nil)
// Split sigbuf into the r and s coordinates
r := big.NewInt(0)
r.SetBytes(sigbuf[:len(sigbuf)/2])
s := big.NewInt(0)
s.SetBytes(sigbuf[len(sigbuf)/2:])
if ecdsa.Verify(pubkey, sighash, r, s) {
return nil
}
return ErrSig
}
// Unknown alg
return ErrAlg
}
// ValidityPeriod uses RFC1982 serial arithmetic to calculate
// if a signature period is valid. If t is the zero time, the
// current time is taken other t is.
func (rr *RRSIG) ValidityPeriod(t time.Time) bool {
var utc int64
if t.IsZero() {
utc = time.Now().UTC().Unix()
} else {
utc = t.UTC().Unix()
}
modi := (int64(rr.Inception) - utc) / year68
mode := (int64(rr.Expiration) - utc) / year68
ti := int64(rr.Inception) + (modi * year68)
te := int64(rr.Expiration) + (mode * year68)
return ti <= utc && utc <= te
}
// Return the signatures base64 encodedig sigdata as a byte slice.
func (rr *RRSIG) sigBuf() []byte {
sigbuf, err := fromBase64([]byte(rr.Signature))
if err != nil {
return nil
}
return sigbuf
}
// publicKeyRSA returns the RSA public key from a DNSKEY record.
func (k *DNSKEY) publicKeyRSA() *rsa.PublicKey {
keybuf, err := fromBase64([]byte(k.PublicKey))
if err != nil {
return nil
}
// RFC 2537/3110, section 2. RSA Public KEY Resource Records
// Length is in the 0th byte, unless its zero, then it
// it in bytes 1 and 2 and its a 16 bit number
explen := uint16(keybuf[0])
keyoff := 1
if explen == 0 {
explen = uint16(keybuf[1])<<8 | uint16(keybuf[2])
keyoff = 3
}
pubkey := new(rsa.PublicKey)
pubkey.N = big.NewInt(0)
shift := uint64((explen - 1) * 8)
expo := uint64(0)
for i := int(explen - 1); i > 0; i-- {
expo += uint64(keybuf[keyoff+i]) << shift
shift -= 8
}
// Remainder
expo += uint64(keybuf[keyoff])
if expo > 2<<31 {
// Larger expo than supported.
// println("dns: F5 primes (or larger) are not supported")
return nil
}
pubkey.E = int(expo)
pubkey.N.SetBytes(keybuf[keyoff+int(explen):])
return pubkey
}
// publicKeyECDSA returns the Curve public key from the DNSKEY record.
func (k *DNSKEY) publicKeyECDSA() *ecdsa.PublicKey {
keybuf, err := fromBase64([]byte(k.PublicKey))
if err != nil {
return nil
}
pubkey := new(ecdsa.PublicKey)
switch k.Algorithm {
case ECDSAP256SHA256:
pubkey.Curve = elliptic.P256()
if len(keybuf) != 64 {
// wrongly encoded key
return nil
}
case ECDSAP384SHA384:
pubkey.Curve = elliptic.P384()
if len(keybuf) != 96 {
// Wrongly encoded key
return nil
}
}
pubkey.X = big.NewInt(0)
pubkey.X.SetBytes(keybuf[:len(keybuf)/2])
pubkey.Y = big.NewInt(0)
pubkey.Y.SetBytes(keybuf[len(keybuf)/2:])
return pubkey
}
func (k *DNSKEY) publicKeyDSA() *dsa.PublicKey {
keybuf, err := fromBase64([]byte(k.PublicKey))
if err != nil {
return nil
}
if len(keybuf) < 22 {
return nil
}
t, keybuf := int(keybuf[0]), keybuf[1:]
size := 64 + t*8
q, keybuf := keybuf[:20], keybuf[20:]
if len(keybuf) != 3*size {
return nil
}
p, keybuf := keybuf[:size], keybuf[size:]
g, y := keybuf[:size], keybuf[size:]
pubkey := new(dsa.PublicKey)
pubkey.Parameters.Q = big.NewInt(0).SetBytes(q)
pubkey.Parameters.P = big.NewInt(0).SetBytes(p)
pubkey.Parameters.G = big.NewInt(0).SetBytes(g)
pubkey.Y = big.NewInt(0).SetBytes(y)
return pubkey
}
type wireSlice [][]byte
func (p wireSlice) Len() int { return len(p) }
func (p wireSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
func (p wireSlice) Less(i, j int) bool {
_, ioff, _ := UnpackDomainName(p[i], 0)
_, joff, _ := UnpackDomainName(p[j], 0)
return bytes.Compare(p[i][ioff+10:], p[j][joff+10:]) < 0
}
// Return the raw signature data.
func rawSignatureData(rrset []RR, s *RRSIG) (buf []byte, err error) {
wires := make(wireSlice, len(rrset))
for i, r := range rrset {
r1 := r.copy()
r1.Header().Ttl = s.OrigTtl
labels := SplitDomainName(r1.Header().Name)
// 6.2. Canonical RR Form. (4) - wildcards
if len(labels) > int(s.Labels) {
// Wildcard
r1.Header().Name = "*." + strings.Join(labels[len(labels)-int(s.Labels):], ".") + "."
}
// RFC 4034: 6.2. Canonical RR Form. (2) - domain name to lowercase
r1.Header().Name = strings.ToLower(r1.Header().Name)
// 6.2. Canonical RR Form. (3) - domain rdata to lowercase.
// NS, MD, MF, CNAME, SOA, MB, MG, MR, PTR,
// HINFO, MINFO, MX, RP, AFSDB, RT, SIG, PX, NXT, NAPTR, KX,
// SRV, DNAME, A6
switch x := r1.(type) {
case *NS:
x.Ns = strings.ToLower(x.Ns)
case *CNAME:
x.Target = strings.ToLower(x.Target)
case *SOA:
x.Ns = strings.ToLower(x.Ns)
x.Mbox = strings.ToLower(x.Mbox)
case *MB:
x.Mb = strings.ToLower(x.Mb)
case *MG:
x.Mg = strings.ToLower(x.Mg)
case *MR:
x.Mr = strings.ToLower(x.Mr)
case *PTR:
x.Ptr = strings.ToLower(x.Ptr)
case *MINFO:
x.Rmail = strings.ToLower(x.Rmail)
x.Email = strings.ToLower(x.Email)
case *MX:
x.Mx = strings.ToLower(x.Mx)
case *NAPTR:
x.Replacement = strings.ToLower(x.Replacement)
case *KX:
x.Exchanger = strings.ToLower(x.Exchanger)
case *SRV:
x.Target = strings.ToLower(x.Target)
case *DNAME:
x.Target = strings.ToLower(x.Target)
}
// 6.2. Canonical RR Form. (5) - origTTL
wire := make([]byte, r1.len()+1) // +1 to be safe(r)
off, err1 := PackRR(r1, wire, 0, nil, false)
if err1 != nil {
return nil, err1
}
wire = wire[:off]
wires[i] = wire
}
sort.Sort(wires)
for _, wire := range wires {
buf = append(buf, wire...)
}
return buf, nil
}
// Map for algorithm names.
var AlgorithmToString = map[uint8]string{
RSAMD5: "RSAMD5",
DH: "DH",
DSA: "DSA",
RSASHA1: "RSASHA1",
DSANSEC3SHA1: "DSA-NSEC3-SHA1",
RSASHA1NSEC3SHA1: "RSASHA1-NSEC3-SHA1",
RSASHA256: "RSASHA256",
RSASHA512: "RSASHA512",
ECCGOST: "ECC-GOST",
ECDSAP256SHA256: "ECDSAP256SHA256",
ECDSAP384SHA384: "ECDSAP384SHA384",
INDIRECT: "INDIRECT",
PRIVATEDNS: "PRIVATEDNS",
PRIVATEOID: "PRIVATEOID",
}
// Map of algorithm strings.
var StringToAlgorithm = reverseInt8(AlgorithmToString)
// Map for hash names.
var HashToString = map[uint8]string{
SHA1: "SHA1",
SHA256: "SHA256",
GOST94: "GOST94",
SHA384: "SHA384",
SHA512: "SHA512",
}
// Map of hash strings.
var StringToHash = reverseInt8(HashToString)
|
duedil-ltd/discodns
|
Godeps/_workspace/src/github.com/miekg/dns/dnssec.go
|
GO
|
mit
| 15,853 |
### Fetching
#### Basic Finding
Most methods in MagicalRecord return an NSArray of results. So, if you have an Entity called Person, related to a Department (as seen in various Apple Core Data documentation), to get all the Person entities from your Persistent Store:
//In order for this to work you need to add "#define MR_SHORTHAND" to your PCH file
NSArray *people = [Person findAll];
// Otherwise you can use the longer, namespaced version
NSArray *people = [Person MR_findAll];
Or, to have the results sorted by a property:
NSArray *peopleSorted = [Person MR_findAllSortedBy:@"LastName" ascending:YES];
Or, to have the results sorted by multiple properties:
NSArray *peopleSorted = [Person MR_findAllSortedBy:@"LastName,FirstName" ascending:YES];
Or, to have the results sorted by multiple properties with difference attributes - will default to whatever you set it to:
NSArray *peopleSorted = [Person MR_findAllSortedBy:@"LastName:NO,FirstName" ascending:YES];
NSArray *peopleSorted = [Person MR_findAllSortedBy:@"LastName,FirstName:YES" ascending:NO];
If you have a unique way of retrieving a single object from your data store, you can get that object directly:
Person *person = [Person MR_findFirstByAttribute:@"FirstName" withValue:@"Forrest"];
#### Advanced Finding
If you want to be more specific with your search, you can send in a predicate:
NSArray *departments = [NSArray arrayWithObjects:dept1, dept2, ..., nil];
NSPredicate *peopleFilter = [NSPredicate predicateWithFormat:@"Department IN %@", departments];
NSArray *people = [Person MR_findAllWithPredicate:peopleFilter];
#### Returning an NSFetchRequest
NSPredicate *peopleFilter = [NSPredicate predicateWithFormat:@"Department IN %@", departments];
NSArray *people = [Person MR_findAllWithPredicate:peopleFilter];
For each of these single line calls, the full stack of NSFetchRequest, NSSortDescriptors and a simple default error handling scheme (ie. logging to the console) is created.
#### Customizing the Request
NSPredicate *peopleFilter = [NSPredicate predicateWithFormat:@"Department IN %@", departments];
NSFetchRequest *peopleRequest = [Person MR_requestAllWithPredicate:peopleFilter];
[peopleRequest setReturnsDistinctResults:NO];
[peopleRequest setReturnPropertiesNamed:[NSArray arrayWithObjects:@"FirstName", @"LastName", nil]];
...
NSArray *people = [Person MR_executeFetchRequest:peopleRequest];
#### Find the number of entities
You can also perform a count of entities in your Store, that will be performed on the Store
NSNumber *count = [Person MR_numberOfEntities];
Or, if you're looking for a count of entities based on a predicate or some filter:
NSNumber *count = [Person MR_numberOfEntitiesWithPredicate:...];
There are also counterpart methods which return NSUInteger rather than NSNumbers:
* countOfEntities
* countOfEntitiesWithContext:(NSManagedObjectContext *)
* countOfEntitiesWithPredicate:(NSPredicate *)
* countOfEntitiesWithPredicate:(NSPredicate *) inContext:(NSManagedObjectContext *)
#### Aggregate Operations
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"diaryEntry.date == %@", today];
int totalFat = [[CTFoodDiaryEntry MR_aggregateOperation:@"sum:" onAttribute:@"fatColories" withPredicate:predicate] intValue];
int fattest = [[CTFoodDiaryEntry MR_aggregateOperation:@"max:" onAttribute:@"fatColories" withPredicate:predicate] intValue];
#### Finding from a different context
All find, fetch, and request methods have an inContext: method parameter
NSManagedObjectContext *someOtherContext = ...;
NSArray *peopleFromAnotherContext = [Person MR_findAllInContext:someOtherContext];
...
Person *personFromContext = [Person MR_findFirstByAttribute:@"lastName" withValue:@"Gump" inContext:someOtherContext];
...
NSUInteger count = [Person MR_numberOfEntitiesWithContext:someOtherContext];
## Creating new Entities
When you need to create a new instance of an Entity, use:
Person *myNewPersonInstance = [Person MR_createEntity];
or, to specify a context:
NSManagedObjectContext *otherContext = ...;
Person *myPerson = [Person MR_createInContext:otherContext];
## Deleting Entities
To delete a single entity:
Person *p = ...;
[p MR_deleteEntity];
or, to specify a context:
NSManagedObjectContext *otherContext = ...;
Person *deleteMe = ...;
[deleteMe MR_deleteInContext:otherContext];
There is no delete *All Entities* or *truncate* operation in core data, so one is provided for you with Active Record for Core Data:
[Person MR_truncateAll];
or, with a specific context:
NSManagedObjectContext *otherContext = ...;
[Person MR_truncateAllInContext:otherContext];
|
florianbuerger/MagicalRecord
|
Docs/Fetching.md
|
Markdown
|
mit
| 4,715 |
---
title: Vielelezo vya Neno la Mungu
date: 09/08/2020
---
`"Soma Zaburi 119:105, Yeremia 23:29, Luka 8:11, na Mathayo 4:4. Ni Vielelezo gani vitano vimetumika kuwakilisha Neno la Mungu katika aya hizi? Unafikiri ni kwa nini Vielelezo hivi vilichaguliwa kuwakilisha Neno la Mungu?`
Vielelezo mbalimbali vilivyotumika katika aya hizi huelezea miongoni mwa kazi za msingi za Neno la Mungu. Tunaposhiriki Maandiko na wengine, ni kama mwanga unaomulika maisha. Yesu, "nuru ya ulimwengu," hupenya giza la kutokumwelewa kwao Mungu na asili ya tabia Yake. Akili zilizotiwa giza la kutokumwelewa Mungu zinaangazwa na Roho Mtakatifu kwa njia ya Neno la Mungu.
Kulingana na Yeremia, Neno la Mungu ni kama moto na nyundo. Linateketeza uchafu wa dhambi katika maisha yetu na linavunja mioyo yetu migumu. Tunapowasaidia watu kuuona utukufu wa Yesu katika Maandiko, mioyo yao migumu inapasuka, na moto wa upendo Wake unateketeza uchafu wa uchoyo, ulafi, tamaa mbaya, na ubinafsi.
Neno la Mungu pia limefananishwa na mbegu. Sifa ya msingi ya mbegu ni kuwa inatoa uhai. Mbegu inachukua muda kukua. Mbegu hazichipuki zote kwa wakati mmoja. Mimea haikui kwa kasi sawa. Lakini katika mazingira sahihi, uhai katika mbegu hupasua udongo na kuanzisha maisha mapya. Tunapopanda mbegu ya Neno la Mungu katika mioyo na akili za wengine, mara nyingi hatuoni matokeo ya haraka, lakini kimya kimya mbegu inakua, na kwa muda uliopangwa na Mungu, ikiwa wanatii msukumo wa Roho Mtakatifu, inazaa mavuno ya ufalme wa Mungu.
Yesu anafananisha Neno Lake na mkate wenye lishe bora. Kama wengi wetu tunavyojua, ni vyakula vichache vinavyoshibisha kama mkate mzuri. Neno la Mungu linashibisha na kuondoa njaa ya roho na kuleta lishe bora kwa ajili ya mahitaji ya ndani ya moyo. Unaposhiriki ahadi za Neno la Mungu na wengine na kuwasaidia kugundua kuwa Yesu ndiye Neno, maisha yao hubadilishwa na wema Wake, husisimuliwa na upendo Wake, hushangazwa na neema Yake, na huridhishwa na uwepo Wake."
`Kwa mara nyingine tena, fikiria juu ya ukweli tunaoujua kutoka katika Biblia peke yake: Jambo hili linatuambia nini kuhusu inavyotupasa kuyathamini mafundisho yake?`
|
imasaru/sabbath-school-lessons
|
src/sw/2020-03/07/02.md
|
Markdown
|
mit
| 2,133 |
# frozen_string_literal: true
require 'spec_helper'
describe Projects::AutoDevops::DisableService, '#execute' do
let(:project) { create(:project, :repository, :auto_devops) }
let(:auto_devops) { project.auto_devops }
subject { described_class.new(project).execute }
context 'when Auto DevOps disabled at instance level' do
before do
stub_application_setting(auto_devops_enabled: false)
end
it { is_expected.to be_falsy }
end
context 'when Auto DevOps enabled at instance level' do
before do
stub_application_setting(auto_devops_enabled: true)
end
context 'when Auto DevOps explicitly enabled on project' do
before do
auto_devops.update!(enabled: true)
end
it { is_expected.to be_falsy }
end
context 'when Auto DevOps explicitly disabled on project' do
before do
auto_devops.update!(enabled: false)
end
it { is_expected.to be_falsy }
end
context 'when Auto DevOps is implicitly enabled' do
before do
auto_devops.update!(enabled: nil)
end
context 'when is the first pipeline failure' do
before do
create(:ci_pipeline, :failed, :auto_devops_source, project: project)
end
it 'disables Auto DevOps for project' do
subject
expect(auto_devops.enabled).to eq(false)
end
end
context 'when it is not the first pipeline failure' do
before do
create_list(:ci_pipeline, 2, :failed, :auto_devops_source, project: project)
end
it 'explicitly disables Auto DevOps for project' do
subject
expect(auto_devops.reload.enabled).to eq(false)
end
end
context 'when an Auto DevOps pipeline has succeeded before' do
before do
create(:ci_pipeline, :success, :auto_devops_source, project: project)
end
it 'does not disable Auto DevOps for project' do
subject
expect(auto_devops.reload.enabled).to be_nil
end
end
end
context 'when project does not have an Auto DevOps record related' do
let(:project) { create(:project, :repository) }
before do
create(:ci_pipeline, :failed, :auto_devops_source, project: project)
end
it 'disables Auto DevOps for project' do
subject
auto_devops = project.reload.auto_devops
expect(auto_devops.enabled).to eq(false)
end
it 'creates a ProjectAutoDevops record' do
expect { subject }.to change { ProjectAutoDevops.count }.from(0).to(1)
end
end
end
end
|
stoplightio/gitlabhq
|
spec/services/projects/auto_devops/disable_service_spec.rb
|
Ruby
|
mit
| 2,633 |
---
layout: wiki
title: JVM
cate1: Java
cate2:
description: JVM
keywords: Android
---
*本文内容主要摘抄自《深入理解Java虚拟机:JVM高级特性与最佳实践(第2版)》。*
## GC
### 判断对象是否存活
#### 引用计数算法
**注:**主流的 Java 虚拟机里没有选用引用计数算法来管理内存。
给对象中添加一个引用计数器,每当有一个地方引用它时,计数器值就加 1;当引用失效时,计数器值就减 1;任何时刻计数器为 0 的对象就是不可能再被使用的。
但是它很难解决对象之间想要循环引用的问题,即两个对象只是相互持有对方的引用,但是实际它们都不会被访问到的情况。
#### 可达性分析算法
基本思路是通过一系列的称为 GC Roots 的对象作为起始点,从这些节点开始向下搜索,搜索所走过的路径称为引用链(Reference Chain),当一个对象到 GC Roots 没有任何引用链相连(即从 GC Roots 到这个对象不可达)时,则证明此对象不可用。
可作为 GC Roots 的节点主要在**全局性的引用**(例如常量或类静态属性)与**执行上下文**(如栈帧中的本地变量表)中。
在 Java 语言中,可作为 GC Roots 的对象包括下面几种:
* 虚拟机栈(栈帧中的本地变量表)中引用的对象。
* 方法区中类静态属性引用的对象。
* 方法区中常量引用的对象。
* 本地方法栈中 JNI(即一般说的 Native 方法)引用的对象。
### 垃圾收集算法
#### 标记-清除算法(Mark-Sweep)
首先标记出所有需要回收的对象,在标记完成后统一回收所有被标记的对象。
不足:
* 效率。
标记和清除两个过程的效率都不高。
* 空间。
标记清除后会产生大量不连续的内存碎片。

*图 1: 标记-清除算法示意图*
#### 复制算法(Copying)
将内存划分为两块,每次只使用其中一块。当这一块的内存用完了,就将还存活着的对象复制到另外一块上,然后将已使用过的内存空间一次清理掉。
不足:
* 可用内存变少。
HotSpot 中采用 Eden:Survivor:Survivor 比例 8:1:1 来划分空间,每次新生代可用80%+10%,当 Survivor 空间不够用时,需要依赖其它内存(这里指老年代)进行分配担保(Handle Promotion)。

*图 2:复制算法示意图*
#### 标记-整理算法(Mark-Compact)
一般用于老年代。
先标记可清理对象,然后将存活对象向一端移动,再直接清理掉端边界以外的内存。

*图 3:标记-整理算法示意图*
#### 分代收集算法(Generational Collection)
根据对象存活周期的不同将内存划分为几块,一般是把 Java 堆分为新生代和老年代。在新生代中,采用复制算法;在老年代中,使用标记-清除或标记-整理算法。
## 类加载机制
### 类的生命周期
加载(Loading)-连接(Linking)-初始化(Initialization)-使用(Using)-卸载(Unloading)。
其中连接(Linking)又可分为验证(Verification)-准备(Preparation)-解析(Resolution)三个阶段。
虚拟机规范严格规定了有且仅有 5 种情况必须立即进行类初始化:
1. 遇到 new、getstatic、putstatic 或 invokestatic 这四条字节码指令时,若类没有进行过初始化,则需要先触发其初始化。生成这 4 条指令的最常见的 Java 代码场景是:使用 new 关键字生成实例化对象时、读取或设置一个静态字段(被 final 修饰,已在编译期把结果放入常量池的静态字段除外)时,以及调用一个类的静态方法的时候。
2. 使用 java.lang.reflect 包的方法对类进行反射调用的时候,如果类没有进行过初始化,则需要先触发其初始化。
3. 当初始化一个类的时候,如果发现其父类还没有进行过初始化,则需要先触发其父类的初始化。
4. 当虚拟机启动时,用户需要指定一个要指定的主类(包含 main() 方法的那个类),虚拟机会先初始化这个主类。
5. 当使用 JDK 1.7 的动态语言支持时,如果一个 java.lang.invoke.MethodHandle 实例最后的解析结果 REF_getStatic、REF_putStatic、REF_invokeStatic 的方法句柄,并且这个方法句柄所对应的类没有进行过初始化,则需要先触发其初始化。
以上 5 种场景中的行为称为对一个类进行主动引用,除此之外,所有引用类的方式都不会触发初始化,称为被动引用。比如:
* 通过子类引用父类的静态字段,不会导致子类初始化。
* 通过数组定义来引用类,不会触发此类的初始化。
* 常量(static final)在编译阶段会存入调用类的常量池中,本质中并没有直接引用到定义常量的类,因此不会触发定义常量的类的初始化。
### 准备阶段
准备阶段会正式为类变量分配内存并设置初始值,这些变量使用的内存都将在方法区中分配。这个阶段是初始化为零值,类构造器 `<clinit>` 方法在初始化阶段才会执行。若类变量为常量,此阶段会被初始化为指定的值。
### 初始化阶段
初始化阶段主要是执行 `<clinit>` 方法。该方法是由编译器自动收集类中的所有类变量的赋值动作和静态语句块中的语句合并产生的,语句顺序与源文件中出现顺序一致。
静态语句块只能访问到定义在静态语句块之前的变量,定义在它之后的变量,可以赋值,但不能访问。
虚拟机会保证子类的 `<clinit>` 方法执行前,父类的 `<clinit>` 方法已经执行完毕。
接口的 `<clinit>` 方法不需要先执行父接口的 `<clinit>` 方法,只有当父接口中定义的变量被使用时才会初始化。
## 参考
* 《深入理解Java虚拟机:JVM高级特性与最佳实践(第2版)》
|
gpluscat/gpluscat.github.io
|
_wiki/java-jvm.md
|
Markdown
|
mit
| 6,096 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Wed Apr 17 10:23:09 UTC 2013 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
InputField (Encog Core 3.2.0-SNAPSHOT API)
</TITLE>
<META NAME="date" CONTENT="2013-04-17">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title = "InputField (Encog Core 3.2.0-SNAPSHOT API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/InputField.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../org/encog/util/normalize/input/HasFixedLength.html" title="interface in org.encog.util.normalize.input"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/encog/util/normalize/input/InputFieldArray1D.html" title="class in org.encog.util.normalize.input"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/encog/util/normalize/input/InputField.html" target="_top"><B>FRAMES</B></A>
<A HREF="InputField.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if (window == top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.encog.util.normalize.input</FONT>
<BR>
Interface InputField</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/encog/util/normalize/input/BasicInputField.html" title="class in org.encog.util.normalize.input">BasicInputField</A>, <A HREF="../../../../../org/encog/util/normalize/input/InputFieldArray1D.html" title="class in org.encog.util.normalize.input">InputFieldArray1D</A>, <A HREF="../../../../../org/encog/util/normalize/input/InputFieldArray2D.html" title="class in org.encog.util.normalize.input">InputFieldArray2D</A>, <A HREF="../../../../../org/encog/util/normalize/input/InputFieldCSV.html" title="class in org.encog.util.normalize.input">InputFieldCSV</A>, <A HREF="../../../../../org/encog/util/normalize/input/InputFieldEncogCollection.html" title="class in org.encog.util.normalize.input">InputFieldEncogCollection</A>, <A HREF="../../../../../org/encog/util/normalize/input/InputFieldMLDataSet.html" title="class in org.encog.util.normalize.input">InputFieldMLDataSet</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>InputField</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>
<P>
A Normalization input field. This field defines data that needs to be
normalized. There are many different types of normalization field that can
be used for many different purposes.
To assist in normalization each input file tracks the min and max values for
that field.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#applyMinMax(double)">applyMinMax</A></B>(double d)</CODE>
<BR>
Update the min and max values for this field with the specified values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#getCurrentValue()">getCurrentValue</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#getMax()">getMax</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#getMin()">getMin</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#getUsedForNetworkInput()">getUsedForNetworkInput</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#getValue(int)">getValue</A></B>(int i)</CODE>
<BR>
Called for input field types that require an index to get the current
value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#setCurrentValue(double)">setCurrentValue</A></B>(double d)</CODE>
<BR>
Set the current value of this field.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#setMax(double)">setMax</A></B>(double max)</CODE>
<BR>
Set the current max value.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/encog/util/normalize/input/InputField.html#setMin(double)">setMin</A></B>(double min)</CODE>
<BR>
Set the current min value.</TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="applyMinMax(double)"><!-- --></A><H3>
applyMinMax</H3>
<PRE>
void <B>applyMinMax</B>(double d)</PRE>
<DL>
<DD>Update the min and max values for this field with the specified values.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - The current value to use to update min and max.</DL>
</DD>
</DL>
<HR>
<A NAME="getCurrentValue()"><!-- --></A><H3>
getCurrentValue</H3>
<PRE>
double <B>getCurrentValue</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The current value of the input field. This is only valid,
while the normalization is being performed.</DL>
</DD>
</DL>
<HR>
<A NAME="getMax()"><!-- --></A><H3>
getMax</H3>
<PRE>
double <B>getMax</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The maximum value for all of the input data, this is calculated
during the first pass of normalization.</DL>
</DD>
</DL>
<HR>
<A NAME="getMin()"><!-- --></A><H3>
getMin</H3>
<PRE>
double <B>getMin</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>The minimum value for all of the input data, this is calculated
during the first pass of normalization.</DL>
</DD>
</DL>
<HR>
<A NAME="getUsedForNetworkInput()"><!-- --></A><H3>
getUsedForNetworkInput</H3>
<PRE>
boolean <B>getUsedForNetworkInput</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>True, if this field is used for network input. This is needed
so that the buildForNetworkInput method of the normalization class knows
how many input fields to expect. For instance, fields used only to
segregate data are not used for the actual network input and may
not be provided when the network is actually being queried.</DL>
</DD>
</DL>
<HR>
<A NAME="getValue(int)"><!-- --></A><H3>
getValue</H3>
<PRE>
double <B>getValue</B>(int i)</PRE>
<DL>
<DD>Called for input field types that require an index to get the current
value. This is used by the InputFieldArray1D and InputFieldArray2D
classes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - The index to read.
<DT><B>Returns:</B><DD>The value read.</DL>
</DD>
</DL>
<HR>
<A NAME="setCurrentValue(double)"><!-- --></A><H3>
setCurrentValue</H3>
<PRE>
void <B>setCurrentValue</B>(double d)</PRE>
<DL>
<DD>Set the current value of this field. This value is only valid while
the normalization is occurring.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>d</CODE> - The current value of this field.</DL>
</DD>
</DL>
<HR>
<A NAME="setMax(double)"><!-- --></A><H3>
setMax</H3>
<PRE>
void <B>setMax</B>(double max)</PRE>
<DL>
<DD>Set the current max value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>max</CODE> - The maximum value encountered on this field so far.</DL>
</DD>
</DL>
<HR>
<A NAME="setMin(double)"><!-- --></A><H3>
setMin</H3>
<PRE>
void <B>setMin</B>(double min)</PRE>
<DL>
<DD>Set the current min value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>min</CODE> - The minimum value encountered on this field so far.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/InputField.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../org/encog/util/normalize/input/HasFixedLength.html" title="interface in org.encog.util.normalize.input"><B>PREV CLASS</B></A>
<A HREF="../../../../../org/encog/util/normalize/input/InputFieldArray1D.html" title="class in org.encog.util.normalize.input"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/encog/util/normalize/input/InputField.html" target="_top"><B>FRAMES</B></A>
<A HREF="InputField.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if (window == top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2013. All Rights Reserved.
</BODY>
</HTML>
|
ladygagapowerbot/bachelor-thesis-implementation
|
lib/Encog/apidocs/org/encog/util/normalize/input/InputField.html
|
HTML
|
mit
| 17,467 |
import ConfigParser
import logging
import os
import sys
sys.path.append(os.path.dirname(os.path.realpath(__file__)))
sys.path.append(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir), "CountryReconciler"))
sys.path.append(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir), "LandPortalEntities"))
sys.path.append(os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir), "ModelToXml"))
from es.weso.fao.importer.fao_importer import FaoImporter
__author__ = 'BorjaGB'
def configure_log():
FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
logging.basicConfig(filename='faoextractor.log', level=logging.INFO,
format=FORMAT)
def update_ini_file(config, config_path, importer, log):
log.info("Updating ini file")
config.set("TRANSLATOR", 'obs_int', importer._obs_int)
config.set("TRANSLATOR", 'sli_int', importer._sli_int)
config.set("TRANSLATOR", 'dat_int', importer._dat_int)
config.set("TRANSLATOR", 'igr_int', importer._igr_int)
if hasattr(importer, '_historical_year'):
config.set("TRANSLATOR", 'historical_year', importer._historical_year)
with open("files/configuration.ini", 'wb') as configfile:
config.write(configfile)
def run():
configure_log()
log = logging.getLogger("faoextractor")
config_path = "files/configuration.ini"
config = ConfigParser.RawConfigParser()
config.read(config_path)
try:
fao_importer = FaoImporter(log, config, config.getboolean("TRANSLATOR", "historical_mode"))
fao_importer.run()
update_ini_file(config, config_path, fao_importer, log)
log.info("Done!")
except Exception as detail:
log.error("OOPS! Something went wrong %s" %detail)
if __name__ == '__main__':
run()
|
landportal/landbook-importers
|
old-importers/FAOFoodSecurityParser/main.py
|
Python
|
mit
| 1,899 |
/**
* Markdown Helper {{markdown}}
* Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors
* Licensed under the MIT License (MIT).
*/
'use strict';
var path = require('path');
var file = require('fs-utils');
var hljs = require('highlight.js');
var log = require('verbalize');
var marked = require('marked');
var matter = require('gray-matter');
var strip = require('strip-indent');
var _ = require('lodash');
var languages = require('./lib/lang.js');
var partial = require('./partial');
var helperError = function(name, msg) {
name = '\n {{' + name + '}} helper:';
log.warn(name, log.red(msg));
throw new Error(log.bold(name, log.red(msg)));
};
/**
* These need to be sorted out at some point
*/
// Initialize custom language settings for highlight.js
hljs.registerLanguage('less', require('./lib/less.js'));
hljs.registerLanguage('handlebars', require('./lib/handlebars.js'));
marked.setOptions({
renderer: new marked.Renderer(),
gfm: true,
tables: true,
breaks: false,
pedantic: false,
sanitize: false,
smartLists: true,
smartypants: false,
highlight: function (code, lang) {
try {
if (languages[lang]) {
lang = languages[lang];
} else {
return code;
}
return hljs.highlight(lang, code).value;
} catch(e) {
return hljs.highlightAuto(code).value;
}
}
});
module.exports.register = function (Handlebars, options, params) {
var include = partial(Handlebars, options, params);
options = options || {};
var opts = _.extend(options, options.data || {});
// expand glob patterns into an array of file paths.
Handlebars.registerHelper('expand', function (patterns) {
// Throw an error if invalid patterns are passed
if(!/string|array/.test(typeof patterns)) {
helperError('expand', 'expects an array, string or glob patterns.', this);
}
// Expand files.
var files = file.expand(patterns);
// Throw an error if no files are returned.
if(!files.length) {
helperError('expand', 'tried to expand "' + patterns + '" but no files were returned.', this);
}
return files;
});
// generic `marked` helper. can be used in other helpers
Handlebars.registerHelper('marked', function(str) {
return marked(str);
});
Handlebars.registerHelper('markdown', function (options) {
var content = strip(options.fn(this));
return new Handlebars.SafeString(marked(content || ''));
});
Handlebars.registerHelper('md', function (name, context) {
var result = include(name, _.extend(this, context)) || '';
return new Handlebars.SafeString(marked(result));
});
Handlebars.registerHelper('include', function (name, context) {
var result = include(name, _.extend(this, context)) || '';
return new Handlebars.SafeString(result);
});
var extend = function () {
var args = [].slice.call(arguments);
_.merge.apply(_, [this].concat(args));
return this;
};
Handlebars.registerHelper("extend", extend);
/**
* Read a template and compile it with the given context.
*
* @method read
* @param {String} filepath
* @param {Object} context
* @return {String}
*/
Handlebars.registerHelper('read', function (filepath, context) {
context.data = context.data || {};
var page = matter.read(filepath);
var metadata = _.extend(context.data.root, page.context);
var template = Handlebars.compile(page.content);
return new Handlebars.SafeString(template(metadata));
});
};
|
hbshci/fhi
|
templates/_helpers/helpers.js
|
JavaScript
|
mit
| 3,527 |
#!/bin/sh
# base16-shell (https://github.com/chriskempson/base16-shell)
# Base16 Shell template by Chris Kempson (http://chriskempson.com)
# Google Dark scheme by Seth Wright (http://sethawright.com)
# This script doesn't support linux console (use 'vconsole' template instead)
if [ "${TERM%%-*}" = 'linux' ]; then
return 2>/dev/null || exit 0
fi
color00="1d/1f/21" # Base 00 - Black
color01="CC/34/2B" # Base 08 - Red
color02="19/88/44" # Base 0B - Green
color03="FB/A9/22" # Base 0A - Yellow
color04="39/71/ED" # Base 0D - Blue
color05="A3/6A/C7" # Base 0E - Magenta
color06="39/71/ED" # Base 0C - Cyan
color07="c5/c8/c6" # Base 05 - White
color08="96/98/96" # Base 03 - Bright Black
color09=$color01 # Base 08 - Bright Red
color10=$color02 # Base 0B - Bright Green
color11=$color03 # Base 0A - Bright Yellow
color12=$color04 # Base 0D - Bright Blue
color13=$color05 # Base 0E - Bright Magenta
color14=$color06 # Base 0C - Bright Cyan
color15="ff/ff/ff" # Base 07 - Bright White
color16="F9/6A/38" # Base 09
color17="39/71/ED" # Base 0F
color18="28/2a/2e" # Base 01
color19="37/3b/41" # Base 02
color20="b4/b7/b4" # Base 04
color21="e0/e0/e0" # Base 06
color_foreground="c5/c8/c6" # Base 05
color_background="1d/1f/21" # Base 00
color_cursor="c5/c8/c6" # Base 05
if [ -n "$TMUX" ]; then
# Tell tmux to pass the escape sequences through
# (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324)
printf_template='\033Ptmux;\033\033]4;%d;rgb:%s\033\033\\\033\\'
printf_template_var='\033Ptmux;\033\033]%d;rgb:%s\033\033\\\033\\'
printf_template_custom='\033Ptmux;\033\033]%s%s\033\033\\\033\\'
elif [ "${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf_template='\033P\033]4;%d;rgb:%s\033\\'
printf_template_var='\033P\033]%d;rgb:%s\033\\'
printf_template_custom='\033P\033]%s%s\033\\'
else
printf_template='\033]4;%d;rgb:%s\033\\'
printf_template_var='\033]%d;rgb:%s\033\\'
printf_template_custom='\033]%s%s\033\\'
fi
# 16 color space
printf $printf_template 0 $color00
printf $printf_template 1 $color01
printf $printf_template 2 $color02
printf $printf_template 3 $color03
printf $printf_template 4 $color04
printf $printf_template 5 $color05
printf $printf_template 6 $color06
printf $printf_template 7 $color07
printf $printf_template 8 $color08
printf $printf_template 9 $color09
printf $printf_template 10 $color10
printf $printf_template 11 $color11
printf $printf_template 12 $color12
printf $printf_template 13 $color13
printf $printf_template 14 $color14
printf $printf_template 15 $color15
# 256 color space
printf $printf_template 16 $color16
printf $printf_template 17 $color17
printf $printf_template 18 $color18
printf $printf_template 19 $color19
printf $printf_template 20 $color20
printf $printf_template 21 $color21
# foreground / background / cursor color
if [ -n "$ITERM_SESSION_ID" ]; then
# iTerm2 proprietary escape codes
printf $printf_template_custom Pg c5c8c6 # forground
printf $printf_template_custom Ph 1d1f21 # background
printf $printf_template_custom Pi c5c8c6 # bold color
printf $printf_template_custom Pj 373b41 # selection color
printf $printf_template_custom Pk c5c8c6 # selected text color
printf $printf_template_custom Pl c5c8c6 # cursor
printf $printf_template_custom Pm 1d1f21 # cursor text
else
printf $printf_template_var 10 $color_foreground
printf $printf_template_var 11 $color_background
printf $printf_template_custom 12 ";7" # cursor (reverse video)
fi
# clean up
unset printf_template
unset printf_template_var
unset color00
unset color01
unset color02
unset color03
unset color04
unset color05
unset color06
unset color07
unset color08
unset color09
unset color10
unset color11
unset color12
unset color13
unset color14
unset color15
unset color16
unset color17
unset color18
unset color19
unset color20
unset color21
unset color_foreground
unset color_background
unset color_cursor
|
aruiz14/dotfiles
|
experimental-zsh-wincent/.zsh/base16-shell/scripts/base16-google-dark.sh
|
Shell
|
mit
| 3,977 |
from sorl.thumbnail.parsers import parse_geometry as xy_geometry_parser
def parse_geometry(geometry, ratio=None):
"""
Enhanced parse_geometry parser with percentage support.
"""
if "%" not in geometry:
# fall back to old parser
return xy_geometry_parser(geometry, ratio)
# parse with float so geometry strings like "42.11%" are possible
return float(geometry.strip("%")) / 100.0
|
originell/sorl-watermark
|
sorl_watermarker/parsers.py
|
Python
|
mit
| 421 |
/**
* This code was auto-generated by a Codezu.
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/
package com.mozu.api.contracts.productruntime;
import java.util.List;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import org.joda.time.DateTime;
import com.mozu.api.contracts.productruntime.Category;
/**
* The container for a non-paged list of related site-specific product category properties.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class CategoryCollection implements Serializable
{
// Default Serial Version UID
private static final long serialVersionUID = 1L;
/**
* The number of results listed in the query collection, represented by a signed 64-bit (8-byte) integer. This value is system-supplied and read-only.
*/
protected Integer totalCount;
public Integer getTotalCount() {
return this.totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
/**
* An array list of objects in the returned collection.
*/
protected List<Category> items;
public List<Category> getItems() {
return this.items;
}
public void setItems(List<Category> items) {
this.items = items;
}
}
|
johngatti/mozu-java
|
mozu-javaasync-core/src/main/java/com/mozu/api/contracts/productruntime/CategoryCollection.java
|
Java
|
mit
| 1,322 |
import "reflect-metadata";
import {expect} from "chai";
import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../../../utils/test-utils";
import {Connection} from "../../../../../src/connection/Connection";
import {Category} from "./entity/Category";
import {Post} from "./entity/Post";
import {Image} from "./entity/Image";
describe("decorators > relation-count-decorator > one-to-many", () => {
let connections: Connection[];
before(async () => connections = await createTestingConnections({
entities: [__dirname + "/entity/*{.js,.ts}"],
}));
beforeEach(() => reloadTestingDatabases(connections));
after(() => closeTestingConnections(connections));
it("should load relation count", () => Promise.all(connections.map(async connection => {
const image1 = new Image();
image1.id = 1;
image1.isRemoved = true;
image1.name = "image #1";
await connection.manager.save(image1);
const image2 = new Image();
image2.id = 2;
image2.name = "image #2";
await connection.manager.save(image2);
const image3 = new Image();
image3.id = 3;
image3.name = "image #3";
await connection.manager.save(image3);
const category1 = new Category();
category1.id = 1;
category1.name = "cars";
category1.isRemoved = true;
category1.images = [image1, image2];
await connection.manager.save(category1);
const category2 = new Category();
category2.id = 2;
category2.name = "BMW";
await connection.manager.save(category2);
const category3 = new Category();
category3.id = 3;
category3.name = "airplanes";
category3.images = [image3];
await connection.manager.save(category3);
const post1 = new Post();
post1.id = 1;
post1.title = "about BMW";
post1.categories = [category1, category2];
await connection.manager.save(post1);
const post2 = new Post();
post2.id = 2;
post2.title = "about Boeing";
post2.categories = [category3];
await connection.manager.save(post2);
let loadedPosts = await connection.manager
.createQueryBuilder(Post, "post")
.leftJoinAndSelect("post.categories", "categories")
.addOrderBy("post.id, categories.id")
.getMany();
expect(loadedPosts![0].categoryCount).to.be.equal(2);
expect(loadedPosts![0].removedCategoryCount).to.be.equal(1);
expect(loadedPosts![0].categories[0].imageCount).to.be.equal(2);
expect(loadedPosts![0].categories[0].removedImageCount).to.be.equal(1);
expect(loadedPosts![0].categories[1].imageCount).to.be.equal(0);
expect(loadedPosts![1].categoryCount).to.be.equal(1);
expect(loadedPosts![1].categories[0].imageCount).to.be.equal(1);
let loadedPost = await connection.manager
.createQueryBuilder(Post, "post")
.leftJoinAndSelect("post.categories", "categories")
.where("post.id = :id", {id: 1})
.addOrderBy("post.id, categories.id")
.getOne();
expect(loadedPost!.categoryCount).to.be.equal(2);
expect(loadedPost!.categories[0].imageCount).to.be.equal(2);
expect(loadedPost!.removedCategoryCount).to.be.equal(1);
expect(loadedPosts![0].categories[1].imageCount).to.be.equal(0);
expect(loadedPost!.categories[0].removedImageCount).to.be.equal(1);
})));
});
|
typeorm/typeorm
|
test/functional/decorators/relation-count/relation-count-one-to-many/relation-count-decorator-one-to-many.ts
|
TypeScript
|
mit
| 3,582 |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.ico" />
<title>ActivityGroup - Android SDK | Android Developers</title>
<!-- STYLESHEETS -->
<link rel="stylesheet"
href="http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto">
<link href="../../../assets/css/default.css" rel="stylesheet" type="text/css">
<!-- FULLSCREEN STYLESHEET -->
<link href="../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen"
type="text/css">
<!-- JAVASCRIPT -->
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script src="../../../assets/js/android_3p-bundle.js" type="text/javascript"></script>
<script type="text/javascript">
var toRoot = "../../../";
var devsite = false;
</script>
<script src="../../../assets/js/docs.js" type="text/javascript"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-5831155-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="gc-documentation
develop" itemscope itemtype="http://schema.org/Article">
<div id="doc-api-level" class="1" style="display:none"></div>
<a name="top"></a>
<a name="top"></a>
<!-- Header -->
<div id="header">
<div class="wrap" id="header-wrap">
<div class="col-3 logo">
<a href="../../../index.html">
<img src="../../../assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" />
</a>
<div class="btn-quicknav" id="btn-quicknav">
<a href="#" class="arrow-inactive">Quicknav</a>
<a href="#" class="arrow-active">Quicknav</a>
</div>
</div>
<ul class="nav-x col-9">
<li class="design">
<a href="../../../design/index.html"
zh-tw-lang="設計"
zh-cn-lang="设计"
ru-lang="Проектирование"
ko-lang="디자인"
ja-lang="設計"
es-lang="Diseñar"
>Design</a></li>
<li class="develop"><a href="../../../develop/index.html"
zh-tw-lang="開發"
zh-cn-lang="开发"
ru-lang="Разработка"
ko-lang="개발"
ja-lang="開発"
es-lang="Desarrollar"
>Develop</a></li>
<li class="distribute last"><a href="../../../distribute/index.html"
zh-tw-lang="發佈"
zh-cn-lang="分发"
ru-lang="Распространение"
ko-lang="배포"
ja-lang="配布"
es-lang="Distribuir"
>Distribute</a></li>
</ul>
<!-- New Search -->
<div class="menu-container">
<div class="moremenu">
<div id="more-btn"></div>
</div>
<div class="morehover" id="moremenu">
<div class="top"></div>
<div class="mid">
<div class="header">Links</div>
<ul>
<li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li>
<li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li>
<li><a href="../../../about/index.html">About Android</a></li>
</ul>
<div class="header">Android Sites</div>
<ul>
<li><a href="http://www.android.com">Android.com</a></li>
<li class="active"><a>Android Developers</a></li>
<li><a href="http://source.android.com">Android Open Source Project</a></li>
</ul>
<br class="clearfix" />
</div>
<div class="bottom"></div>
</div>
<div class="search" id="search-container">
<div class="search-inner">
<div id="search-btn"></div>
<div class="left"></div>
<form onsubmit="return submit_search()">
<input id="search_autocomplete" type="text" value="" autocomplete="off" name="q"
onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)"
onkeydown="return search_changed(event, true, '../../../')"
onkeyup="return search_changed(event, false, '../../../')" />
</form>
<div class="right"></div>
<a class="close hide">close</a>
<div class="left"></div>
<div class="right"></div>
</div>
</div>
<div class="search_filtered_wrapper reference">
<div class="suggest-card reference no-display">
<ul class="search_filtered">
</ul>
</div>
</div>
<div class="search_filtered_wrapper docs">
<div class="suggest-card dummy no-display"> </div>
<div class="suggest-card develop no-display">
<ul class="search_filtered">
</ul>
<div class="child-card guides no-display">
</div>
<div class="child-card training no-display">
</div>
</div>
<div class="suggest-card design no-display">
<ul class="search_filtered">
</ul>
</div>
<div class="suggest-card distribute no-display">
<ul class="search_filtered">
</ul>
</div>
</div>
</div>
<!-- /New Search>
<!-- Expanded quicknav -->
<div id="quicknav" class="col-9">
<ul>
<li class="design">
<ul>
<li><a href="../../../design/index.html">Get Started</a></li>
<li><a href="../../../design/style/index.html">Style</a></li>
<li><a href="../../../design/patterns/index.html">Patterns</a></li>
<li><a href="../../../design/building-blocks/index.html">Building Blocks</a></li>
<li><a href="../../../design/downloads/index.html">Downloads</a></li>
<li><a href="../../../design/videos/index.html">Videos</a></li>
</ul>
</li>
<li class="develop">
<ul>
<li><a href="../../../training/index.html"
zh-tw-lang="訓練課程"
zh-cn-lang="培训"
ru-lang="Курсы"
ko-lang="교육"
ja-lang="トレーニング"
es-lang="Capacitación"
>Training</a></li>
<li><a href="../../../guide/components/index.html"
zh-tw-lang="API 指南"
zh-cn-lang="API 指南"
ru-lang="Руководства по API"
ko-lang="API 가이드"
ja-lang="API ガイド"
es-lang="Guías de la API"
>API Guides</a></li>
<li><a href="../../../reference/packages.html"
zh-tw-lang="參考資源"
zh-cn-lang="参考"
ru-lang="Справочник"
ko-lang="참조문서"
ja-lang="リファレンス"
es-lang="Referencia"
>Reference</a></li>
<li><a href="../../../tools/index.html"
zh-tw-lang="相關工具"
zh-cn-lang="工具"
ru-lang="Инструменты"
ko-lang="도구"
ja-lang="ツール"
es-lang="Herramientas"
>Tools</a>
<ul><li><a href="../../../sdk/index.html">Get the SDK</a></li></ul>
</li>
<li><a href="../../../google/index.html">Google Services</a>
</li>
</ul>
</li>
<li class="distribute last">
<ul>
<li><a href="../../../distribute/index.html">Google Play</a></li>
<li><a href="../../../distribute/googleplay/publish/index.html">Publishing</a></li>
<li><a href="../../../distribute/googleplay/promote/index.html">Promoting</a></li>
<li><a href="../../../distribute/googleplay/quality/index.html">App Quality</a></li>
<li><a href="../../../distribute/googleplay/spotlight/index.html">Spotlight</a></li>
<li><a href="../../../distribute/open.html">Open Distribution</a></li>
</ul>
</li>
</ul>
</div>
<!-- /Expanded quicknav -->
</div>
</div>
<!-- /Header -->
<div id="searchResults" class="wrap" style="display:none;">
<h2 id="searchTitle">Results</h2>
<div id="leftSearchControl" class="search-control">Loading...</div>
</div>
<!-- Secondary x-nav -->
<div id="nav-x">
<div class="wrap">
<ul class="nav-x col-9 develop" style="width:100%">
<li class="training"><a href="../../../training/index.html"
zh-tw-lang="訓練課程"
zh-cn-lang="培训"
ru-lang="Курсы"
ko-lang="교육"
ja-lang="トレーニング"
es-lang="Capacitación"
>Training</a></li>
<li class="guide"><a href="../../../guide/components/index.html"
zh-tw-lang="API 指南"
zh-cn-lang="API 指南"
ru-lang="Руководства по API"
ko-lang="API 가이드"
ja-lang="API ガイド"
es-lang="Guías de la API"
>API Guides</a></li>
<li class="reference"><a href="../../../reference/packages.html"
zh-tw-lang="參考資源"
zh-cn-lang="参考"
ru-lang="Справочник"
ko-lang="참조문서"
ja-lang="リファレンス"
es-lang="Referencia"
>Reference</a></li>
<li class="tools"><a href="../../../tools/index.html"
zh-tw-lang="相關工具"
zh-cn-lang="工具"
ru-lang="Инструменты"
ko-lang="도구"
ja-lang="ツール"
es-lang="Herramientas"
>Tools</a></li>
<li class="google"><a href="../../../google/index.html"
>Google Services</a>
</li>
</ul>
</div>
</div>
<!-- /Sendondary x-nav -->
<div class="wrap clearfix" id="body-content">
<div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement">
<div id="devdoc-nav">
<a class="totop" href="#top" data-g-event="left-nav-top">to top</a>
<div id="api-nav-header">
<div id="api-level-toggle">
<label for="apiLevelCheckbox" class="disabled">API level: </label>
<div class="select-wrapper">
<select id="apiLevelSelector">
<!-- option elements added by buildApiLevelSelector() -->
</select>
</div>
</div><!-- end toggle -->
<div id="api-nav-title">Android APIs</div>
</div><!-- end nav header -->
<script>
var SINCE_DATA = [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19' ];
buildApiLevelSelector();
</script>
<div id="swapper">
<div id="nav-panels">
<div id="resize-packages-nav">
<div id="packages-nav" class="scroll-pane">
<ul>
<li class="api apilevel-1">
<a href="../../../reference/android/package-summary.html">android</a></li>
<li class="api apilevel-4">
<a href="../../../reference/android/accessibilityservice/package-summary.html">android.accessibilityservice</a></li>
<li class="api apilevel-5">
<a href="../../../reference/android/accounts/package-summary.html">android.accounts</a></li>
<li class="api apilevel-11">
<a href="../../../reference/android/animation/package-summary.html">android.animation</a></li>
<li class="selected api apilevel-1">
<a href="../../../reference/android/app/package-summary.html">android.app</a></li>
<li class="api apilevel-8">
<a href="../../../reference/android/app/admin/package-summary.html">android.app.admin</a></li>
<li class="api apilevel-8">
<a href="../../../reference/android/app/backup/package-summary.html">android.app.backup</a></li>
<li class="api apilevel-3">
<a href="../../../reference/android/appwidget/package-summary.html">android.appwidget</a></li>
<li class="api apilevel-5">
<a href="../../../reference/android/bluetooth/package-summary.html">android.bluetooth</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/content/package-summary.html">android.content</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/content/pm/package-summary.html">android.content.pm</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/content/res/package-summary.html">android.content.res</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/database/package-summary.html">android.database</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/database/sqlite/package-summary.html">android.database.sqlite</a></li>
<li class="api apilevel-11">
<a href="../../../reference/android/drm/package-summary.html">android.drm</a></li>
<li class="api apilevel-4">
<a href="../../../reference/android/gesture/package-summary.html">android.gesture</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/graphics/package-summary.html">android.graphics</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/graphics/drawable/package-summary.html">android.graphics.drawable</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/graphics/drawable/shapes/package-summary.html">android.graphics.drawable.shapes</a></li>
<li class="api apilevel-19">
<a href="../../../reference/android/graphics/pdf/package-summary.html">android.graphics.pdf</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/hardware/package-summary.html">android.hardware</a></li>
<li class="api apilevel-17">
<a href="../../../reference/android/hardware/display/package-summary.html">android.hardware.display</a></li>
<li class="api apilevel-16">
<a href="../../../reference/android/hardware/input/package-summary.html">android.hardware.input</a></li>
<li class="api apilevel-18">
<a href="../../../reference/android/hardware/location/package-summary.html">android.hardware.location</a></li>
<li class="api apilevel-12">
<a href="../../../reference/android/hardware/usb/package-summary.html">android.hardware.usb</a></li>
<li class="api apilevel-3">
<a href="../../../reference/android/inputmethodservice/package-summary.html">android.inputmethodservice</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/location/package-summary.html">android.location</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/media/package-summary.html">android.media</a></li>
<li class="api apilevel-9">
<a href="../../../reference/android/media/audiofx/package-summary.html">android.media.audiofx</a></li>
<li class="api apilevel-14">
<a href="../../../reference/android/media/effect/package-summary.html">android.media.effect</a></li>
<li class="api apilevel-12">
<a href="../../../reference/android/mtp/package-summary.html">android.mtp</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/net/package-summary.html">android.net</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/net/http/package-summary.html">android.net.http</a></li>
<li class="api apilevel-16">
<a href="../../../reference/android/net/nsd/package-summary.html">android.net.nsd</a></li>
<li class="api apilevel-12">
<a href="../../../reference/android/net/rtp/package-summary.html">android.net.rtp</a></li>
<li class="api apilevel-9">
<a href="../../../reference/android/net/sip/package-summary.html">android.net.sip</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/net/wifi/package-summary.html">android.net.wifi</a></li>
<li class="api apilevel-14">
<a href="../../../reference/android/net/wifi/p2p/package-summary.html">android.net.wifi.p2p</a></li>
<li class="api apilevel-16">
<a href="../../../reference/android/net/wifi/p2p/nsd/package-summary.html">android.net.wifi.p2p.nsd</a></li>
<li class="api apilevel-9">
<a href="../../../reference/android/nfc/package-summary.html">android.nfc</a></li>
<li class="api apilevel-19">
<a href="../../../reference/android/nfc/cardemulation/package-summary.html">android.nfc.cardemulation</a></li>
<li class="api apilevel-10">
<a href="../../../reference/android/nfc/tech/package-summary.html">android.nfc.tech</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/opengl/package-summary.html">android.opengl</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/os/package-summary.html">android.os</a></li>
<li class="api apilevel-9">
<a href="../../../reference/android/os/storage/package-summary.html">android.os.storage</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/preference/package-summary.html">android.preference</a></li>
<li class="api apilevel-19">
<a href="../../../reference/android/print/package-summary.html">android.print</a></li>
<li class="api apilevel-19">
<a href="../../../reference/android/print/pdf/package-summary.html">android.print.pdf</a></li>
<li class="api apilevel-19">
<a href="../../../reference/android/printservice/package-summary.html">android.printservice</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/provider/package-summary.html">android.provider</a></li>
<li class="api apilevel-11">
<a href="../../../reference/android/renderscript/package-summary.html">android.renderscript</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/sax/package-summary.html">android.sax</a></li>
<li class="api apilevel-14">
<a href="../../../reference/android/security/package-summary.html">android.security</a></li>
<li class="api apilevel-17">
<a href="../../../reference/android/service/dreams/package-summary.html">android.service.dreams</a></li>
<li class="api apilevel-18">
<a href="../../../reference/android/service/notification/package-summary.html">android.service.notification</a></li>
<li class="api apilevel-14">
<a href="../../../reference/android/service/textservice/package-summary.html">android.service.textservice</a></li>
<li class="api apilevel-7">
<a href="../../../reference/android/service/wallpaper/package-summary.html">android.service.wallpaper</a></li>
<li class="api apilevel-3">
<a href="../../../reference/android/speech/package-summary.html">android.speech</a></li>
<li class="api apilevel-4">
<a href="../../../reference/android/speech/tts/package-summary.html">android.speech.tts</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v13/app/package-summary.html">android.support.v13.app</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/accessibilityservice/package-summary.html">android.support.v4.accessibilityservice</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/app/package-summary.html">android.support.v4.app</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/content/package-summary.html">android.support.v4.content</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/content/pm/package-summary.html">android.support.v4.content.pm</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/database/package-summary.html">android.support.v4.database</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/graphics/drawable/package-summary.html">android.support.v4.graphics.drawable</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/hardware/display/package-summary.html">android.support.v4.hardware.display</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/media/package-summary.html">android.support.v4.media</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/net/package-summary.html">android.support.v4.net</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/os/package-summary.html">android.support.v4.os</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/print/package-summary.html">android.support.v4.print</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/text/package-summary.html">android.support.v4.text</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/util/package-summary.html">android.support.v4.util</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/view/package-summary.html">android.support.v4.view</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/view/accessibility/package-summary.html">android.support.v4.view.accessibility</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v4/widget/package-summary.html">android.support.v4.widget</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/app/package-summary.html">android.support.v7.app</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/appcompat/package-summary.html">android.support.v7.appcompat</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/gridlayout/package-summary.html">android.support.v7.gridlayout</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/media/package-summary.html">android.support.v7.media</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/mediarouter/package-summary.html">android.support.v7.mediarouter</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/view/package-summary.html">android.support.v7.view</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v7/widget/package-summary.html">android.support.v7.widget</a></li>
<li class="api apilevel-">
<a href="../../../reference/android/support/v8/renderscript/package-summary.html">android.support.v8.renderscript</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/telephony/package-summary.html">android.telephony</a></li>
<li class="api apilevel-5">
<a href="../../../reference/android/telephony/cdma/package-summary.html">android.telephony.cdma</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/telephony/gsm/package-summary.html">android.telephony.gsm</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/test/package-summary.html">android.test</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/test/mock/package-summary.html">android.test.mock</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/test/suitebuilder/package-summary.html">android.test.suitebuilder</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/text/package-summary.html">android.text</a></li>
<li class="api apilevel-3">
<a href="../../../reference/android/text/format/package-summary.html">android.text.format</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/text/method/package-summary.html">android.text.method</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/text/style/package-summary.html">android.text.style</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/text/util/package-summary.html">android.text.util</a></li>
<li class="api apilevel-19">
<a href="../../../reference/android/transition/package-summary.html">android.transition</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/util/package-summary.html">android.util</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/view/package-summary.html">android.view</a></li>
<li class="api apilevel-4">
<a href="../../../reference/android/view/accessibility/package-summary.html">android.view.accessibility</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/view/animation/package-summary.html">android.view.animation</a></li>
<li class="api apilevel-3">
<a href="../../../reference/android/view/inputmethod/package-summary.html">android.view.inputmethod</a></li>
<li class="api apilevel-14">
<a href="../../../reference/android/view/textservice/package-summary.html">android.view.textservice</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/webkit/package-summary.html">android.webkit</a></li>
<li class="api apilevel-1">
<a href="../../../reference/android/widget/package-summary.html">android.widget</a></li>
<li class="api apilevel-1">
<a href="../../../reference/dalvik/bytecode/package-summary.html">dalvik.bytecode</a></li>
<li class="api apilevel-1">
<a href="../../../reference/dalvik/system/package-summary.html">dalvik.system</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/awt/font/package-summary.html">java.awt.font</a></li>
<li class="api apilevel-3">
<a href="../../../reference/java/beans/package-summary.html">java.beans</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/io/package-summary.html">java.io</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/lang/package-summary.html">java.lang</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/lang/annotation/package-summary.html">java.lang.annotation</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/lang/ref/package-summary.html">java.lang.ref</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/lang/reflect/package-summary.html">java.lang.reflect</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/math/package-summary.html">java.math</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/net/package-summary.html">java.net</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/nio/package-summary.html">java.nio</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/nio/channels/package-summary.html">java.nio.channels</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/nio/channels/spi/package-summary.html">java.nio.channels.spi</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/nio/charset/package-summary.html">java.nio.charset</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/nio/charset/spi/package-summary.html">java.nio.charset.spi</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/security/package-summary.html">java.security</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/security/acl/package-summary.html">java.security.acl</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/security/cert/package-summary.html">java.security.cert</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/security/interfaces/package-summary.html">java.security.interfaces</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/security/spec/package-summary.html">java.security.spec</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/sql/package-summary.html">java.sql</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/text/package-summary.html">java.text</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/package-summary.html">java.util</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/concurrent/package-summary.html">java.util.concurrent</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/concurrent/atomic/package-summary.html">java.util.concurrent.atomic</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/concurrent/locks/package-summary.html">java.util.concurrent.locks</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/jar/package-summary.html">java.util.jar</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/logging/package-summary.html">java.util.logging</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/prefs/package-summary.html">java.util.prefs</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/regex/package-summary.html">java.util.regex</a></li>
<li class="api apilevel-1">
<a href="../../../reference/java/util/zip/package-summary.html">java.util.zip</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/crypto/package-summary.html">javax.crypto</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/crypto/interfaces/package-summary.html">javax.crypto.interfaces</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/crypto/spec/package-summary.html">javax.crypto.spec</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/microedition/khronos/egl/package-summary.html">javax.microedition.khronos.egl</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/microedition/khronos/opengles/package-summary.html">javax.microedition.khronos.opengles</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/net/package-summary.html">javax.net</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/net/ssl/package-summary.html">javax.net.ssl</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/security/auth/package-summary.html">javax.security.auth</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/security/auth/callback/package-summary.html">javax.security.auth.callback</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/security/auth/login/package-summary.html">javax.security.auth.login</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/security/auth/x500/package-summary.html">javax.security.auth.x500</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/security/cert/package-summary.html">javax.security.cert</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/sql/package-summary.html">javax.sql</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/xml/package-summary.html">javax.xml</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/datatype/package-summary.html">javax.xml.datatype</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/namespace/package-summary.html">javax.xml.namespace</a></li>
<li class="api apilevel-1">
<a href="../../../reference/javax/xml/parsers/package-summary.html">javax.xml.parsers</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/transform/package-summary.html">javax.xml.transform</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/transform/dom/package-summary.html">javax.xml.transform.dom</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/transform/sax/package-summary.html">javax.xml.transform.sax</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/transform/stream/package-summary.html">javax.xml.transform.stream</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/validation/package-summary.html">javax.xml.validation</a></li>
<li class="api apilevel-8">
<a href="../../../reference/javax/xml/xpath/package-summary.html">javax.xml.xpath</a></li>
<li class="api apilevel-1">
<a href="../../../reference/junit/framework/package-summary.html">junit.framework</a></li>
<li class="api apilevel-1">
<a href="../../../reference/junit/runner/package-summary.html">junit.runner</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/package-summary.html">org.apache.http</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/auth/package-summary.html">org.apache.http.auth</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/auth/params/package-summary.html">org.apache.http.auth.params</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/client/package-summary.html">org.apache.http.client</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/client/entity/package-summary.html">org.apache.http.client.entity</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/client/methods/package-summary.html">org.apache.http.client.methods</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/client/params/package-summary.html">org.apache.http.client.params</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/client/protocol/package-summary.html">org.apache.http.client.protocol</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/client/utils/package-summary.html">org.apache.http.client.utils</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/conn/package-summary.html">org.apache.http.conn</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/conn/params/package-summary.html">org.apache.http.conn.params</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/conn/routing/package-summary.html">org.apache.http.conn.routing</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/conn/scheme/package-summary.html">org.apache.http.conn.scheme</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/conn/ssl/package-summary.html">org.apache.http.conn.ssl</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/conn/util/package-summary.html">org.apache.http.conn.util</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/cookie/package-summary.html">org.apache.http.cookie</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/cookie/params/package-summary.html">org.apache.http.cookie.params</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/entity/package-summary.html">org.apache.http.entity</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/package-summary.html">org.apache.http.impl</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/auth/package-summary.html">org.apache.http.impl.auth</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/client/package-summary.html">org.apache.http.impl.client</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/conn/package-summary.html">org.apache.http.impl.conn</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/conn/tsccm/package-summary.html">org.apache.http.impl.conn.tsccm</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/cookie/package-summary.html">org.apache.http.impl.cookie</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/entity/package-summary.html">org.apache.http.impl.entity</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/impl/io/package-summary.html">org.apache.http.impl.io</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/io/package-summary.html">org.apache.http.io</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/message/package-summary.html">org.apache.http.message</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/params/package-summary.html">org.apache.http.params</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/protocol/package-summary.html">org.apache.http.protocol</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/apache/http/util/package-summary.html">org.apache.http.util</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/json/package-summary.html">org.json</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/w3c/dom/package-summary.html">org.w3c.dom</a></li>
<li class="api apilevel-8">
<a href="../../../reference/org/w3c/dom/ls/package-summary.html">org.w3c.dom.ls</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/xml/sax/package-summary.html">org.xml.sax</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/xml/sax/ext/package-summary.html">org.xml.sax.ext</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/xml/sax/helpers/package-summary.html">org.xml.sax.helpers</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/xmlpull/v1/package-summary.html">org.xmlpull.v1</a></li>
<li class="api apilevel-1">
<a href="../../../reference/org/xmlpull/v1/sax2/package-summary.html">org.xmlpull.v1.sax2</a></li>
</ul><br/>
</div> <!-- end packages-nav -->
</div> <!-- end resize-packages -->
<div id="classes-nav" class="scroll-pane">
<ul>
<li><h2>Interfaces</h2>
<ul>
<li class="api apilevel-11"><a href="../../../reference/android/app/ActionBar.OnMenuVisibilityListener.html">ActionBar.OnMenuVisibilityListener</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/ActionBar.OnNavigationListener.html">ActionBar.OnNavigationListener</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/ActionBar.TabListener.html">ActionBar.TabListener</a></li>
<li class="api apilevel-14"><a href="../../../reference/android/app/Application.ActivityLifecycleCallbacks.html">Application.ActivityLifecycleCallbacks</a></li>
<li class="api apilevel-18"><a href="../../../reference/android/app/Application.OnProvideAssistDataListener.html">Application.OnProvideAssistDataListener</a></li>
<li class="api apilevel-19"><a href="../../../reference/android/app/AppOpsManager.OnOpChangedListener.html">AppOpsManager.OnOpChangedListener</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/DatePickerDialog.OnDateSetListener.html">DatePickerDialog.OnDateSetListener</a></li>
<li class="api apilevel-12"><a href="../../../reference/android/app/FragmentBreadCrumbs.OnBreadCrumbClickListener.html">FragmentBreadCrumbs.OnBreadCrumbClickListener</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/FragmentManager.BackStackEntry.html">FragmentManager.BackStackEntry</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/FragmentManager.OnBackStackChangedListener.html">FragmentManager.OnBackStackChangedListener</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/KeyguardManager.OnKeyguardExitResult.html">KeyguardManager.OnKeyguardExitResult</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/LoaderManager.LoaderCallbacks.html">LoaderManager.LoaderCallbacks</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/PendingIntent.OnFinished.html">PendingIntent.OnFinished</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/SearchManager.OnCancelListener.html">SearchManager.OnCancelListener</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/SearchManager.OnDismissListener.html">SearchManager.OnDismissListener</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/TimePickerDialog.OnTimeSetListener.html">TimePickerDialog.OnTimeSetListener</a></li>
<li class="api apilevel-18"><a href="../../../reference/android/app/UiAutomation.AccessibilityEventFilter.html">UiAutomation.AccessibilityEventFilter</a></li>
<li class="api apilevel-18"><a href="../../../reference/android/app/UiAutomation.OnAccessibilityEventListener.html">UiAutomation.OnAccessibilityEventListener</a></li>
</ul>
</li>
<li><h2>Classes</h2>
<ul>
<li class="api apilevel-11"><a href="../../../reference/android/app/ActionBar.html">ActionBar</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/ActionBar.LayoutParams.html">ActionBar.LayoutParams</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/ActionBar.Tab.html">ActionBar.Tab</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Activity.html">Activity</a></li>
<li class="selected api apilevel-1"><a href="../../../reference/android/app/ActivityGroup.html">ActivityGroup</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ActivityManager.html">ActivityManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ActivityManager.MemoryInfo.html">ActivityManager.MemoryInfo</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ActivityManager.ProcessErrorStateInfo.html">ActivityManager.ProcessErrorStateInfo</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ActivityManager.RecentTaskInfo.html">ActivityManager.RecentTaskInfo</a></li>
<li class="api apilevel-3"><a href="../../../reference/android/app/ActivityManager.RunningAppProcessInfo.html">ActivityManager.RunningAppProcessInfo</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ActivityManager.RunningServiceInfo.html">ActivityManager.RunningServiceInfo</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ActivityManager.RunningTaskInfo.html">ActivityManager.RunningTaskInfo</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/ActivityOptions.html">ActivityOptions</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/AlarmManager.html">AlarmManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/AlertDialog.html">AlertDialog</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/AlertDialog.Builder.html">AlertDialog.Builder</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/AliasActivity.html">AliasActivity</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Application.html">Application</a></li>
<li class="api apilevel-14"><a href="../../../reference/android/app/ApplicationErrorReport.html">ApplicationErrorReport</a></li>
<li class="api apilevel-14"><a href="../../../reference/android/app/ApplicationErrorReport.AnrInfo.html">ApplicationErrorReport.AnrInfo</a></li>
<li class="api apilevel-14"><a href="../../../reference/android/app/ApplicationErrorReport.BatteryInfo.html">ApplicationErrorReport.BatteryInfo</a></li>
<li class="api apilevel-14"><a href="../../../reference/android/app/ApplicationErrorReport.CrashInfo.html">ApplicationErrorReport.CrashInfo</a></li>
<li class="api apilevel-14"><a href="../../../reference/android/app/ApplicationErrorReport.RunningServiceInfo.html">ApplicationErrorReport.RunningServiceInfo</a></li>
<li class="api apilevel-19"><a href="../../../reference/android/app/AppOpsManager.html">AppOpsManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/DatePickerDialog.html">DatePickerDialog</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Dialog.html">Dialog</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></li>
<li class="api apilevel-9"><a href="../../../reference/android/app/DownloadManager.html">DownloadManager</a></li>
<li class="api apilevel-9"><a href="../../../reference/android/app/DownloadManager.Query.html">DownloadManager.Query</a></li>
<li class="api apilevel-9"><a href="../../../reference/android/app/DownloadManager.Request.html">DownloadManager.Request</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ExpandableListActivity.html">ExpandableListActivity</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/Fragment.html">Fragment</a></li>
<li class="api apilevel-13"><a href="../../../reference/android/app/Fragment.SavedState.html">Fragment.SavedState</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/FragmentBreadCrumbs.html">FragmentBreadCrumbs</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/FragmentTransaction.html">FragmentTransaction</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Instrumentation.html">Instrumentation</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Instrumentation.ActivityMonitor.html">Instrumentation.ActivityMonitor</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Instrumentation.ActivityResult.html">Instrumentation.ActivityResult</a></li>
<li class="api apilevel-3"><a href="../../../reference/android/app/IntentService.html">IntentService</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/KeyguardManager.html">KeyguardManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/KeyguardManager.KeyguardLock.html">KeyguardManager.KeyguardLock</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/LauncherActivity.html">LauncherActivity</a></li>
<li class="api apilevel-3"><a href="../../../reference/android/app/LauncherActivity.IconResizer.html">LauncherActivity.IconResizer</a></li>
<li class="api apilevel-3"><a href="../../../reference/android/app/LauncherActivity.ListItem.html">LauncherActivity.ListItem</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ListActivity.html">ListActivity</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/ListFragment.html">ListFragment</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/LoaderManager.html">LoaderManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/LocalActivityManager.html">LocalActivityManager</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/MediaRouteActionProvider.html">MediaRouteActionProvider</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/MediaRouteButton.html">MediaRouteButton</a></li>
<li class="api apilevel-9"><a href="../../../reference/android/app/NativeActivity.html">NativeActivity</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Notification.html">Notification</a></li>
<li class="api apilevel-19"><a href="../../../reference/android/app/Notification.Action.html">Notification.Action</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/Notification.BigPictureStyle.html">Notification.BigPictureStyle</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/Notification.BigTextStyle.html">Notification.BigTextStyle</a></li>
<li class="api apilevel-11"><a href="../../../reference/android/app/Notification.Builder.html">Notification.Builder</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/Notification.InboxStyle.html">Notification.InboxStyle</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/Notification.Style.html">Notification.Style</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/NotificationManager.html">NotificationManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/PendingIntent.html">PendingIntent</a></li>
<li class="api apilevel-17"><a href="../../../reference/android/app/Presentation.html">Presentation</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/ProgressDialog.html">ProgressDialog</a></li>
<li class="api apilevel-8"><a href="../../../reference/android/app/SearchableInfo.html">SearchableInfo</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/SearchManager.html">SearchManager</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/Service.html">Service</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/TabActivity.html">TabActivity</a></li>
<li class="api apilevel-16"><a href="../../../reference/android/app/TaskStackBuilder.html">TaskStackBuilder</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/TimePickerDialog.html">TimePickerDialog</a></li>
<li class="api apilevel-18"><a href="../../../reference/android/app/UiAutomation.html">UiAutomation</a></li>
<li class="api apilevel-8"><a href="../../../reference/android/app/UiModeManager.html">UiModeManager</a></li>
<li class="api apilevel-7"><a href="../../../reference/android/app/WallpaperInfo.html">WallpaperInfo</a></li>
<li class="api apilevel-5"><a href="../../../reference/android/app/WallpaperManager.html">WallpaperManager</a></li>
</ul>
</li>
<li><h2>Exceptions</h2>
<ul>
<li class="api apilevel-11"><a href="../../../reference/android/app/Fragment.InstantiationException.html">Fragment.InstantiationException</a></li>
<li class="api apilevel-1"><a href="../../../reference/android/app/PendingIntent.CanceledException.html">PendingIntent.CanceledException</a></li>
</ul>
</li>
</ul><br/>
</div><!-- end classes -->
</div><!-- end nav-panels -->
<div id="nav-tree" style="display:none" class="scroll-pane">
<div id="tree-list"></div>
</div><!-- end nav-tree -->
</div><!-- end swapper -->
<div id="nav-swap">
<a class="fullscreen">fullscreen</a>
<a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>
</div>
</div> <!-- end devdoc-nav -->
</div> <!-- end side-nav -->
<script type="text/javascript">
// init fullscreen based on user pref
var fullscreen = readCookie("fullscreen");
if (fullscreen != 0) {
if (fullscreen == "false") {
toggleFullscreen(false);
} else {
toggleFullscreen(true);
}
}
// init nav version for mobile
if (isMobile) {
swapNav(); // tree view should be used on mobile
$('#nav-swap').hide();
} else {
chooseDefaultNav();
if ($("#nav-tree").is(':visible')) {
init_default_navtree("../../../");
}
}
// scroll the selected page into view
$(document).ready(function() {
scrollIntoView("packages-nav");
scrollIntoView("classes-nav");
});
</script>
<div class="col-12" id="doc-col">
<div id="api-info-block">
<div class="sum-details-links">
Summary:
<a href="#inhconstants">Inherited Constants</a>
| <a href="#inhfields">Inherited Fields</a>
| <a href="#pubctors">Ctors</a>
| <a href="#pubmethods">Methods</a>
| <a href="#promethods">Protected Methods</a>
| <a href="#inhmethods">Inherited Methods</a>
| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
</div><!-- end sum-details-links -->
<div class="api-level">
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a><br>Deprecated since <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels"
>API level 13</a>
</div>
</div><!-- end api-info-block -->
<!-- ======== START OF CLASS DATA ======== -->
<div id="jd-header">
public
class
<h1 itemprop="name">ActivityGroup</h1>
extends <a href="../../../reference/android/app/Activity.html">Activity</a><br/>
</div><!-- end header -->
<div id="naMessage"></div>
<div id="jd-content" class="api apilevel-1">
<table class="jd-inheritance-table">
<tr>
<td colspan="6" class="jd-inheritance-class-cell"><a href="../../../reference/java/lang/Object.html">java.lang.Object</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="5" class="jd-inheritance-class-cell"><a href="../../../reference/android/content/Context.html">android.content.Context</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="4" class="jd-inheritance-class-cell"><a href="../../../reference/android/content/ContextWrapper.html">android.content.ContextWrapper</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="3" class="jd-inheritance-class-cell"><a href="../../../reference/android/view/ContextThemeWrapper.html">android.view.ContextThemeWrapper</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="2" class="jd-inheritance-class-cell"><a href="../../../reference/android/app/Activity.html">android.app.Activity</a></td>
</tr>
<tr>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> </td>
<td class="jd-inheritance-space"> ↳</td>
<td colspan="1" class="jd-inheritance-class-cell">android.app.ActivityGroup</td>
</tr>
</table>
<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;">
<a href="#" onclick="return toggleInherited(this, null)" id="subclasses-direct" class="jd-expando-trigger closed"
><img id="subclasses-direct-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>Known Direct Subclasses
<div id="subclasses-direct">
<div id="subclasses-direct-list"
class="jd-inheritedlinks"
>
<a href="../../../reference/android/app/TabActivity.html">TabActivity</a>
</div>
<div id="subclasses-direct-summary"
style="display: none;"
>
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-linkcol"><a href="../../../reference/android/app/TabActivity.html">TabActivity</a></td>
<td class="jd-descrcol" width="100%"><em>
This class was deprecated
in API level 13.
New applications should use Fragments instead of this class;
to continue to run on older devices, you can use the v4 support library
which provides a version of the Fragment API that is compatible down to
<code><a href="../../../reference/android/os/Build.VERSION_CODES.html#DONUT">DONUT</a></code>.
</em> </td>
</tr>
</table>
</div>
</div>
</td></tr></table>
<div class="jd-descr">
<p>
<p class="caution"><strong>
This class was deprecated
in API level 13.</strong><br/>
Use the new <code><a href="../../../reference/android/app/Fragment.html">Fragment</a></code> and <code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> APIs
instead; these are also
available on older platforms through the Android compatibility package.
</p>
<h2>Class Overview</h2>
<p itemprop="articleBody">A screen that contains and runs multiple embedded activities.</p>
</div><!-- jd-descr -->
<div class="jd-descr">
<h2>Summary</h2>
<!-- =========== ENUM CONSTANT SUMMARY =========== -->
<table id="inhconstants" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Constants</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.app.Activity" class="jd-expando-trigger closed"
><img id="inherited-constants-android.app.Activity-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="../../../reference/android/app/Activity.html">android.app.Activity</a>
<div id="inherited-constants-android.app.Activity">
<div id="inherited-constants-android.app.Activity-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-constants-android.app.Activity-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#DEFAULT_KEYS_DIALER">DEFAULT_KEYS_DIALER</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/app/Activity.html#setDefaultKeyMode(int)">setDefaultKeyMode(int)</a></code> to launch the dialer during default
key handling.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#DEFAULT_KEYS_DISABLE">DEFAULT_KEYS_DISABLE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/app/Activity.html#setDefaultKeyMode(int)">setDefaultKeyMode(int)</a></code> to turn off default handling of
keys.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#DEFAULT_KEYS_SEARCH_GLOBAL">DEFAULT_KEYS_SEARCH_GLOBAL</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/app/Activity.html#setDefaultKeyMode(int)">setDefaultKeyMode(int)</a></code> to specify that unhandled keystrokes
will start a global search (typically web search, but some platforms may define alternate
methods for global search)
<p>See <code><a href="../../../reference/android/app/SearchManager.html">android.app.SearchManager</a></code> for more details.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#DEFAULT_KEYS_SEARCH_LOCAL">DEFAULT_KEYS_SEARCH_LOCAL</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/app/Activity.html#setDefaultKeyMode(int)">setDefaultKeyMode(int)</a></code> to specify that unhandled keystrokes
will start an application-defined search.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#DEFAULT_KEYS_SHORTCUT">DEFAULT_KEYS_SHORTCUT</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/app/Activity.html#setDefaultKeyMode(int)">setDefaultKeyMode(int)</a></code> to execute a menu shortcut in
default key handling.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#RESULT_CANCELED">RESULT_CANCELED</a></td>
<td class="jd-descrcol" width="100%">Standard activity result: operation canceled.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#RESULT_FIRST_USER">RESULT_FIRST_USER</a></td>
<td class="jd-descrcol" width="100%">Start of user-defined activity results.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#RESULT_OK">RESULT_OK</a></td>
<td class="jd-descrcol" width="100%">Standard activity result: operation succeeded.</td>
</tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.content.Context" class="jd-expando-trigger closed"
><img id="inherited-constants-android.content.Context-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="../../../reference/android/content/Context.html">android.content.Context</a>
<div id="inherited-constants-android.content.Context">
<div id="inherited-constants-android.content.Context-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-constants-android.content.Context-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-4" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#ACCESSIBILITY_SERVICE">ACCESSIBILITY_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/view/accessibility/AccessibilityManager.html">AccessibilityManager</a></code> for giving the user
feedback for UI events through the registered event listeners.</td>
</tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#ACCOUNT_SERVICE">ACCOUNT_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/accounts/AccountManager.html">AccountManager</a></code> for receiving intents at a
time of your choosing.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#ACTIVITY_SERVICE">ACTIVITY_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/ActivityManager.html">ActivityManager</a></code> for interacting with the global
system state.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#ALARM_SERVICE">ALARM_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/AlarmManager.html">AlarmManager</a></code> for receiving intents at a
time of your choosing.</td>
</tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#APP_OPS_SERVICE">APP_OPS_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/AppOpsManager.html">AppOpsManager</a></code> for tracking application operations
on the device.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#AUDIO_SERVICE">AUDIO_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/media/AudioManager.html">AudioManager</a></code> for handling management of volume,
ringer modes and audio routing.</td>
</tr>
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_ABOVE_CLIENT">BIND_ABOVE_CLIENT</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: indicates that the client application
binding to this service considers the service to be more important than
the app itself.</td>
</tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_ADJUST_WITH_ACTIVITY">BIND_ADJUST_WITH_ACTIVITY</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: If binding from an activity, allow the
target service's process importance to be raised based on whether the
activity is visible to the user, regardless whether another flag is
used to reduce the amount that the client process's overall importance
is used to impact it.</td>
</tr>
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_ALLOW_OOM_MANAGEMENT">BIND_ALLOW_OOM_MANAGEMENT</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: allow the process hosting the bound
service to go through its normal memory management.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_AUTO_CREATE">BIND_AUTO_CREATE</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: automatically create the service as long
as the binding exists.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_DEBUG_UNBIND">BIND_DEBUG_UNBIND</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: include debugging help for mismatched
calls to unbind.</td>
</tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_IMPORTANT">BIND_IMPORTANT</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: this service is very important to
the client, so should be brought to the foreground process level
when the client is.</td>
</tr>
<tr class="alt-color api apilevel-8" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_NOT_FOREGROUND">BIND_NOT_FOREGROUND</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: don't allow this binding to raise
the target service's process to the foreground scheduling priority.</td>
</tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BIND_WAIVE_PRIORITY">BIND_WAIVE_PRIORITY</a></td>
<td class="jd-descrcol" width="100%">Flag for <code><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService(Intent, ServiceConnection, int)</a></code>: don't impact the scheduling or
memory management priority of the target service's hosting process.</td>
</tr>
<tr class="alt-color api apilevel-18" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#BLUETOOTH_SERVICE">BLUETOOTH_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/bluetooth/BluetoothAdapter.html">BluetoothAdapter</a></code> for using Bluetooth.</td>
</tr>
<tr class=" api apilevel-19" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CAPTIONING_SERVICE">CAPTIONING_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/view/accessibility/CaptioningManager.html">CaptioningManager</a></code> for obtaining
captioning properties and listening for changes in captioning
preferences.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CLIPBOARD_SERVICE">CLIPBOARD_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/text/ClipboardManager.html">ClipboardManager</a></code> for accessing and modifying
the contents of the global clipboard.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CONNECTIVITY_SERVICE">CONNECTIVITY_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/net/ConnectivityManager.html">ConnectivityManager</a></code> for handling management of
network connections.</td>
</tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CONSUMER_IR_SERVICE">CONSUMER_IR_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/hardware/ConsumerIrManager.html">ConsumerIrManager</a></code> for transmitting infrared
signals from the device.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CONTEXT_IGNORE_SECURITY">CONTEXT_IGNORE_SECURITY</a></td>
<td class="jd-descrcol" width="100%">Flag for use with <code><a href="../../../reference/android/content/Context.html#createPackageContext(java.lang.String, int)">createPackageContext(String, int)</a></code>: ignore any security
restrictions on the Context being requested, allowing it to always
be loaded.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CONTEXT_INCLUDE_CODE">CONTEXT_INCLUDE_CODE</a></td>
<td class="jd-descrcol" width="100%">Flag for use with <code><a href="../../../reference/android/content/Context.html#createPackageContext(java.lang.String, int)">createPackageContext(String, int)</a></code>: include the application
code with the context.</td>
</tr>
<tr class=" api apilevel-4" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#CONTEXT_RESTRICTED">CONTEXT_RESTRICTED</a></td>
<td class="jd-descrcol" width="100%">Flag for use with <code><a href="../../../reference/android/content/Context.html#createPackageContext(java.lang.String, int)">createPackageContext(String, int)</a></code>: a restricted context may
disable specific features.</td>
</tr>
<tr class="alt-color api apilevel-8" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#DEVICE_POLICY_SERVICE">DEVICE_POLICY_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/admin/DevicePolicyManager.html">DevicePolicyManager</a></code> for working with global
device policy management.</td>
</tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#DISPLAY_SERVICE">DISPLAY_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/hardware/display/DisplayManager.html">DisplayManager</a></code> for interacting with display devices.</td>
</tr>
<tr class="alt-color api apilevel-9" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#DOWNLOAD_SERVICE">DOWNLOAD_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/DownloadManager.html">DownloadManager</a></code> for requesting HTTP downloads.</td>
</tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#DROPBOX_SERVICE">DROPBOX_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/os/DropBoxManager.html">DropBoxManager</a></code> instance for recording
diagnostic logs.</td>
</tr>
<tr class="alt-color api apilevel-3" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#INPUT_METHOD_SERVICE">INPUT_METHOD_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/view/inputmethod/InputMethodManager.html">InputMethodManager</a></code> for accessing input
methods.</td>
</tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#INPUT_SERVICE">INPUT_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/hardware/input/InputManager.html">InputManager</a></code> for interacting with input devices.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#KEYGUARD_SERVICE">KEYGUARD_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/NotificationManager.html">NotificationManager</a></code> for controlling keyguard.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#LAYOUT_INFLATER_SERVICE">LAYOUT_INFLATER_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/view/LayoutInflater.html">LayoutInflater</a></code> for inflating layout resources in this
context.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#LOCATION_SERVICE">LOCATION_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/location/LocationManager.html">LocationManager</a></code> for controlling location
updates.</td>
</tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MEDIA_ROUTER_SERVICE">MEDIA_ROUTER_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/media/MediaRouter.html">MediaRouter</a></code> for controlling and managing
routing of media.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MODE_APPEND">MODE_APPEND</a></td>
<td class="jd-descrcol" width="100%">File creation mode: for use with <code><a href="../../../reference/android/content/Context.html#openFileOutput(java.lang.String, int)">openFileOutput(String, int)</a></code>, if the file
already exists then write data to the end of the existing file
instead of erasing it.</td>
</tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MODE_ENABLE_WRITE_AHEAD_LOGGING">MODE_ENABLE_WRITE_AHEAD_LOGGING</a></td>
<td class="jd-descrcol" width="100%">Database open flag: when set, the database is opened with write-ahead
logging enabled by default.</td>
</tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MODE_MULTI_PROCESS">MODE_MULTI_PROCESS</a></td>
<td class="jd-descrcol" width="100%">SharedPreference loading flag: when set, the file on disk will
be checked for modification even if the shared preferences
instance is already loaded in this process.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MODE_PRIVATE">MODE_PRIVATE</a></td>
<td class="jd-descrcol" width="100%">File creation mode: the default mode, where the created file can only
be accessed by the calling application (or all applications sharing the
same user ID).</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MODE_WORLD_READABLE">MODE_WORLD_READABLE</a></td>
<td class="jd-descrcol" width="100%"><em>
This constant was deprecated
in API level 17.
Creating world-readable files is very dangerous, and likely
to cause security holes in applications. It is strongly discouraged;
instead, applications should use more formal mechanism for interactions
such as <code><a href="../../../reference/android/content/ContentProvider.html">ContentProvider</a></code>, <code><a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a></code>, and
<code><a href="../../../reference/android/app/Service.html">Service</a></code>. There are no guarantees that this
access mode will remain on a file, such as when it goes through a
backup and restore.
File creation mode: allow all other applications to have read access
to the created file.</em></td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#MODE_WORLD_WRITEABLE">MODE_WORLD_WRITEABLE</a></td>
<td class="jd-descrcol" width="100%"><em>
This constant was deprecated
in API level 17.
Creating world-writable files is very dangerous, and likely
to cause security holes in applications. It is strongly discouraged;
instead, applications should use more formal mechanism for interactions
such as <code><a href="../../../reference/android/content/ContentProvider.html">ContentProvider</a></code>, <code><a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a></code>, and
<code><a href="../../../reference/android/app/Service.html">Service</a></code>. There are no guarantees that this
access mode will remain on a file, such as when it goes through a
backup and restore.
File creation mode: allow all other applications to have write access
to the created file.</em></td>
</tr>
<tr class="alt-color api apilevel-10" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#NFC_SERVICE">NFC_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/nfc/NfcManager.html">NfcManager</a></code> for using NFC.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#NOTIFICATION_SERVICE">NOTIFICATION_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/NotificationManager.html">NotificationManager</a></code> for informing the user of
background events.</td>
</tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#NSD_SERVICE">NSD_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/net/nsd/NsdManager.html">NsdManager</a></code> for handling management of network service
discovery</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#POWER_SERVICE">POWER_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/os/PowerManager.html">PowerManager</a></code> for controlling power management,
including "wake locks," which let you keep the device on while
you're running long tasks.</td>
</tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#PRINT_SERVICE">PRINT_SERVICE</a></td>
<td class="jd-descrcol" width="100%"><code><a href="../../../reference/android/print/PrintManager.html">PrintManager</a></code> for printing and managing
printers and print tasks.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#SEARCH_SERVICE">SEARCH_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/app/SearchManager.html">SearchManager</a></code> for handling searches.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#SENSOR_SERVICE">SENSOR_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/hardware/SensorManager.html">SensorManager</a></code> for accessing sensors.</td>
</tr>
<tr class=" api apilevel-9" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#STORAGE_SERVICE">STORAGE_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/os/storage/StorageManager.html">StorageManager</a></code> for accessing system storage
functions.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#TELEPHONY_SERVICE">TELEPHONY_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/telephony/TelephonyManager.html">TelephonyManager</a></code> for handling management the
telephony features of the device.</td>
</tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#TEXT_SERVICES_MANAGER_SERVICE">TEXT_SERVICES_MANAGER_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/view/textservice/TextServicesManager.html">TextServicesManager</a></code> for accessing
text services.</td>
</tr>
<tr class="alt-color api apilevel-8" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#UI_MODE_SERVICE">UI_MODE_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/app/UiModeManager.html">UiModeManager</a></code> for controlling UI modes.</td>
</tr>
<tr class=" api apilevel-12" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#USB_SERVICE">USB_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/hardware/usb/UsbManager.html">UsbManager</a></code> for access to USB devices (as a USB host)
and for controlling this device's behavior as a USB device.</td>
</tr>
<tr class="alt-color api apilevel-17" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#USER_SERVICE">USER_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/os/UserManager.html">UserManager</a></code> for managing users on devices that support multiple users.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#VIBRATOR_SERVICE">VIBRATOR_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/os/Vibrator.html">Vibrator</a></code> for interacting with the vibration hardware.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#WALLPAPER_SERVICE">WALLPAPER_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
com.android.server.WallpaperService for accessing wallpapers.</td>
</tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#WIFI_P2P_SERVICE">WIFI_P2P_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/net/wifi/p2p/WifiP2pManager.html">WifiP2pManager</a></code> for handling management of
Wi-Fi peer-to-peer connections.</td>
</tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#WIFI_SERVICE">WIFI_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a <code><a href="../../../reference/android/net/wifi/WifiManager.html">WifiManager</a></code> for handling management of
Wi-Fi access.</td>
</tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><a href="../../../reference/java/lang/String.html">String</a></td>
<td class="jd-linkcol"><a href="../../../reference/android/content/Context.html#WINDOW_SERVICE">WINDOW_SERVICE</a></td>
<td class="jd-descrcol" width="100%">Use with <code><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService(String)</a></code> to retrieve a
<code><a href="../../../reference/android/view/WindowManager.html">WindowManager</a></code> for accessing the system's window
manager.</td>
</tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.content.ComponentCallbacks2" class="jd-expando-trigger closed"
><img id="inherited-constants-android.content.ComponentCallbacks2-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From interface
<a href="../../../reference/android/content/ComponentCallbacks2.html">android.content.ComponentCallbacks2</a>
<div id="inherited-constants-android.content.ComponentCallbacks2">
<div id="inherited-constants-android.content.ComponentCallbacks2-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-constants-android.content.ComponentCallbacks2-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND">TRIM_MEMORY_BACKGROUND</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process has gone on to the
LRU list.</td>
</tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE">TRIM_MEMORY_COMPLETE</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process is nearing the end
of the background LRU list, and if more memory isn't found soon it will
be killed.</td>
</tr>
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE">TRIM_MEMORY_MODERATE</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process is around the middle
of the background LRU list; freeing memory can help the system keep
other processes running later in the list for better overall performance.</td>
</tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL">TRIM_MEMORY_RUNNING_CRITICAL</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process is not an expendable
background process, but the device is running extremely low on memory
and is about to not be able to keep any background processes running.</td>
</tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW">TRIM_MEMORY_RUNNING_LOW</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process is not an expendable
background process, but the device is running low on memory.</td>
</tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE">TRIM_MEMORY_RUNNING_MODERATE</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process is not an expendable
background process, but the device is running moderately low on memory.</td>
</tr>
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol">int</td>
<td class="jd-linkcol"><a href="../../../reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN">TRIM_MEMORY_UI_HIDDEN</a></td>
<td class="jd-descrcol" width="100%">Level for <code><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory(int)</a></code>: the process had been showing
a user interface, and is no longer doing so.</td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<!-- =========== FIELD SUMMARY =========== -->
<table id="inhfields" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Fields</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-fields-android.app.Activity" class="jd-expando-trigger closed"
><img id="inherited-fields-android.app.Activity-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>From class
<a href="../../../reference/android/app/Activity.html">android.app.Activity</a>
<div id="inherited-fields-android.app.Activity">
<div id="inherited-fields-android.app.Activity-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-fields-android.app.Activity-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
protected
static
final
int[]</nobr></td>
<td class="jd-linkcol"><a href="../../../reference/android/app/Activity.html#FOCUSED_STATE_SET">FOCUSED_STATE_SET</a></td>
<td class="jd-descrcol" width="100%"></td>
</tr>
</table>
</div>
</div>
</td></tr>
</table>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#ActivityGroup()">ActivityGroup</a></span>()</nobr>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#ActivityGroup(boolean)">ActivityGroup</a></span>(boolean singleActivityMode)</nobr>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/Activity.html">Activity</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#getCurrentActivity()">getCurrentActivity</a></span>()</nobr>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/app/LocalActivityManager.html">LocalActivityManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#getLocalActivityManager()">getLocalActivityManager</a></span>()</nobr>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#onCreate(android.os.Bundle)">onCreate</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> savedInstanceState)</nobr>
<div class="jd-descrdiv">Called when the activity is starting.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#onDestroy()">onDestroy</a></span>()</nobr>
<div class="jd-descrdiv">Perform any final cleanup before an activity is destroyed.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#onPause()">onPause</a></span>()</nobr>
<div class="jd-descrdiv">Called as part of the activity lifecycle when an activity is going into
the background, but has not (yet) been killed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#onResume()">onResume</a></span>()</nobr>
<div class="jd-descrdiv">Called after <code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code>, <code><a href="../../../reference/android/app/Activity.html#onRestart()">onRestart()</a></code>, or
<code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code>, for your activity to start interacting with the user.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> outState)</nobr>
<div class="jd-descrdiv">Called to retrieve per-instance state from an activity before being killed
so that the state can be restored in <code><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate(Bundle)</a></code> or
<code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code> (the <code><a href="../../../reference/android/os/Bundle.html">Bundle</a></code> populated by this method
will be passed to both).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/ActivityGroup.html#onStop()">onStop</a></span>()</nobr>
<div class="jd-descrdiv">Called when you are no longer visible to the user.</div>
</td></tr>
</table>
<!-- ========== METHOD SUMMARY =========== -->
<table id="inhmethods" class="jd-sumtable"><tr><th>
<a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a>
<div style="clear:left;">Inherited Methods</div></th></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.app.Activity" class="jd-expando-trigger closed"
><img id="inherited-methods-android.app.Activity-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../reference/android/app/Activity.html">android.app.Activity</a>
<div id="inherited-methods-android.app.Activity">
<div id="inherited-methods-android.app.Activity-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.app.Activity-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#addContentView(android.view.View, android.view.ViewGroup.LayoutParams)">addContentView</a></span>(<a href="../../../reference/android/view/View.html">View</a> view, <a href="../../../reference/android/view/ViewGroup.LayoutParams.html">ViewGroup.LayoutParams</a> params)</nobr>
<div class="jd-descrdiv">Add an additional content view to the activity.</div>
</td></tr>
<tr class=" api apilevel-3" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#closeContextMenu()">closeContextMenu</a></span>()</nobr>
<div class="jd-descrdiv">Programmatically closes the most recently opened context menu, if showing.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#closeOptionsMenu()">closeOptionsMenu</a></span>()</nobr>
<div class="jd-descrdiv">Progammatically closes the options menu.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/PendingIntent.html">PendingIntent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#createPendingResult(int, android.content.Intent, int)">createPendingResult</a></span>(int requestCode, <a href="../../../reference/android/content/Intent.html">Intent</a> data, int flags)</nobr>
<div class="jd-descrdiv">Create a new PendingIntent object which you can hand to others
for them to use to send result data back to your
<code><a href="../../../reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)">onActivityResult(int, int, Intent)</a></code> callback.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dismissDialog(int)">dismissDialog</a></span>(int id)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></code> class with
<code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class=" api apilevel-12" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dispatchGenericMotionEvent(android.view.MotionEvent)">dispatchGenericMotionEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> ev)</nobr>
<div class="jd-descrdiv">Called to process generic motion events.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dispatchKeyEvent(android.view.KeyEvent)">dispatchKeyEvent</a></span>(<a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process key events.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dispatchKeyShortcutEvent(android.view.KeyEvent)">dispatchKeyShortcutEvent</a></span>(<a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process a key shortcut event.</div>
</td></tr>
<tr class="alt-color api apilevel-4" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)">dispatchPopulateAccessibilityEvent</a></span>(<a href="../../../reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process population of <code><a href="../../../reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a></code>s.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dispatchTouchEvent(android.view.MotionEvent)">dispatchTouchEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> ev)</nobr>
<div class="jd-descrdiv">Called to process touch screen events.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dispatchTrackballEvent(android.view.MotionEvent)">dispatchTrackballEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> ev)</nobr>
<div class="jd-descrdiv">Called to process trackball events.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[])">dump</a></span>(<a href="../../../reference/java/lang/String.html">String</a> prefix, <a href="../../../reference/java/io/FileDescriptor.html">FileDescriptor</a> fd, <a href="../../../reference/java/io/PrintWriter.html">PrintWriter</a> writer, <a href="../../../reference/java/lang/String.html">String[]</a> args)</nobr>
<div class="jd-descrdiv">Print the Activity's state into the given stream.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#findViewById(int)">findViewById</a></span>(int id)</nobr>
<div class="jd-descrdiv">Finds a view that was identified by the id attribute from the XML that
was processed in <code><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate(Bundle)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#finish()">finish</a></span>()</nobr>
<div class="jd-descrdiv">Call this when your activity is done and should be closed.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#finishActivity(int)">finishActivity</a></span>(int requestCode)</nobr>
<div class="jd-descrdiv">Force finish another activity that you had previously started with
<code><a href="../../../reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#finishActivityFromChild(android.app.Activity, int)">finishActivityFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child, int requestCode)</nobr>
<div class="jd-descrdiv">This is called when a child activity of this one calls its
finishActivity().</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#finishAffinity()">finishAffinity</a></span>()</nobr>
<div class="jd-descrdiv">Finish this activity as well as all activities immediately below it
in the current task that have the same affinity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#finishFromChild(android.app.Activity)">finishFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child)</nobr>
<div class="jd-descrdiv">This is called when a child activity of this one calls its
<code><a href="../../../reference/android/app/Activity.html#finish()">finish()</a></code> method.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/ActionBar.html">ActionBar</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getActionBar()">getActionBar</a></span>()</nobr>
<div class="jd-descrdiv">Retrieve a reference to this activity's ActionBar.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/app/Application.html">Application</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getApplication()">getApplication</a></span>()</nobr>
<div class="jd-descrdiv">Return the application that owns this activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/ComponentName.html">ComponentName</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getCallingActivity()">getCallingActivity</a></span>()</nobr>
<div class="jd-descrdiv">Return the name of the activity that invoked this activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getCallingPackage()">getCallingPackage</a></span>()</nobr>
<div class="jd-descrdiv">Return the name of the package that invoked this activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getChangingConfigurations()">getChangingConfigurations</a></span>()</nobr>
<div class="jd-descrdiv">If this activity is being destroyed because it can not handle a
configuration parameter being changed (and thus its
<code><a href="../../../reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)">onConfigurationChanged(Configuration)</a></code> method is
<em>not</em> being called), then you can use this method to discover
the set of changes that have occurred while in the process of being
destroyed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/ComponentName.html">ComponentName</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getComponentName()">getComponentName</a></span>()</nobr>
<div class="jd-descrdiv">Returns complete component name of this activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getCurrentFocus()">getCurrentFocus</a></span>()</nobr>
<div class="jd-descrdiv">Calls <code><a href="../../../reference/android/view/Window.html#getCurrentFocus()">getCurrentFocus()</a></code> on the
Window of this Activity to return the currently focused view.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getFragmentManager()">getFragmentManager</a></span>()</nobr>
<div class="jd-descrdiv">Return the FragmentManager for interacting with fragments associated
with this activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Intent.html">Intent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getIntent()">getIntent</a></span>()</nobr>
<div class="jd-descrdiv">Return the intent that started this activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getLastNonConfigurationInstance()">getLastNonConfigurationInstance</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/Fragment.html">Fragment</a></code> API
<code><a href="../../../reference/android/app/Fragment.html#setRetainInstance(boolean)">setRetainInstance(boolean)</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/LayoutInflater.html">LayoutInflater</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getLayoutInflater()">getLayoutInflater</a></span>()</nobr>
<div class="jd-descrdiv">Convenience for calling
<code><a href="../../../reference/android/view/Window.html#getLayoutInflater()">getLayoutInflater()</a></code>.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/LoaderManager.html">LoaderManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getLoaderManager()">getLoaderManager</a></span>()</nobr>
<div class="jd-descrdiv">Return the LoaderManager for this fragment, creating it if needed.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getLocalClassName()">getLocalClassName</a></span>()</nobr>
<div class="jd-descrdiv">Returns class name for this activity with the package prefix removed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/MenuInflater.html">MenuInflater</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getMenuInflater()">getMenuInflater</a></span>()</nobr>
<div class="jd-descrdiv">Returns a <code><a href="../../../reference/android/view/MenuInflater.html">MenuInflater</a></code> with this context.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/app/Activity.html">Activity</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getParent()">getParent</a></span>()</nobr>
<div class="jd-descrdiv">Return the parent activity if this view is an embedded child.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Intent.html">Intent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getParentActivityIntent()">getParentActivityIntent</a></span>()</nobr>
<div class="jd-descrdiv">Obtain an <code><a href="../../../reference/android/content/Intent.html">Intent</a></code> that will launch an explicit target activity specified by
this activity's logical parent.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/SharedPreferences.html">SharedPreferences</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getPreferences(int)">getPreferences</a></span>(int mode)</nobr>
<div class="jd-descrdiv">Retrieve a <code><a href="../../../reference/android/content/SharedPreferences.html">SharedPreferences</a></code> object for accessing preferences
that are private to this activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getRequestedOrientation()">getRequestedOrientation</a></span>()</nobr>
<div class="jd-descrdiv">Return the current requested orientation of the activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getSystemService(java.lang.String)">getSystemService</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Return the handle to a system-level service by name.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getTaskId()">getTaskId</a></span>()</nobr>
<div class="jd-descrdiv">Return the identifier of the task this activity is in.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/java/lang/CharSequence.html">CharSequence</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getTitle()">getTitle</a></span>()</nobr>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getTitleColor()">getTitleColor</a></span>()</nobr>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getVolumeControlStream()">getVolumeControlStream</a></span>()</nobr>
<div class="jd-descrdiv">Gets the suggested audio stream whose volume should be changed by the
harwdare volume controls.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/Window.html">Window</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getWindow()">getWindow</a></span>()</nobr>
<div class="jd-descrdiv">Retrieve the current <code><a href="../../../reference/android/view/Window.html">Window</a></code> for the activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/WindowManager.html">WindowManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#getWindowManager()">getWindowManager</a></span>()</nobr>
<div class="jd-descrdiv">Retrieve the window manager for showing custom windows.</div>
</td></tr>
<tr class=" api apilevel-3" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#hasWindowFocus()">hasWindowFocus</a></span>()</nobr>
<div class="jd-descrdiv">Returns true if this activity's <em>main</em> window currently has window focus.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#invalidateOptionsMenu()">invalidateOptionsMenu</a></span>()</nobr>
<div class="jd-descrdiv">Declare that the options menu has changed, so should be recreated.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#isChangingConfigurations()">isChangingConfigurations</a></span>()</nobr>
<div class="jd-descrdiv">Check to see whether this activity is in the process of being destroyed in order to be
recreated with a new configuration.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#isChild()">isChild</a></span>()</nobr>
<div class="jd-descrdiv">Is this activity embedded inside of another activity? </div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#isDestroyed()">isDestroyed</a></span>()</nobr>
<div class="jd-descrdiv">Returns true if the final <code><a href="../../../reference/android/app/Activity.html#onDestroy()">onDestroy()</a></code> call has been made
on the Activity, so this instance is now dead.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#isFinishing()">isFinishing</a></span>()</nobr>
<div class="jd-descrdiv">Check to see whether this activity is in the process of finishing,
either because you called <code><a href="../../../reference/android/app/Activity.html#finish()">finish()</a></code> on it or someone else
has requested that it finished.</div>
</td></tr>
<tr class=" api apilevel-18" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#isImmersive()">isImmersive</a></span>()</nobr>
<div class="jd-descrdiv">Bit indicating that this activity is "immersive" and should not be
interrupted by notifications if possible.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#isTaskRoot()">isTaskRoot</a></span>()</nobr>
<div class="jd-descrdiv">Return whether this activity is the root of a task.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/database/Cursor.html">Cursor</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)">managedQuery</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, <a href="../../../reference/java/lang/String.html">String[]</a> projection, <a href="../../../reference/java/lang/String.html">String</a> selection, <a href="../../../reference/java/lang/String.html">String[]</a> selectionArgs, <a href="../../../reference/java/lang/String.html">String</a> sortOrder)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 11.
Use <code><a href="../../../reference/android/content/CursorLoader.html">CursorLoader</a></code> instead.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#moveTaskToBack(boolean)">moveTaskToBack</a></span>(boolean nonRoot)</nobr>
<div class="jd-descrdiv">Move the task containing this activity to the back of the activity
stack.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#navigateUpTo(android.content.Intent)">navigateUpTo</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> upIntent)</nobr>
<div class="jd-descrdiv">Navigate from this activity to the activity specified by upIntent, finishing this activity
in the process.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#navigateUpToFromChild(android.app.Activity, android.content.Intent)">navigateUpToFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child, <a href="../../../reference/android/content/Intent.html">Intent</a> upIntent)</nobr>
<div class="jd-descrdiv">This is called when a child activity of this one calls its
<code><a href="../../../reference/android/app/Activity.html#navigateUpTo(android.content.Intent)">navigateUpTo(Intent)</a></code> method.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onActionModeFinished(android.view.ActionMode)">onActionModeFinished</a></span>(<a href="../../../reference/android/view/ActionMode.html">ActionMode</a> mode)</nobr>
<div class="jd-descrdiv">Notifies the activity that an action mode has finished.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onActionModeStarted(android.view.ActionMode)">onActionModeStarted</a></span>(<a href="../../../reference/android/view/ActionMode.html">ActionMode</a> mode)</nobr>
<div class="jd-descrdiv">Notifies the Activity that an action mode has been started.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)">onActivityResult</a></span>(int requestCode, int resultCode, <a href="../../../reference/android/content/Intent.html">Intent</a> data)</nobr>
<div class="jd-descrdiv">Called when an activity you launched exits, giving you the requestCode
you started it with, the resultCode it returned, and any additional
data from it.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onApplyThemeResource(android.content.res.Resources.Theme, int, boolean)">onApplyThemeResource</a></span>(<a href="../../../reference/android/content/res/Resources.Theme.html">Resources.Theme</a> theme, int resid, boolean first)</nobr>
<div class="jd-descrdiv">Called by <code><a href="../../../reference/android/view/ContextThemeWrapper.html#setTheme(int)">setTheme(int)</a></code> and <code><a href="../../../reference/android/view/ContextThemeWrapper.html#getTheme()">getTheme()</a></code> to apply a theme
resource to the current Theme object.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onAttachFragment(android.app.Fragment)">onAttachFragment</a></span>(<a href="../../../reference/android/app/Fragment.html">Fragment</a> fragment)</nobr>
<div class="jd-descrdiv">Called when a Fragment is being attached to this activity, immediately
after the call to its <code><a href="../../../reference/android/app/Fragment.html#onAttach(android.app.Activity)">Fragment.onAttach()</a></code>
method and before <code><a href="../../../reference/android/app/Fragment.html#onCreate(android.os.Bundle)">Fragment.onCreate()</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onAttachedToWindow()">onAttachedToWindow</a></span>()</nobr>
<div class="jd-descrdiv">Called when the main window associated with the activity has been
attached to the window manager.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onBackPressed()">onBackPressed</a></span>()</nobr>
<div class="jd-descrdiv">Called when the activity has detected the user's press of the back
key.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onChildTitleChanged(android.app.Activity, java.lang.CharSequence)">onChildTitleChanged</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> childActivity, <a href="../../../reference/java/lang/CharSequence.html">CharSequence</a> title)</nobr>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onConfigurationChanged(android.content.res.Configuration)">onConfigurationChanged</a></span>(<a href="../../../reference/android/content/res/Configuration.html">Configuration</a> newConfig)</nobr>
<div class="jd-descrdiv">Called by the system when the device configuration changes while your
activity is running.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onContentChanged()">onContentChanged</a></span>()</nobr>
<div class="jd-descrdiv">This hook is called whenever the content view of the screen changes
(due to a call to
<code><a href="../../../reference/android/view/Window.html#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)">Window.setContentView</a></code> or
<code><a href="../../../reference/android/view/Window.html#addContentView(android.view.View, android.view.ViewGroup.LayoutParams)">Window.addContentView</a></code>).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onContextItemSelected(android.view.MenuItem)">onContextItemSelected</a></span>(<a href="../../../reference/android/view/MenuItem.html">MenuItem</a> item)</nobr>
<div class="jd-descrdiv">This hook is called whenever an item in a context menu is selected.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onContextMenuClosed(android.view.Menu)">onContextMenuClosed</a></span>(<a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">This hook is called whenever the context menu is being closed (either by
the user canceling the menu with the back/menu button, or when an item is
selected).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> savedInstanceState)</nobr>
<div class="jd-descrdiv">Called when the activity is starting.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo)">onCreateContextMenu</a></span>(<a href="../../../reference/android/view/ContextMenu.html">ContextMenu</a> menu, <a href="../../../reference/android/view/View.html">View</a> v, <a href="../../../reference/android/view/ContextMenu.ContextMenuInfo.html">ContextMenu.ContextMenuInfo</a> menuInfo)</nobr>
<div class="jd-descrdiv">Called when a context menu for the <code>view</code> is about to be shown.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/CharSequence.html">CharSequence</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateDescription()">onCreateDescription</a></span>()</nobr>
<div class="jd-descrdiv">Generate a new description for this activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/Dialog.html">Dialog</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateDialog(int)">onCreateDialog</a></span>(int id)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 8.
Old no-arguments version of <code><a href="../../../reference/android/app/Activity.html#onCreateDialog(int, android.os.Bundle)">onCreateDialog(int, Bundle)</a></code>.
</em></div>
</td></tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/app/Dialog.html">Dialog</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateDialog(int, android.os.Bundle)">onCreateDialog</a></span>(int id, <a href="../../../reference/android/os/Bundle.html">Bundle</a> args)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></code> class with
<code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)">onCreateNavigateUpTaskStack</a></span>(<a href="../../../reference/android/app/TaskStackBuilder.html">TaskStackBuilder</a> builder)</nobr>
<div class="jd-descrdiv">Define the synthetic task stack that will be generated during Up navigation from
a different task.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateOptionsMenu(android.view.Menu)">onCreateOptionsMenu</a></span>(<a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Initialize the contents of the Activity's standard options menu.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreatePanelMenu(int, android.view.Menu)">onCreatePanelMenu</a></span>(int featureId, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Default implementation of
<code><a href="../../../reference/android/view/Window.Callback.html#onCreatePanelMenu(int, android.view.Menu)">onCreatePanelMenu(int, Menu)</a></code>
for activities.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreatePanelView(int)">onCreatePanelView</a></span>(int featureId)</nobr>
<div class="jd-descrdiv">Default implementation of
<code><a href="../../../reference/android/view/Window.Callback.html#onCreatePanelView(int)">onCreatePanelView(int)</a></code>
for activities.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateThumbnail(android.graphics.Bitmap, android.graphics.Canvas)">onCreateThumbnail</a></span>(<a href="../../../reference/android/graphics/Bitmap.html">Bitmap</a> outBitmap, <a href="../../../reference/android/graphics/Canvas.html">Canvas</a> canvas)</nobr>
<div class="jd-descrdiv">Generate a new thumbnail for this activity.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView</a></span>(<a href="../../../reference/android/view/View.html">View</a> parent, <a href="../../../reference/java/lang/String.html">String</a> name, <a href="../../../reference/android/content/Context.html">Context</a> context, <a href="../../../reference/android/util/AttributeSet.html">AttributeSet</a> attrs)</nobr>
<div class="jd-descrdiv">Standard implementation of
<code><a href="../../../reference/android/view/LayoutInflater.Factory2.html#onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView(View, String, Context, AttributeSet)</a></code>
used when inflating with the LayoutInflater returned by <code><a href="../../../reference/android/app/Activity.html#getSystemService(java.lang.String)">getSystemService(String)</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, <a href="../../../reference/android/content/Context.html">Context</a> context, <a href="../../../reference/android/util/AttributeSet.html">AttributeSet</a> attrs)</nobr>
<div class="jd-descrdiv">Standard implementation of
<code><a href="../../../reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView(String, Context, AttributeSet)</a></code> used when
inflating with the LayoutInflater returned by <code><a href="../../../reference/android/app/Activity.html#getSystemService(java.lang.String)">getSystemService(String)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onDestroy()">onDestroy</a></span>()</nobr>
<div class="jd-descrdiv">Perform any final cleanup before an activity is destroyed.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onDetachedFromWindow()">onDetachedFromWindow</a></span>()</nobr>
<div class="jd-descrdiv">Called when the main window associated with the activity has been
detached from the window manager.</div>
</td></tr>
<tr class=" api apilevel-12" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onGenericMotionEvent(android.view.MotionEvent)">onGenericMotionEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a generic motion event was not handled by any of the
views inside of the activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onKeyDown(int, android.view.KeyEvent)">onKeyDown</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a key was pressed down and not handled by any of the views
inside of the activity.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onKeyLongPress(int, android.view.KeyEvent)">onKeyLongPress</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Default implementation of <code><a href="../../../reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int, android.view.KeyEvent)">KeyEvent.Callback.onKeyLongPress()</a></code>: always returns false (doesn't handle
the event).</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onKeyMultiple(int, int, android.view.KeyEvent)">onKeyMultiple</a></span>(int keyCode, int repeatCount, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Default implementation of <code><a href="../../../reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int, int, android.view.KeyEvent)">KeyEvent.Callback.onKeyMultiple()</a></code>: always returns false (doesn't handle
the event).</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onKeyShortcut(int, android.view.KeyEvent)">onKeyShortcut</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a key shortcut event is not handled by any of the views in the Activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onKeyUp(int, android.view.KeyEvent)">onKeyUp</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a key was released and not handled by any of the views
inside of the activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onLowMemory()">onLowMemory</a></span>()</nobr>
<div class="jd-descrdiv">This is called when the overall system is running low on memory, and
actively running processes should trim their memory usage.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onMenuItemSelected(int, android.view.MenuItem)">onMenuItemSelected</a></span>(int featureId, <a href="../../../reference/android/view/MenuItem.html">MenuItem</a> item)</nobr>
<div class="jd-descrdiv">Default implementation of
<code><a href="../../../reference/android/view/Window.Callback.html#onMenuItemSelected(int, android.view.MenuItem)">onMenuItemSelected(int, MenuItem)</a></code>
for activities.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onMenuOpened(int, android.view.Menu)">onMenuOpened</a></span>(int featureId, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Called when a panel's menu is opened by the user.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onNavigateUp()">onNavigateUp</a></span>()</nobr>
<div class="jd-descrdiv">This method is called whenever the user chooses to navigate Up within your application's
activity hierarchy from the action bar.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onNavigateUpFromChild(android.app.Activity)">onNavigateUpFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child)</nobr>
<div class="jd-descrdiv">This is called when a child activity of this one attempts to navigate up.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onNewIntent(android.content.Intent)">onNewIntent</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">This is called for activities that set launchMode to "singleTop" in
their package, or if a client used the <code><a href="../../../reference/android/content/Intent.html#FLAG_ACTIVITY_SINGLE_TOP">FLAG_ACTIVITY_SINGLE_TOP</a></code>
flag when calling <code><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onOptionsItemSelected(android.view.MenuItem)">onOptionsItemSelected</a></span>(<a href="../../../reference/android/view/MenuItem.html">MenuItem</a> item)</nobr>
<div class="jd-descrdiv">This hook is called whenever an item in your options menu is selected.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onOptionsMenuClosed(android.view.Menu)">onOptionsMenuClosed</a></span>(<a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">This hook is called whenever the options menu is being closed (either by the user canceling
the menu with the back/menu button, or when an item is selected).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPanelClosed(int, android.view.Menu)">onPanelClosed</a></span>(int featureId, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Default implementation of
<code><a href="../../../reference/android/view/Window.Callback.html#onPanelClosed(int, android.view.Menu)">onPanelClosed(int, Menu)</a></code> for
activities.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPause()">onPause</a></span>()</nobr>
<div class="jd-descrdiv">Called as part of the activity lifecycle when an activity is going into
the background, but has not (yet) been killed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPostCreate(android.os.Bundle)">onPostCreate</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> savedInstanceState)</nobr>
<div class="jd-descrdiv">Called when activity start-up is complete (after <code><a href="../../../reference/android/app/Activity.html#onStart()">onStart()</a></code>
and <code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code> have been called).</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPostResume()">onPostResume</a></span>()</nobr>
<div class="jd-descrdiv">Called when activity resume is complete (after <code><a href="../../../reference/android/app/Activity.html#onResume()">onResume()</a></code> has
been called).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPrepareDialog(int, android.app.Dialog)">onPrepareDialog</a></span>(int id, <a href="../../../reference/android/app/Dialog.html">Dialog</a> dialog)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 8.
Old no-arguments version of
<code><a href="../../../reference/android/app/Activity.html#onPrepareDialog(int, android.app.Dialog, android.os.Bundle)">onPrepareDialog(int, Dialog, Bundle)</a></code>.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-8" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPrepareDialog(int, android.app.Dialog, android.os.Bundle)">onPrepareDialog</a></span>(int id, <a href="../../../reference/android/app/Dialog.html">Dialog</a> dialog, <a href="../../../reference/android/os/Bundle.html">Bundle</a> args)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></code> class with
<code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)">onPrepareNavigateUpTaskStack</a></span>(<a href="../../../reference/android/app/TaskStackBuilder.html">TaskStackBuilder</a> builder)</nobr>
<div class="jd-descrdiv">Prepare the synthetic task stack that will be generated during Up navigation
from a different task.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPrepareOptionsMenu(android.view.Menu)">onPrepareOptionsMenu</a></span>(<a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Prepare the Screen's standard options menu to be displayed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onPreparePanel(int, android.view.View, android.view.Menu)">onPreparePanel</a></span>(int featureId, <a href="../../../reference/android/view/View.html">View</a> view, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Default implementation of
<code><a href="../../../reference/android/view/Window.Callback.html#onPreparePanel(int, android.view.View, android.view.Menu)">onPreparePanel(int, View, Menu)</a></code>
for activities.</div>
</td></tr>
<tr class="alt-color api apilevel-18" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onProvideAssistData(android.os.Bundle)">onProvideAssistData</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> data)</nobr>
<div class="jd-descrdiv">This is called when the user is requesting an assist, to build a full
<code><a href="../../../reference/android/content/Intent.html#ACTION_ASSIST">ACTION_ASSIST</a></code> Intent with all of the context of the current
application.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onRestart()">onRestart</a></span>()</nobr>
<div class="jd-descrdiv">Called after <code><a href="../../../reference/android/app/Activity.html#onStop()">onStop()</a></code> when the current activity is being
re-displayed to the user (the user has navigated back to it).</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> savedInstanceState)</nobr>
<div class="jd-descrdiv">This method is called after <code><a href="../../../reference/android/app/Activity.html#onStart()">onStart()</a></code> when the activity is
being re-initialized from a previously saved state, given here in
<var>savedInstanceState</var>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onResume()">onResume</a></span>()</nobr>
<div class="jd-descrdiv">Called after <code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code>, <code><a href="../../../reference/android/app/Activity.html#onRestart()">onRestart()</a></code>, or
<code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code>, for your activity to start interacting with the user.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onRetainNonConfigurationInstance()">onRetainNonConfigurationInstance</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/Fragment.html">Fragment</a></code> API
<code><a href="../../../reference/android/app/Fragment.html#setRetainInstance(boolean)">setRetainInstance(boolean)</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState</a></span>(<a href="../../../reference/android/os/Bundle.html">Bundle</a> outState)</nobr>
<div class="jd-descrdiv">Called to retrieve per-instance state from an activity before being killed
so that the state can be restored in <code><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate(Bundle)</a></code> or
<code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code> (the <code><a href="../../../reference/android/os/Bundle.html">Bundle</a></code> populated by this method
will be passed to both).</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onSearchRequested()">onSearchRequested</a></span>()</nobr>
<div class="jd-descrdiv">This hook is called when the user signals the desire to start a search.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onStart()">onStart</a></span>()</nobr>
<div class="jd-descrdiv">Called after <code><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate(Bundle)</a></code> — or after <code><a href="../../../reference/android/app/Activity.html#onRestart()">onRestart()</a></code> when
the activity had been stopped, but is now again being displayed to the
user.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onStop()">onStop</a></span>()</nobr>
<div class="jd-descrdiv">Called when you are no longer visible to the user.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onTitleChanged(java.lang.CharSequence, int)">onTitleChanged</a></span>(<a href="../../../reference/java/lang/CharSequence.html">CharSequence</a> title, int color)</nobr>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onTouchEvent(android.view.MotionEvent)">onTouchEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a touch screen event was not handled by any of the views
under it.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onTrackballEvent(android.view.MotionEvent)">onTrackballEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when the trackball was moved and not handled by any of the
views inside of the activity.</div>
</td></tr>
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onTrimMemory(int)">onTrimMemory</a></span>(int level)</nobr>
<div class="jd-descrdiv">Called when the operating system has determined that it is a good
time for a process to trim unneeded memory from its process.</div>
</td></tr>
<tr class=" api apilevel-3" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onUserInteraction()">onUserInteraction</a></span>()</nobr>
<div class="jd-descrdiv">Called whenever a key, touch, or trackball event is dispatched to the
activity.</div>
</td></tr>
<tr class="alt-color api apilevel-3" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onUserLeaveHint()">onUserLeaveHint</a></span>()</nobr>
<div class="jd-descrdiv">Called as part of the activity lifecycle when an activity is about to go
into the background as the result of user choice.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)">onWindowAttributesChanged</a></span>(<a href="../../../reference/android/view/WindowManager.LayoutParams.html">WindowManager.LayoutParams</a> params)</nobr>
<div class="jd-descrdiv">This is called whenever the current window attributes change.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onWindowFocusChanged(boolean)">onWindowFocusChanged</a></span>(boolean hasFocus)</nobr>
<div class="jd-descrdiv">Called when the current <code><a href="../../../reference/android/view/Window.html">Window</a></code> of the activity gains or loses
focus.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/ActionMode.html">ActionMode</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#onWindowStartingActionMode(android.view.ActionMode.Callback)">onWindowStartingActionMode</a></span>(<a href="../../../reference/android/view/ActionMode.Callback.html">ActionMode.Callback</a> callback)</nobr>
<div class="jd-descrdiv">Give the Activity a chance to control the UI for an action mode requested
by the system.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#openContextMenu(android.view.View)">openContextMenu</a></span>(<a href="../../../reference/android/view/View.html">View</a> view)</nobr>
<div class="jd-descrdiv">Programmatically opens the context menu for a particular <code>view</code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#openOptionsMenu()">openOptionsMenu</a></span>()</nobr>
<div class="jd-descrdiv">Programmatically opens the options menu.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#overridePendingTransition(int, int)">overridePendingTransition</a></span>(int enterAnim, int exitAnim)</nobr>
<div class="jd-descrdiv">Call immediately after one of the flavors of <code><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code>
or <code><a href="../../../reference/android/app/Activity.html#finish()">finish()</a></code> to specify an explicit transition animation to
perform next.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#recreate()">recreate</a></span>()</nobr>
<div class="jd-descrdiv">Cause this Activity to be recreated with a new instance.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#registerForContextMenu(android.view.View)">registerForContextMenu</a></span>(<a href="../../../reference/android/view/View.html">View</a> view)</nobr>
<div class="jd-descrdiv">Registers a context menu to be shown for the given view (multiple views
can show the context menu).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#removeDialog(int)">removeDialog</a></span>(int id)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></code> class with
<code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#reportFullyDrawn()">reportFullyDrawn</a></span>()</nobr>
<div class="jd-descrdiv">Report to the system that your app is now fully drawn, purely for diagnostic
purposes (calling it does not impact the visible behavior of the activity).</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#requestWindowFeature(int)">requestWindowFeature</a></span>(int featureId)</nobr>
<div class="jd-descrdiv">Enable extended window features.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable)">runOnUiThread</a></span>(<a href="../../../reference/java/lang/Runnable.html">Runnable</a> action)</nobr>
<div class="jd-descrdiv">Runs the specified action on the UI thread.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setContentView(int)">setContentView</a></span>(int layoutResID)</nobr>
<div class="jd-descrdiv">Set the activity content from a layout resource.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setContentView(android.view.View)">setContentView</a></span>(<a href="../../../reference/android/view/View.html">View</a> view)</nobr>
<div class="jd-descrdiv">Set the activity content to an explicit view.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)">setContentView</a></span>(<a href="../../../reference/android/view/View.html">View</a> view, <a href="../../../reference/android/view/ViewGroup.LayoutParams.html">ViewGroup.LayoutParams</a> params)</nobr>
<div class="jd-descrdiv">Set the activity content to an explicit view.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setDefaultKeyMode(int)">setDefaultKeyMode</a></span>(int mode)</nobr>
<div class="jd-descrdiv">Select the default key handling for this activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setFeatureDrawable(int, android.graphics.drawable.Drawable)">setFeatureDrawable</a></span>(int featureId, <a href="../../../reference/android/graphics/drawable/Drawable.html">Drawable</a> drawable)</nobr>
<div class="jd-descrdiv">Convenience for calling
<code><a href="../../../reference/android/view/Window.html#setFeatureDrawable(int, android.graphics.drawable.Drawable)">setFeatureDrawable(int, Drawable)</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setFeatureDrawableAlpha(int, int)">setFeatureDrawableAlpha</a></span>(int featureId, int alpha)</nobr>
<div class="jd-descrdiv">Convenience for calling
<code><a href="../../../reference/android/view/Window.html#setFeatureDrawableAlpha(int, int)">setFeatureDrawableAlpha(int, int)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setFeatureDrawableResource(int, int)">setFeatureDrawableResource</a></span>(int featureId, int resId)</nobr>
<div class="jd-descrdiv">Convenience for calling
<code><a href="../../../reference/android/view/Window.html#setFeatureDrawableResource(int, int)">setFeatureDrawableResource(int, int)</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setFeatureDrawableUri(int, android.net.Uri)">setFeatureDrawableUri</a></span>(int featureId, <a href="../../../reference/android/net/Uri.html">Uri</a> uri)</nobr>
<div class="jd-descrdiv">Convenience for calling
<code><a href="../../../reference/android/view/Window.html#setFeatureDrawableUri(int, android.net.Uri)">setFeatureDrawableUri(int, Uri)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setFinishOnTouchOutside(boolean)">setFinishOnTouchOutside</a></span>(boolean finish)</nobr>
<div class="jd-descrdiv">Sets whether this activity is finished when touched outside its window's
bounds.</div>
</td></tr>
<tr class="alt-color api apilevel-18" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setImmersive(boolean)">setImmersive</a></span>(boolean i)</nobr>
<div class="jd-descrdiv">Adjust the current immersive mode setting.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setIntent(android.content.Intent)">setIntent</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> newIntent)</nobr>
<div class="jd-descrdiv">Change the intent returned by <code><a href="../../../reference/android/app/Activity.html#getIntent()">getIntent()</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setProgress(int)">setProgress</a></span>(int progress)</nobr>
<div class="jd-descrdiv">Sets the progress for the progress bars in the title.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setProgressBarIndeterminate(boolean)">setProgressBarIndeterminate</a></span>(boolean indeterminate)</nobr>
<div class="jd-descrdiv">Sets whether the horizontal progress bar in the title should be indeterminate (the circular
is always indeterminate).</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setProgressBarIndeterminateVisibility(boolean)">setProgressBarIndeterminateVisibility</a></span>(boolean visible)</nobr>
<div class="jd-descrdiv">Sets the visibility of the indeterminate progress bar in the title.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setProgressBarVisibility(boolean)">setProgressBarVisibility</a></span>(boolean visible)</nobr>
<div class="jd-descrdiv">Sets the visibility of the progress bar in the title.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setRequestedOrientation(int)">setRequestedOrientation</a></span>(int requestedOrientation)</nobr>
<div class="jd-descrdiv">Change the desired orientation of this activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setResult(int)">setResult</a></span>(int resultCode)</nobr>
<div class="jd-descrdiv">Call this to set the result that your activity will return to its
caller.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setResult(int, android.content.Intent)">setResult</a></span>(int resultCode, <a href="../../../reference/android/content/Intent.html">Intent</a> data)</nobr>
<div class="jd-descrdiv">Call this to set the result that your activity will return to its
caller.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setSecondaryProgress(int)">setSecondaryProgress</a></span>(int secondaryProgress)</nobr>
<div class="jd-descrdiv">Sets the secondary progress for the progress bar in the title.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setTitle(int)">setTitle</a></span>(int titleId)</nobr>
<div class="jd-descrdiv">Change the title associated with this activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setTitle(java.lang.CharSequence)">setTitle</a></span>(<a href="../../../reference/java/lang/CharSequence.html">CharSequence</a> title)</nobr>
<div class="jd-descrdiv">Change the title associated with this activity.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setTitleColor(int)">setTitleColor</a></span>(int textColor)</nobr>
</td></tr>
<tr class=" api apilevel-3" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setVisible(boolean)">setVisible</a></span>(boolean visible)</nobr>
<div class="jd-descrdiv">Control whether this activity's main window is visible.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#setVolumeControlStream(int)">setVolumeControlStream</a></span>(int streamType)</nobr>
<div class="jd-descrdiv">Suggests an audio stream whose volume should be changed by the hardware
volume controls.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#shouldUpRecreateTask(android.content.Intent)">shouldUpRecreateTask</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> targetIntent)</nobr>
<div class="jd-descrdiv">Returns true if the app should recreate the task when navigating 'up' from this activity
by using targetIntent.</div>
</td></tr>
<tr class="alt-color api apilevel-8" >
<td class="jd-typecol"><nobr>
final
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#showDialog(int, android.os.Bundle)">showDialog</a></span>(int id, <a href="../../../reference/android/os/Bundle.html">Bundle</a> args)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></code> class with
<code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#showDialog(int)">showDialog</a></span>(int id)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 13.
Use the new <code><a href="../../../reference/android/app/DialogFragment.html">DialogFragment</a></code> class with
<code><a href="../../../reference/android/app/FragmentManager.html">FragmentManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/view/ActionMode.html">ActionMode</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActionMode(android.view.ActionMode.Callback)">startActionMode</a></span>(<a href="../../../reference/android/view/ActionMode.Callback.html">ActionMode.Callback</a> callback)</nobr>
<div class="jd-descrdiv">Start an action mode.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivities(android.content.Intent[], android.os.Bundle)">startActivities</a></span>(<a href="../../../reference/android/content/Intent.html">Intent[]</a> intents, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch a new activity.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivities(android.content.Intent[])">startActivities</a></span>(<a href="../../../reference/android/content/Intent.html">Intent[]</a> intents)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/app/Activity.html#startActivities(android.content.Intent[], android.os.Bundle)">startActivities(Intent[], Bundle)</a></code> with no options
specified.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent)">startActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity(Intent, Bundle)</a></code> with no options
specified.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch a new activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int, android.os.Bundle)">startActivityForResult(Intent, int, Bundle)</a></code>
with no options.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int, android.os.Bundle)">startActivityForResult</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch an activity for which you would like a result when it finished.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle)">startActivityFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child, <a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">This is called when a child activity of this one calls its
<code><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code> or <code><a href="../../../reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code> method.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityFromChild(android.app.Activity, android.content.Intent, int)">startActivityFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child, <a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startActivityFromChild(android.app.Activity, android.content.Intent, int, android.os.Bundle)">startActivityFromChild(Activity, Intent, int, Bundle)</a></code>
with no options.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle)">startActivityFromFragment</a></span>(<a href="../../../reference/android/app/Fragment.html">Fragment</a> fragment, <a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">This is called when a Fragment in this activity calls its
<code><a href="../../../reference/android/app/Fragment.html#startActivity(android.content.Intent)">startActivity(Intent)</a></code> or <code><a href="../../../reference/android/app/Fragment.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code>
method.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityFromFragment(android.app.Fragment, android.content.Intent, int)">startActivityFromFragment</a></span>(<a href="../../../reference/android/app/Fragment.html">Fragment</a> fragment, <a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startActivityFromFragment(android.app.Fragment, android.content.Intent, int, android.os.Bundle)">startActivityFromFragment(Fragment, Intent, int, Bundle)</a></code>
with no options.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityIfNeeded(android.content.Intent, int, android.os.Bundle)">startActivityIfNeeded</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">A special variation to launch an activity only if a new activity
instance is needed to handle the given Intent.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startActivityIfNeeded(android.content.Intent, int)">startActivityIfNeeded</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, int requestCode)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startActivityIfNeeded(android.content.Intent, int, android.os.Bundle)">startActivityIfNeeded(Intent, int, Bundle)</a></code>
with no options.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSender</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Like <code><a href="../../../reference/android/app/Activity.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity(Intent, Bundle)</a></code>, but taking a IntentSender
to start; see
<code><a href="../../../reference/android/app/Activity.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSenderForResult(IntentSender, int, Intent, int, int, int, Bundle)</a></code>
for more information.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)">startIntentSender</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSender(IntentSender, Intent, int, int, int, Bundle)</a></code>
with no options.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSenderForResult</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, int requestCode, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Like <code><a href="../../../reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)">startActivityForResult(Intent, int)</a></code>, but allowing you
to use a IntentSender to describe the activity to be started.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int)">startIntentSenderForResult</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, int requestCode, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSenderForResult(IntentSender, int, Intent, int, int, int, Bundle)</a></code> with no options.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int)">startIntentSenderFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child, <a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, int requestCode, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSenderFromChild(Activity, IntentSender, int, Intent, int, int, int, Bundle)</a></code> with no options.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startIntentSenderFromChild(android.app.Activity, android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSenderFromChild</a></span>(<a href="../../../reference/android/app/Activity.html">Activity</a> child, <a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, int requestCode, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Like <code><a href="../../../reference/android/app/Activity.html#startActivityFromChild(android.app.Activity, android.content.Intent, int)">startActivityFromChild(Activity, Intent, int)</a></code>, but
taking a IntentSender; see
<code><a href="../../../reference/android/app/Activity.html#startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int)">startIntentSenderForResult(IntentSender, int, Intent, int, int, int)</a></code>
for more information.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startManagingCursor(android.database.Cursor)">startManagingCursor</a></span>(<a href="../../../reference/android/database/Cursor.html">Cursor</a> c)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 11.
Use the new <code><a href="../../../reference/android/content/CursorLoader.html">CursorLoader</a></code> class with
<code><a href="../../../reference/android/app/LoaderManager.html">LoaderManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startNextMatchingActivity(android.content.Intent)">startNextMatchingActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Same as calling <code><a href="../../../reference/android/app/Activity.html#startNextMatchingActivity(android.content.Intent, android.os.Bundle)">startNextMatchingActivity(Intent, Bundle)</a></code> with
no options.</div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startNextMatchingActivity(android.content.Intent, android.os.Bundle)">startNextMatchingActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Special version of starting an activity, for use when you are replacing
other activity components.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#startSearch(java.lang.String, boolean, android.os.Bundle, boolean)">startSearch</a></span>(<a href="../../../reference/java/lang/String.html">String</a> initialQuery, boolean selectInitialQuery, <a href="../../../reference/android/os/Bundle.html">Bundle</a> appSearchData, boolean globalSearch)</nobr>
<div class="jd-descrdiv">This hook is called to launch the search UI.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#stopManagingCursor(android.database.Cursor)">stopManagingCursor</a></span>(<a href="../../../reference/android/database/Cursor.html">Cursor</a> c)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 11.
Use the new <code><a href="../../../reference/android/content/CursorLoader.html">CursorLoader</a></code> class with
<code><a href="../../../reference/android/app/LoaderManager.html">LoaderManager</a></code> instead; this is also
available on older platforms through the Android compatibility package.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#takeKeyEvents(boolean)">takeKeyEvents</a></span>(boolean get)</nobr>
<div class="jd-descrdiv">Request that key events come to this activity.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#triggerSearch(java.lang.String, android.os.Bundle)">triggerSearch</a></span>(<a href="../../../reference/java/lang/String.html">String</a> query, <a href="../../../reference/android/os/Bundle.html">Bundle</a> appSearchData)</nobr>
<div class="jd-descrdiv">Similar to <code><a href="../../../reference/android/app/Activity.html#startSearch(java.lang.String, boolean, android.os.Bundle, boolean)">startSearch(String, boolean, Bundle, boolean)</a></code>, but actually fires off the search query after invoking
the search dialog.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/app/Activity.html#unregisterForContextMenu(android.view.View)">unregisterForContextMenu</a></span>(<a href="../../../reference/android/view/View.html">View</a> view)</nobr>
<div class="jd-descrdiv">Prevents a context menu to be shown for the given view.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.view.ContextThemeWrapper" class="jd-expando-trigger closed"
><img id="inherited-methods-android.view.ContextThemeWrapper-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../reference/android/view/ContextThemeWrapper.html">android.view.ContextThemeWrapper</a>
<div id="inherited-methods-android.view.ContextThemeWrapper">
<div id="inherited-methods-android.view.ContextThemeWrapper-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.view.ContextThemeWrapper-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#applyOverrideConfiguration(android.content.res.Configuration)">applyOverrideConfiguration</a></span>(<a href="../../../reference/android/content/res/Configuration.html">Configuration</a> overrideConfiguration)</nobr>
<div class="jd-descrdiv">Call to set an "override configuration" on this context -- this is
a configuration that replies one or more values of the standard
configuration that is applied to the context.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#attachBaseContext(android.content.Context)">attachBaseContext</a></span>(<a href="../../../reference/android/content/Context.html">Context</a> newBase)</nobr>
<div class="jd-descrdiv">Set the base context for this ContextWrapper.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/res/Resources.html">Resources</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#getResources()">getResources</a></span>()</nobr>
<div class="jd-descrdiv">Return a Resources instance for your application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#getSystemService(java.lang.String)">getSystemService</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Return the handle to a system-level service by name.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/res/Resources.Theme.html">Resources.Theme</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#getTheme()">getTheme</a></span>()</nobr>
<div class="jd-descrdiv">Return the Theme object associated with this Context.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#onApplyThemeResource(android.content.res.Resources.Theme, int, boolean)">onApplyThemeResource</a></span>(<a href="../../../reference/android/content/res/Resources.Theme.html">Resources.Theme</a> theme, int resid, boolean first)</nobr>
<div class="jd-descrdiv">Called by <code><a href="../../../reference/android/view/ContextThemeWrapper.html#setTheme(int)">setTheme(int)</a></code> and <code><a href="../../../reference/android/view/ContextThemeWrapper.html#getTheme()">getTheme()</a></code> to apply a theme
resource to the current Theme object.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/ContextThemeWrapper.html#setTheme(int)">setTheme</a></span>(int resid)</nobr>
<div class="jd-descrdiv">Set the base theme for this context.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.content.ContextWrapper" class="jd-expando-trigger closed"
><img id="inherited-methods-android.content.ContextWrapper-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../reference/android/content/ContextWrapper.html">android.content.ContextWrapper</a>
<div id="inherited-methods-android.content.ContextWrapper">
<div id="inherited-methods-android.content.ContextWrapper-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.content.ContextWrapper-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#attachBaseContext(android.content.Context)">attachBaseContext</a></span>(<a href="../../../reference/android/content/Context.html">Context</a> base)</nobr>
<div class="jd-descrdiv">Set the base context for this ContextWrapper.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> service, <a href="../../../reference/android/content/ServiceConnection.html">ServiceConnection</a> conn, int flags)</nobr>
<div class="jd-descrdiv">Connect to an application service, creating it if needed.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkCallingOrSelfPermission(java.lang.String)">checkCallingOrSelfPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission)</nobr>
<div class="jd-descrdiv">Determine whether the calling process of an IPC <em>or you</em> have been
granted a particular permission.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkCallingOrSelfUriPermission(android.net.Uri, int)">checkCallingOrSelfUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Determine whether the calling process of an IPC <em>or you</em> has been granted
permission to access a specific URI.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkCallingPermission(java.lang.String)">checkCallingPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission)</nobr>
<div class="jd-descrdiv">Determine whether the calling process of an IPC you are handling has been
granted a particular permission.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkCallingUriPermission(android.net.Uri, int)">checkCallingUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Determine whether the calling process and user ID has been
granted permission to access a specific URI.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkPermission(java.lang.String, int, int)">checkPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, int pid, int uid)</nobr>
<div class="jd-descrdiv">Determine whether the given permission is allowed for a particular
process and user ID running in the system.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, int, int, int)">checkUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int pid, int uid, int modeFlags)</nobr>
<div class="jd-descrdiv">Determine whether a particular process and user ID has been granted
permission to access a specific URI.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int)">checkUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, <a href="../../../reference/java/lang/String.html">String</a> readPermission, <a href="../../../reference/java/lang/String.html">String</a> writePermission, int pid, int uid, int modeFlags)</nobr>
<div class="jd-descrdiv">Check both a Uri and normal permission.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#clearWallpaper()">clearWallpaper</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#clear()">WallpaperManager.clear()</a></code> instead.
<p>This method requires the caller to hold the permission
<code><a href="../../../reference/android/Manifest.permission.html#SET_WALLPAPER">SET_WALLPAPER</a></code>.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-17" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#createConfigurationContext(android.content.res.Configuration)">createConfigurationContext</a></span>(<a href="../../../reference/android/content/res/Configuration.html">Configuration</a> overrideConfiguration)</nobr>
<div class="jd-descrdiv">Return a new Context object for the current Context but whose resources
are adjusted to match the given Configuration.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#createDisplayContext(android.view.Display)">createDisplayContext</a></span>(<a href="../../../reference/android/view/Display.html">Display</a> display)</nobr>
<div class="jd-descrdiv">Return a new Context object for the current Context but whose resources
are adjusted to match the metrics of the given Display.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#createPackageContext(java.lang.String, int)">createPackageContext</a></span>(<a href="../../../reference/java/lang/String.html">String</a> packageName, int flags)</nobr>
<div class="jd-descrdiv">Return a new Context object for the given application name.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#databaseList()">databaseList</a></span>()</nobr>
<div class="jd-descrdiv">Returns an array of strings naming the private databases associated with
this Context's application package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#deleteDatabase(java.lang.String)">deleteDatabase</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Delete an existing private SQLiteDatabase associated with this Context's
application package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#deleteFile(java.lang.String)">deleteFile</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Delete the given private file associated with this Context's
application package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String)">enforceCallingOrSelfPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If neither you nor the calling process of an IPC you are
handling has been granted a particular permission, throw a
<code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String)">enforceCallingOrSelfUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the calling process of an IPC <em>or you</em> has not been
granted permission to access a specific URI, throw <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforceCallingPermission(java.lang.String, java.lang.String)">enforceCallingPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the calling process of an IPC you are handling has not been
granted a particular permission, throw a <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforceCallingUriPermission(android.net.Uri, int, java.lang.String)">enforceCallingUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the calling process and user ID has not been granted
permission to access a specific URI, throw <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforcePermission(java.lang.String, int, int, java.lang.String)">enforcePermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, int pid, int uid, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the given permission is not allowed for a particular process
and user ID running in the system, throw a <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String)">enforceUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int pid, int uid, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If a particular process and user ID has not been granted
permission to access a specific URI, throw <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String)">enforceUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, <a href="../../../reference/java/lang/String.html">String</a> readPermission, <a href="../../../reference/java/lang/String.html">String</a> writePermission, int pid, int uid, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">Enforce both a Uri and normal permission.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#fileList()">fileList</a></span>()</nobr>
<div class="jd-descrdiv">Returns an array of strings naming the private files associated with
this Context's application package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getApplicationContext()">getApplicationContext</a></span>()</nobr>
<div class="jd-descrdiv">Return the context of the single, global Application object of the
current process.</div>
</td></tr>
<tr class=" api apilevel-4" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/pm/ApplicationInfo.html">ApplicationInfo</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getApplicationInfo()">getApplicationInfo</a></span>()</nobr>
<div class="jd-descrdiv">Return the full application info for this context's package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/res/AssetManager.html">AssetManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getAssets()">getAssets</a></span>()</nobr>
<div class="jd-descrdiv">Return an AssetManager instance for your application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getBaseContext()">getBaseContext</a></span>()</nobr>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getCacheDir()">getCacheDir</a></span>()</nobr>
<div class="jd-descrdiv">Returns the absolute path to the application specific cache directory
on the filesystem.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/ClassLoader.html">ClassLoader</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getClassLoader()">getClassLoader</a></span>()</nobr>
<div class="jd-descrdiv">Return a class loader you can use to retrieve classes in this package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/ContentResolver.html">ContentResolver</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getContentResolver()">getContentResolver</a></span>()</nobr>
<div class="jd-descrdiv">Return a ContentResolver instance for your application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getDatabasePath(java.lang.String)">getDatabasePath</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Returns the absolute path on the filesystem where a database created with
<code><a href="../../../reference/android/content/Context.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory)">openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory)</a></code> is stored.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getDir(java.lang.String, int)">getDir</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode)</nobr>
<div class="jd-descrdiv">Retrieve, creating if needed, a new directory in which the application
can place its own custom data files.</div>
</td></tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getExternalCacheDir()">getExternalCacheDir</a></span>()</nobr>
<div class="jd-descrdiv">Returns the absolute path to the directory on the primary external filesystem
(that is somewhere on <code><a href="../../../reference/android/os/Environment.html#getExternalStorageDirectory()">Environment.getExternalStorageDirectory()</a></code> where the application can
place cache files it owns.</div>
</td></tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getExternalCacheDirs()">getExternalCacheDirs</a></span>()</nobr>
<div class="jd-descrdiv">Returns absolute paths to application-specific directories on all
external storage devices where the application can place cache files it
owns.</div>
</td></tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getExternalFilesDir(java.lang.String)">getExternalFilesDir</a></span>(<a href="../../../reference/java/lang/String.html">String</a> type)</nobr>
<div class="jd-descrdiv">Returns the absolute path to the directory on the primary external filesystem
(that is somewhere on <code><a href="../../../reference/android/os/Environment.html#getExternalStorageDirectory()">Environment.getExternalStorageDirectory()</a></code>) where the application can
place persistent files it owns.</div>
</td></tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getExternalFilesDirs(java.lang.String)">getExternalFilesDirs</a></span>(<a href="../../../reference/java/lang/String.html">String</a> type)</nobr>
<div class="jd-descrdiv">Returns absolute paths to application-specific directories on all
external storage devices where the application can place persistent files
it owns.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getFileStreamPath(java.lang.String)">getFileStreamPath</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Returns the absolute path on the filesystem where a file created with
<code><a href="../../../reference/android/content/Context.html#openFileOutput(java.lang.String, int)">openFileOutput(String, int)</a></code> is stored.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getFilesDir()">getFilesDir</a></span>()</nobr>
<div class="jd-descrdiv">Returns the absolute path to the directory on the filesystem where
files created with <code><a href="../../../reference/android/content/Context.html#openFileOutput(java.lang.String, int)">openFileOutput(String, int)</a></code> are stored.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/os/Looper.html">Looper</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getMainLooper()">getMainLooper</a></span>()</nobr>
<div class="jd-descrdiv">Return the Looper for the main thread of the current process.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getObbDir()">getObbDir</a></span>()</nobr>
<div class="jd-descrdiv">Return the primary external storage directory where this application's OBB
files (if there are any) can be found.</div>
</td></tr>
<tr class=" api apilevel-19" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/File.html">File[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getObbDirs()">getObbDirs</a></span>()</nobr>
<div class="jd-descrdiv">Returns absolute paths to application-specific directories on all
external storage devices where the application's OBB files (if there are
any) can be found.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getPackageCodePath()">getPackageCodePath</a></span>()</nobr>
<div class="jd-descrdiv">Return the full path to this context's primary Android package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/pm/PackageManager.html">PackageManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getPackageManager()">getPackageManager</a></span>()</nobr>
<div class="jd-descrdiv">Return PackageManager instance to find global package information.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getPackageName()">getPackageName</a></span>()</nobr>
<div class="jd-descrdiv">Return the name of this application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getPackageResourcePath()">getPackageResourcePath</a></span>()</nobr>
<div class="jd-descrdiv">Return the full path to this context's primary Android package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/res/Resources.html">Resources</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getResources()">getResources</a></span>()</nobr>
<div class="jd-descrdiv">Return a Resources instance for your application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/SharedPreferences.html">SharedPreferences</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getSharedPreferences(java.lang.String, int)">getSharedPreferences</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode)</nobr>
<div class="jd-descrdiv">Retrieve and hold the contents of the preferences file 'name', returning
a SharedPreferences through which you can retrieve and modify its
values.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getSystemService(java.lang.String)">getSystemService</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Return the handle to a system-level service by name.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/res/Resources.Theme.html">Resources.Theme</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getTheme()">getTheme</a></span>()</nobr>
<div class="jd-descrdiv">Return the Theme object associated with this Context.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/graphics/drawable/Drawable.html">Drawable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getWallpaper()">getWallpaper</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#getDrawable()">WallpaperManager.get()</a></code> instead.
</em></div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumHeight()">getWallpaperDesiredMinimumHeight</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#getDesiredMinimumHeight()">WallpaperManager.getDesiredMinimumHeight()</a></code> instead.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#getWallpaperDesiredMinimumWidth()">getWallpaperDesiredMinimumWidth</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#getDesiredMinimumWidth()">WallpaperManager.getDesiredMinimumWidth()</a></code> instead.
</em></div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#grantUriPermission(java.lang.String, android.net.Uri, int)">grantUriPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> toPackage, <a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Grant permission to access a specific Uri to another package, regardless
of whether that package has general permission to access the Uri's
content provider.</div>
</td></tr>
<tr class="alt-color api apilevel-4" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#isRestricted()">isRestricted</a></span>()</nobr>
<div class="jd-descrdiv">Indicates whether this Context is restricted.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/FileInputStream.html">FileInputStream</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#openFileInput(java.lang.String)">openFileInput</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Open a private file associated with this Context's application package
for reading.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/io/FileOutputStream.html">FileOutputStream</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#openFileOutput(java.lang.String, int)">openFileOutput</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode)</nobr>
<div class="jd-descrdiv">Open a private file associated with this Context's application package
for writing.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/database/sqlite/SQLiteDatabase.html">SQLiteDatabase</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory)">openOrCreateDatabase</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode, <a href="../../../reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html">SQLiteDatabase.CursorFactory</a> factory)</nobr>
<div class="jd-descrdiv">Open a new private SQLiteDatabase associated with this Context's
application package.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/database/sqlite/SQLiteDatabase.html">SQLiteDatabase</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler)">openOrCreateDatabase</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode, <a href="../../../reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html">SQLiteDatabase.CursorFactory</a> factory, <a href="../../../reference/android/database/DatabaseErrorHandler.html">DatabaseErrorHandler</a> errorHandler)</nobr>
<div class="jd-descrdiv">Open a new private SQLiteDatabase associated with this Context's
application package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/graphics/drawable/Drawable.html">Drawable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#peekWallpaper()">peekWallpaper</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#peekDrawable()">WallpaperManager.peek()</a></code> instead.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Intent.html">Intent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)">registerReceiver</a></span>(<a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> receiver, <a href="../../../reference/android/content/IntentFilter.html">IntentFilter</a> filter)</nobr>
<div class="jd-descrdiv">Register a BroadcastReceiver to be run in the main activity thread.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/Intent.html">Intent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler)">registerReceiver</a></span>(<a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> receiver, <a href="../../../reference/android/content/IntentFilter.html">IntentFilter</a> filter, <a href="../../../reference/java/lang/String.html">String</a> broadcastPermission, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler)</nobr>
<div class="jd-descrdiv">Register to receive intent broadcasts, to run in the context of
<var>scheduler</var>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#removeStickyBroadcast(android.content.Intent)">removeStickyBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Remove the data previously sent with <code><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast(Intent)</a></code>,
so that it is as if the sticky broadcast had never happened.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)">removeStickyBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#removeStickyBroadcast(android.content.Intent)">removeStickyBroadcast(Intent)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#revokeUriPermission(android.net.Uri, int)">revokeUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Remove all permissions to access a particular content provider Uri
that were previously added with <code><a href="../../../reference/android/content/Context.html#grantUriPermission(java.lang.String, android.net.Uri, int)">grantUriPermission(String, Uri, int)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent)">sendBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Broadcast the given intent to all interested BroadcastReceivers.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendBroadcast(android.content.Intent, java.lang.String)">sendBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission)</nobr>
<div class="jd-descrdiv">Broadcast the given intent to all interested BroadcastReceivers, allowing
an optional required permission to be enforced.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle)">sendBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast(Intent)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String)">sendBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent, java.lang.String)">sendBroadcast(Intent, String)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendOrderedBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast(Intent)</a></code> that allows you to
receive data back from the broadcast.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendOrderedBroadcast(android.content.Intent, java.lang.String)">sendOrderedBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission)</nobr>
<div class="jd-descrdiv">Broadcast the given intent to all interested BroadcastReceivers, delivering
them one at a time to allow more preferred receivers to consume the
broadcast before it is delivered to less preferred receivers.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendOrderedBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of
<code><a href="../../../reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)</a></code>
that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Perform a <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast(Intent)</a></code> that is "sticky," meaning the
Intent you are sending stays around after the broadcast is complete,
so that others can quickly retrieve that data through the return
value of <code><a href="../../../reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)">registerReceiver(BroadcastReceiver, IntentFilter)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)">sendStickyBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast(Intent)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendStickyOrderedBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast(Intent)</a></code> that allows you to
receive data back from the broadcast.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendStickyOrderedBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of
<code><a href="../../../reference/android/content/Context.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)</a></code>
that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#setTheme(int)">setTheme</a></span>(int resid)</nobr>
<div class="jd-descrdiv">Set the base theme for this context.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#setWallpaper(android.graphics.Bitmap)">setWallpaper</a></span>(<a href="../../../reference/android/graphics/Bitmap.html">Bitmap</a> bitmap)</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#setBitmap(android.graphics.Bitmap)">WallpaperManager.set()</a></code> instead.
<p>This method requires the caller to hold the permission
<code><a href="../../../reference/android/Manifest.permission.html#SET_WALLPAPER">SET_WALLPAPER</a></code>.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#setWallpaper(java.io.InputStream)">setWallpaper</a></span>(<a href="../../../reference/java/io/InputStream.html">InputStream</a> data)</nobr>
<div class="jd-descrdiv"><em>
This method is deprecated.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#setStream(java.io.InputStream)">WallpaperManager.set()</a></code> instead.
<p>This method requires the caller to hold the permission
<code><a href="../../../reference/android/Manifest.permission.html#SET_WALLPAPER">SET_WALLPAPER</a></code>.
</em></div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[])">startActivities</a></span>(<a href="../../../reference/android/content/Intent.html">Intent[]</a> intents)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/content/Context.html#startActivities(android.content.Intent[], android.os.Bundle)">startActivities(Intent[], Bundle)</a></code> with no options
specified.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startActivities(android.content.Intent[], android.os.Bundle)">startActivities</a></span>(<a href="../../../reference/android/content/Intent.html">Intent[]</a> intents, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch multiple new activities.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startActivity(android.content.Intent)">startActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity(Intent, Bundle)</a></code> with no options
specified.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch a new activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle)">startInstrumentation</a></span>(<a href="../../../reference/android/content/ComponentName.html">ComponentName</a> className, <a href="../../../reference/java/lang/String.html">String</a> profileFile, <a href="../../../reference/android/os/Bundle.html">Bundle</a> arguments)</nobr>
<div class="jd-descrdiv">Start executing an <code><a href="../../../reference/android/app/Instrumentation.html">Instrumentation</a></code> class.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSender</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Like <code><a href="../../../reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity(Intent, Bundle)</a></code>, but taking a IntentSender
to start.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)">startIntentSender</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/content/Context.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSender(IntentSender, Intent, int, int, int, Bundle)</a></code>
with no options specified.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/android/content/ComponentName.html">ComponentName</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#startService(android.content.Intent)">startService</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> service)</nobr>
<div class="jd-descrdiv">Request that a given application service be started.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#stopService(android.content.Intent)">stopService</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> name)</nobr>
<div class="jd-descrdiv">Request that a given application service be stopped.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#unbindService(android.content.ServiceConnection)">unbindService</a></span>(<a href="../../../reference/android/content/ServiceConnection.html">ServiceConnection</a> conn)</nobr>
<div class="jd-descrdiv">Disconnect from an application service.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ContextWrapper.html#unregisterReceiver(android.content.BroadcastReceiver)">unregisterReceiver</a></span>(<a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> receiver)</nobr>
<div class="jd-descrdiv">Unregister a previously registered BroadcastReceiver.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.content.Context" class="jd-expando-trigger closed"
><img id="inherited-methods-android.content.Context-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../reference/android/content/Context.html">android.content.Context</a>
<div id="inherited-methods-android.content.Context">
<div id="inherited-methods-android.content.Context-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.content.Context-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#bindService(android.content.Intent, android.content.ServiceConnection, int)">bindService</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> service, <a href="../../../reference/android/content/ServiceConnection.html">ServiceConnection</a> conn, int flags)</nobr>
<div class="jd-descrdiv">Connect to an application service, creating it if needed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkCallingOrSelfPermission(java.lang.String)">checkCallingOrSelfPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission)</nobr>
<div class="jd-descrdiv">Determine whether the calling process of an IPC <em>or you</em> have been
granted a particular permission.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkCallingOrSelfUriPermission(android.net.Uri, int)">checkCallingOrSelfUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Determine whether the calling process of an IPC <em>or you</em> has been granted
permission to access a specific URI.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkCallingPermission(java.lang.String)">checkCallingPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission)</nobr>
<div class="jd-descrdiv">Determine whether the calling process of an IPC you are handling has been
granted a particular permission.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkCallingUriPermission(android.net.Uri, int)">checkCallingUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Determine whether the calling process and user ID has been
granted permission to access a specific URI.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkPermission(java.lang.String, int, int)">checkPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, int pid, int uid)</nobr>
<div class="jd-descrdiv">Determine whether the given permission is allowed for a particular
process and user ID running in the system.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkUriPermission(android.net.Uri, int, int, int)">checkUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int pid, int uid, int modeFlags)</nobr>
<div class="jd-descrdiv">Determine whether a particular process and user ID has been granted
permission to access a specific URI.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#checkUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int)">checkUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, <a href="../../../reference/java/lang/String.html">String</a> readPermission, <a href="../../../reference/java/lang/String.html">String</a> writePermission, int pid, int uid, int modeFlags)</nobr>
<div class="jd-descrdiv">Check both a Uri and normal permission.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#clearWallpaper()">clearWallpaper</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#clear()">WallpaperManager.clear()</a></code> instead.
<p>This method requires the caller to hold the permission
<code><a href="../../../reference/android/Manifest.permission.html#SET_WALLPAPER">SET_WALLPAPER</a></code>.
</em></div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#createConfigurationContext(android.content.res.Configuration)">createConfigurationContext</a></span>(<a href="../../../reference/android/content/res/Configuration.html">Configuration</a> overrideConfiguration)</nobr>
<div class="jd-descrdiv">Return a new Context object for the current Context but whose resources
are adjusted to match the given Configuration.</div>
</td></tr>
<tr class="alt-color api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#createDisplayContext(android.view.Display)">createDisplayContext</a></span>(<a href="../../../reference/android/view/Display.html">Display</a> display)</nobr>
<div class="jd-descrdiv">Return a new Context object for the current Context but whose resources
are adjusted to match the metrics of the given Display.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#createPackageContext(java.lang.String, int)">createPackageContext</a></span>(<a href="../../../reference/java/lang/String.html">String</a> packageName, int flags)</nobr>
<div class="jd-descrdiv">Return a new Context object for the given application name.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/String.html">String[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#databaseList()">databaseList</a></span>()</nobr>
<div class="jd-descrdiv">Returns an array of strings naming the private databases associated with
this Context's application package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#deleteDatabase(java.lang.String)">deleteDatabase</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Delete an existing private SQLiteDatabase associated with this Context's
application package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#deleteFile(java.lang.String)">deleteFile</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Delete the given private file associated with this Context's
application package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforceCallingOrSelfPermission(java.lang.String, java.lang.String)">enforceCallingOrSelfPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If neither you nor the calling process of an IPC you are
handling has been granted a particular permission, throw a
<code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforceCallingOrSelfUriPermission(android.net.Uri, int, java.lang.String)">enforceCallingOrSelfUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the calling process of an IPC <em>or you</em> has not been
granted permission to access a specific URI, throw <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforceCallingPermission(java.lang.String, java.lang.String)">enforceCallingPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the calling process of an IPC you are handling has not been
granted a particular permission, throw a <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforceCallingUriPermission(android.net.Uri, int, java.lang.String)">enforceCallingUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the calling process and user ID has not been granted
permission to access a specific URI, throw <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforcePermission(java.lang.String, int, int, java.lang.String)">enforcePermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> permission, int pid, int uid, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If the given permission is not allowed for a particular process
and user ID running in the system, throw a <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforceUriPermission(android.net.Uri, int, int, int, java.lang.String)">enforceUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int pid, int uid, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">If a particular process and user ID has not been granted
permission to access a specific URI, throw <code><a href="../../../reference/java/lang/SecurityException.html">SecurityException</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#enforceUriPermission(android.net.Uri, java.lang.String, java.lang.String, int, int, int, java.lang.String)">enforceUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, <a href="../../../reference/java/lang/String.html">String</a> readPermission, <a href="../../../reference/java/lang/String.html">String</a> writePermission, int pid, int uid, int modeFlags, <a href="../../../reference/java/lang/String.html">String</a> message)</nobr>
<div class="jd-descrdiv">Enforce both a Uri and normal permission.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/String.html">String[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#fileList()">fileList</a></span>()</nobr>
<div class="jd-descrdiv">Returns an array of strings naming the private files associated with
this Context's application package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/Context.html">Context</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getApplicationContext()">getApplicationContext</a></span>()</nobr>
<div class="jd-descrdiv">Return the context of the single, global Application object of the
current process.</div>
</td></tr>
<tr class="alt-color api apilevel-4" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/pm/ApplicationInfo.html">ApplicationInfo</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getApplicationInfo()">getApplicationInfo</a></span>()</nobr>
<div class="jd-descrdiv">Return the full application info for this context's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/res/AssetManager.html">AssetManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getAssets()">getAssets</a></span>()</nobr>
<div class="jd-descrdiv">Return an AssetManager instance for your application's package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getCacheDir()">getCacheDir</a></span>()</nobr>
<div class="jd-descrdiv">Returns the absolute path to the application specific cache directory
on the filesystem.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/ClassLoader.html">ClassLoader</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getClassLoader()">getClassLoader</a></span>()</nobr>
<div class="jd-descrdiv">Return a class loader you can use to retrieve classes in this package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/ContentResolver.html">ContentResolver</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getContentResolver()">getContentResolver</a></span>()</nobr>
<div class="jd-descrdiv">Return a ContentResolver instance for your application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getDatabasePath(java.lang.String)">getDatabasePath</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Returns the absolute path on the filesystem where a database created with
<code><a href="../../../reference/android/content/Context.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory)">openOrCreateDatabase(String, int, SQLiteDatabase.CursorFactory)</a></code> is stored.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getDir(java.lang.String, int)">getDir</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode)</nobr>
<div class="jd-descrdiv">Retrieve, creating if needed, a new directory in which the application
can place its own custom data files.</div>
</td></tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getExternalCacheDir()">getExternalCacheDir</a></span>()</nobr>
<div class="jd-descrdiv">Returns the absolute path to the directory on the primary external filesystem
(that is somewhere on <code><a href="../../../reference/android/os/Environment.html#getExternalStorageDirectory()">Environment.getExternalStorageDirectory()</a></code> where the application can
place cache files it owns.</div>
</td></tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getExternalCacheDirs()">getExternalCacheDirs</a></span>()</nobr>
<div class="jd-descrdiv">Returns absolute paths to application-specific directories on all
external storage devices where the application can place cache files it
owns.</div>
</td></tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getExternalFilesDir(java.lang.String)">getExternalFilesDir</a></span>(<a href="../../../reference/java/lang/String.html">String</a> type)</nobr>
<div class="jd-descrdiv">Returns the absolute path to the directory on the primary external filesystem
(that is somewhere on <code><a href="../../../reference/android/os/Environment.html#getExternalStorageDirectory()">Environment.getExternalStorageDirectory()</a></code>) where the application can
place persistent files it owns.</div>
</td></tr>
<tr class="alt-color api apilevel-19" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getExternalFilesDirs(java.lang.String)">getExternalFilesDirs</a></span>(<a href="../../../reference/java/lang/String.html">String</a> type)</nobr>
<div class="jd-descrdiv">Returns absolute paths to application-specific directories on all
external storage devices where the application can place persistent files
it owns.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getFileStreamPath(java.lang.String)">getFileStreamPath</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Returns the absolute path on the filesystem where a file created with
<code><a href="../../../reference/android/content/Context.html#openFileOutput(java.lang.String, int)">openFileOutput(String, int)</a></code> is stored.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getFilesDir()">getFilesDir</a></span>()</nobr>
<div class="jd-descrdiv">Returns the absolute path to the directory on the filesystem where
files created with <code><a href="../../../reference/android/content/Context.html#openFileOutput(java.lang.String, int)">openFileOutput(String, int)</a></code> are stored.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/os/Looper.html">Looper</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getMainLooper()">getMainLooper</a></span>()</nobr>
<div class="jd-descrdiv">Return the Looper for the main thread of the current process.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getObbDir()">getObbDir</a></span>()</nobr>
<div class="jd-descrdiv">Return the primary external storage directory where this application's OBB
files (if there are any) can be found.</div>
</td></tr>
<tr class=" api apilevel-19" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/File.html">File[]</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getObbDirs()">getObbDirs</a></span>()</nobr>
<div class="jd-descrdiv">Returns absolute paths to application-specific directories on all
external storage devices where the application's OBB files (if there are
any) can be found.</div>
</td></tr>
<tr class="alt-color api apilevel-8" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getPackageCodePath()">getPackageCodePath</a></span>()</nobr>
<div class="jd-descrdiv">Return the full path to this context's primary Android package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/pm/PackageManager.html">PackageManager</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getPackageManager()">getPackageManager</a></span>()</nobr>
<div class="jd-descrdiv">Return PackageManager instance to find global package information.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getPackageName()">getPackageName</a></span>()</nobr>
<div class="jd-descrdiv">Return the name of this application's package.</div>
</td></tr>
<tr class=" api apilevel-8" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getPackageResourcePath()">getPackageResourcePath</a></span>()</nobr>
<div class="jd-descrdiv">Return the full path to this context's primary Android package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/res/Resources.html">Resources</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getResources()">getResources</a></span>()</nobr>
<div class="jd-descrdiv">Return a Resources instance for your application's package.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/SharedPreferences.html">SharedPreferences</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getSharedPreferences(java.lang.String, int)">getSharedPreferences</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode)</nobr>
<div class="jd-descrdiv">Retrieve and hold the contents of the preferences file 'name', returning
a SharedPreferences through which you can retrieve and modify its
values.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getString(int)">getString</a></span>(int resId)</nobr>
<div class="jd-descrdiv">Return a localized string from the application's package's
default string table.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getString(int, java.lang.Object...)">getString</a></span>(int resId, <a href="../../../reference/java/lang/Object.html">Object...</a> formatArgs)</nobr>
<div class="jd-descrdiv">Return a localized formatted string from the application's package's
default string table, substituting the format arguments as defined in
<code><a href="../../../reference/java/util/Formatter.html">Formatter</a></code> and <code><a href="../../../reference/java/lang/String.html#format(java.lang.String, java.lang.Object...)">format(String, Object...)</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getSystemService(java.lang.String)">getSystemService</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Return the handle to a system-level service by name.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/java/lang/CharSequence.html">CharSequence</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getText(int)">getText</a></span>(int resId)</nobr>
<div class="jd-descrdiv">Return a localized, styled CharSequence from the application's package's
default string table.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/res/Resources.Theme.html">Resources.Theme</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getTheme()">getTheme</a></span>()</nobr>
<div class="jd-descrdiv">Return the Theme object associated with this Context.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/graphics/drawable/Drawable.html">Drawable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getWallpaper()">getWallpaper</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#getDrawable()">WallpaperManager.get()</a></code> instead.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getWallpaperDesiredMinimumHeight()">getWallpaperDesiredMinimumHeight</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#getDesiredMinimumHeight()">WallpaperManager.getDesiredMinimumHeight()</a></code> instead.
</em></div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#getWallpaperDesiredMinimumWidth()">getWallpaperDesiredMinimumWidth</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#getDesiredMinimumWidth()">WallpaperManager.getDesiredMinimumWidth()</a></code> instead.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#grantUriPermission(java.lang.String, android.net.Uri, int)">grantUriPermission</a></span>(<a href="../../../reference/java/lang/String.html">String</a> toPackage, <a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Grant permission to access a specific Uri to another package, regardless
of whether that package has general permission to access the Uri's
content provider.</div>
</td></tr>
<tr class=" api apilevel-4" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#isRestricted()">isRestricted</a></span>()</nobr>
<div class="jd-descrdiv">Indicates whether this Context is restricted.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/content/res/TypedArray.html">TypedArray</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#obtainStyledAttributes(int[])">obtainStyledAttributes</a></span>(int[] attrs)</nobr>
<div class="jd-descrdiv">Retrieve styled attribute information in this Context's theme.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/content/res/TypedArray.html">TypedArray</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[], int, int)">obtainStyledAttributes</a></span>(<a href="../../../reference/android/util/AttributeSet.html">AttributeSet</a> set, int[] attrs, int defStyleAttr, int defStyleRes)</nobr>
<div class="jd-descrdiv">Retrieve styled attribute information in this Context's theme.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/content/res/TypedArray.html">TypedArray</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#obtainStyledAttributes(android.util.AttributeSet, int[])">obtainStyledAttributes</a></span>(<a href="../../../reference/android/util/AttributeSet.html">AttributeSet</a> set, int[] attrs)</nobr>
<div class="jd-descrdiv">Retrieve styled attribute information in this Context's theme.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/android/content/res/TypedArray.html">TypedArray</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#obtainStyledAttributes(int, int[])">obtainStyledAttributes</a></span>(int resid, int[] attrs)</nobr>
<div class="jd-descrdiv">Retrieve styled attribute information in this Context's theme.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/FileInputStream.html">FileInputStream</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#openFileInput(java.lang.String)">openFileInput</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name)</nobr>
<div class="jd-descrdiv">Open a private file associated with this Context's application package
for reading.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/java/io/FileOutputStream.html">FileOutputStream</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#openFileOutput(java.lang.String, int)">openFileOutput</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode)</nobr>
<div class="jd-descrdiv">Open a private file associated with this Context's application package
for writing.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/database/sqlite/SQLiteDatabase.html">SQLiteDatabase</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory)">openOrCreateDatabase</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode, <a href="../../../reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html">SQLiteDatabase.CursorFactory</a> factory)</nobr>
<div class="jd-descrdiv">Open a new private SQLiteDatabase associated with this Context's
application package.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/database/sqlite/SQLiteDatabase.html">SQLiteDatabase</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase.CursorFactory, android.database.DatabaseErrorHandler)">openOrCreateDatabase</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, int mode, <a href="../../../reference/android/database/sqlite/SQLiteDatabase.CursorFactory.html">SQLiteDatabase.CursorFactory</a> factory, <a href="../../../reference/android/database/DatabaseErrorHandler.html">DatabaseErrorHandler</a> errorHandler)</nobr>
<div class="jd-descrdiv">Open a new private SQLiteDatabase associated with this Context's
application package.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/graphics/drawable/Drawable.html">Drawable</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#peekWallpaper()">peekWallpaper</a></span>()</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#peekDrawable()">WallpaperManager.peek()</a></code> instead.
</em></div>
</td></tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#registerComponentCallbacks(android.content.ComponentCallbacks)">registerComponentCallbacks</a></span>(<a href="../../../reference/android/content/ComponentCallbacks.html">ComponentCallbacks</a> callback)</nobr>
<div class="jd-descrdiv">Add a new <code><a href="../../../reference/android/content/ComponentCallbacks.html">ComponentCallbacks</a></code> to the base application of the
Context, which will be called at the same times as the ComponentCallbacks
methods of activities and other components are called.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/Intent.html">Intent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)">registerReceiver</a></span>(<a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> receiver, <a href="../../../reference/android/content/IntentFilter.html">IntentFilter</a> filter)</nobr>
<div class="jd-descrdiv">Register a BroadcastReceiver to be run in the main activity thread.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/Intent.html">Intent</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter, java.lang.String, android.os.Handler)">registerReceiver</a></span>(<a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> receiver, <a href="../../../reference/android/content/IntentFilter.html">IntentFilter</a> filter, <a href="../../../reference/java/lang/String.html">String</a> broadcastPermission, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler)</nobr>
<div class="jd-descrdiv">Register to receive intent broadcasts, to run in the context of
<var>scheduler</var>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#removeStickyBroadcast(android.content.Intent)">removeStickyBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Remove the data previously sent with <code><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast(Intent)</a></code>,
so that it is as if the sticky broadcast had never happened.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#removeStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)">removeStickyBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#removeStickyBroadcast(android.content.Intent)">removeStickyBroadcast(Intent)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#revokeUriPermission(android.net.Uri, int)">revokeUriPermission</a></span>(<a href="../../../reference/android/net/Uri.html">Uri</a> uri, int modeFlags)</nobr>
<div class="jd-descrdiv">Remove all permissions to access a particular content provider Uri
that were previously added with <code><a href="../../../reference/android/content/Context.html#grantUriPermission(java.lang.String, android.net.Uri, int)">grantUriPermission(String, Uri, int)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent, java.lang.String)">sendBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission)</nobr>
<div class="jd-descrdiv">Broadcast the given intent to all interested BroadcastReceivers, allowing
an optional required permission to be enforced.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Broadcast the given intent to all interested BroadcastReceivers.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle)">sendBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast(Intent)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String)">sendBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent, java.lang.String)">sendBroadcast(Intent, String)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendOrderedBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast(Intent)</a></code> that allows you to
receive data back from the broadcast.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent, java.lang.String)">sendOrderedBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission)</nobr>
<div class="jd-descrdiv">Broadcast the given intent to all interested BroadcastReceivers, delivering
them one at a time to allow more preferred receivers to consume the
broadcast before it is delivered to less preferred receivers.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendOrderedBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user, <a href="../../../reference/java/lang/String.html">String</a> receiverPermission, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of
<code><a href="../../../reference/android/content/Context.html#sendOrderedBroadcast(android.content.Intent, java.lang.String, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, int, String, Bundle)</a></code>
that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Perform a <code><a href="../../../reference/android/content/Context.html#sendBroadcast(android.content.Intent)">sendBroadcast(Intent)</a></code> that is "sticky," meaning the
Intent you are sending stays around after the broadcast is complete,
so that others can quickly retrieve that data through the return
value of <code><a href="../../../reference/android/content/Context.html#registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)">registerReceiver(BroadcastReceiver, IntentFilter)</a></code>.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendStickyBroadcastAsUser(android.content.Intent, android.os.UserHandle)">sendStickyBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast(Intent)</a></code> that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendStickyOrderedBroadcast</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/content/Context.html#sendStickyBroadcast(android.content.Intent)">sendStickyBroadcast(Intent)</a></code> that allows you to
receive data back from the broadcast.</div>
</td></tr>
<tr class=" api apilevel-17" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#sendStickyOrderedBroadcastAsUser(android.content.Intent, android.os.UserHandle, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendStickyOrderedBroadcastAsUser</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/UserHandle.html">UserHandle</a> user, <a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> resultReceiver, <a href="../../../reference/android/os/Handler.html">Handler</a> scheduler, int initialCode, <a href="../../../reference/java/lang/String.html">String</a> initialData, <a href="../../../reference/android/os/Bundle.html">Bundle</a> initialExtras)</nobr>
<div class="jd-descrdiv">Version of
<code><a href="../../../reference/android/content/Context.html#sendStickyOrderedBroadcast(android.content.Intent, android.content.BroadcastReceiver, android.os.Handler, int, java.lang.String, android.os.Bundle)">sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)</a></code>
that allows you to specify the
user the broadcast will be sent to.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#setTheme(int)">setTheme</a></span>(int resid)</nobr>
<div class="jd-descrdiv">Set the base theme for this context.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#setWallpaper(java.io.InputStream)">setWallpaper</a></span>(<a href="../../../reference/java/io/InputStream.html">InputStream</a> data)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#setStream(java.io.InputStream)">WallpaperManager.set()</a></code> instead.
<p>This method requires the caller to hold the permission
<code><a href="../../../reference/android/Manifest.permission.html#SET_WALLPAPER">SET_WALLPAPER</a></code>.
</em></div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#setWallpaper(android.graphics.Bitmap)">setWallpaper</a></span>(<a href="../../../reference/android/graphics/Bitmap.html">Bitmap</a> bitmap)</nobr>
<div class="jd-descrdiv"><em>
This method was deprecated
in API level 5.
Use <code><a href="../../../reference/android/app/WallpaperManager.html#setBitmap(android.graphics.Bitmap)">WallpaperManager.set()</a></code> instead.
<p>This method requires the caller to hold the permission
<code><a href="../../../reference/android/Manifest.permission.html#SET_WALLPAPER">SET_WALLPAPER</a></code>.
</em></div>
</td></tr>
<tr class=" api apilevel-16" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startActivities(android.content.Intent[], android.os.Bundle)">startActivities</a></span>(<a href="../../../reference/android/content/Intent.html">Intent[]</a> intents, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch multiple new activities.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startActivities(android.content.Intent[])">startActivities</a></span>(<a href="../../../reference/android/content/Intent.html">Intent[]</a> intents)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/content/Context.html#startActivities(android.content.Intent[], android.os.Bundle)">startActivities(Intent[], Bundle)</a></code> with no options
specified.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startActivity(android.content.Intent)">startActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity(Intent, Bundle)</a></code> with no options
specified.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> intent, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Launch a new activity.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startInstrumentation(android.content.ComponentName, java.lang.String, android.os.Bundle)">startInstrumentation</a></span>(<a href="../../../reference/android/content/ComponentName.html">ComponentName</a> className, <a href="../../../reference/java/lang/String.html">String</a> profileFile, <a href="../../../reference/android/os/Bundle.html">Bundle</a> arguments)</nobr>
<div class="jd-descrdiv">Start executing an <code><a href="../../../reference/android/app/Instrumentation.html">Instrumentation</a></code> class.</div>
</td></tr>
<tr class="alt-color api apilevel-16" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSender</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags, <a href="../../../reference/android/os/Bundle.html">Bundle</a> options)</nobr>
<div class="jd-descrdiv">Like <code><a href="../../../reference/android/content/Context.html#startActivity(android.content.Intent, android.os.Bundle)">startActivity(Intent, Bundle)</a></code>, but taking a IntentSender
to start.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)">startIntentSender</a></span>(<a href="../../../reference/android/content/IntentSender.html">IntentSender</a> intent, <a href="../../../reference/android/content/Intent.html">Intent</a> fillInIntent, int flagsMask, int flagsValues, int extraFlags)</nobr>
<div class="jd-descrdiv">Same as <code><a href="../../../reference/android/content/Context.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int, android.os.Bundle)">startIntentSender(IntentSender, Intent, int, int, int, Bundle)</a></code>
with no options specified.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/content/ComponentName.html">ComponentName</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#startService(android.content.Intent)">startService</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> service)</nobr>
<div class="jd-descrdiv">Request that a given application service be started.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#stopService(android.content.Intent)">stopService</a></span>(<a href="../../../reference/android/content/Intent.html">Intent</a> service)</nobr>
<div class="jd-descrdiv">Request that a given application service be stopped.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#unbindService(android.content.ServiceConnection)">unbindService</a></span>(<a href="../../../reference/android/content/ServiceConnection.html">ServiceConnection</a> conn)</nobr>
<div class="jd-descrdiv">Disconnect from an application service.</div>
</td></tr>
<tr class=" api apilevel-14" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#unregisterComponentCallbacks(android.content.ComponentCallbacks)">unregisterComponentCallbacks</a></span>(<a href="../../../reference/android/content/ComponentCallbacks.html">ComponentCallbacks</a> callback)</nobr>
<div class="jd-descrdiv">Remove a <code><a href="../../../reference/android/content/ComponentCallbacks.html">ComponentCallbacks</a></code> object that was previously registered
with <code><a href="../../../reference/android/content/Context.html#registerComponentCallbacks(android.content.ComponentCallbacks)">registerComponentCallbacks(ComponentCallbacks)</a></code>.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/Context.html#unregisterReceiver(android.content.BroadcastReceiver)">unregisterReceiver</a></span>(<a href="../../../reference/android/content/BroadcastReceiver.html">BroadcastReceiver</a> receiver)</nobr>
<div class="jd-descrdiv">Unregister a previously registered BroadcastReceiver.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
><img id="inherited-methods-java.lang.Object-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From class
<a href="../../../reference/java/lang/Object.html">java.lang.Object</a>
<div id="inherited-methods-java.lang.Object">
<div id="inherited-methods-java.lang.Object-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-java.lang.Object-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/Object.html">Object</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#clone()">clone</a></span>()</nobr>
<div class="jd-descrdiv">Creates and returns a copy of this <code>Object</code>.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#equals(java.lang.Object)">equals</a></span>(<a href="../../../reference/java/lang/Object.html">Object</a> o)</nobr>
<div class="jd-descrdiv">Compares this instance with the specified object and indicates if they
are equal.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#finalize()">finalize</a></span>()</nobr>
<div class="jd-descrdiv">Invoked when the garbage collector has detected that this instance is no longer reachable.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
<a href="../../../reference/java/lang/Class.html">Class</a><?></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#getClass()">getClass</a></span>()</nobr>
<div class="jd-descrdiv">Returns the unique instance of <code><a href="../../../reference/java/lang/Class.html">Class</a></code> that represents this
object's class.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
int</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#hashCode()">hashCode</a></span>()</nobr>
<div class="jd-descrdiv">Returns an integer hash code for this object.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#notify()">notify</a></span>()</nobr>
<div class="jd-descrdiv">Causes a thread which is waiting on this object's monitor (by means of
calling one of the <code>wait()</code> methods) to be woken up.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#notifyAll()">notifyAll</a></span>()</nobr>
<div class="jd-descrdiv">Causes all threads which are waiting on this object's monitor (by means
of calling one of the <code>wait()</code> methods) to be woken up.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
<a href="../../../reference/java/lang/String.html">String</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#toString()">toString</a></span>()</nobr>
<div class="jd-descrdiv">Returns a string containing a concise, human-readable description of this
object.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#wait()">wait</a></span>()</nobr>
<div class="jd-descrdiv">Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#wait(long, int)">wait</a></span>(long millis, int nanos)</nobr>
<div class="jd-descrdiv">Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the
specified timeout expires.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
final
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/java/lang/Object.html#wait(long)">wait</a></span>(long millis)</nobr>
<div class="jd-descrdiv">Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the
specified timeout expires.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.content.ComponentCallbacks" class="jd-expando-trigger closed"
><img id="inherited-methods-android.content.ComponentCallbacks-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/content/ComponentCallbacks.html">android.content.ComponentCallbacks</a>
<div id="inherited-methods-android.content.ComponentCallbacks">
<div id="inherited-methods-android.content.ComponentCallbacks-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.content.ComponentCallbacks-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ComponentCallbacks.html#onConfigurationChanged(android.content.res.Configuration)">onConfigurationChanged</a></span>(<a href="../../../reference/android/content/res/Configuration.html">Configuration</a> newConfig)</nobr>
<div class="jd-descrdiv">Called by the system when the device configuration changes while your
component is running.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ComponentCallbacks.html#onLowMemory()">onLowMemory</a></span>()</nobr>
<div class="jd-descrdiv">This is called when the overall system is running low on memory, and
actively running processes should trim their memory usage.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.content.ComponentCallbacks2" class="jd-expando-trigger closed"
><img id="inherited-methods-android.content.ComponentCallbacks2-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/content/ComponentCallbacks2.html">android.content.ComponentCallbacks2</a>
<div id="inherited-methods-android.content.ComponentCallbacks2">
<div id="inherited-methods-android.content.ComponentCallbacks2-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.content.ComponentCallbacks2-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-14" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/content/ComponentCallbacks2.html#onTrimMemory(int)">onTrimMemory</a></span>(int level)</nobr>
<div class="jd-descrdiv">Called when the operating system has determined that it is a good
time for a process to trim unneeded memory from its process.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.view.KeyEvent.Callback" class="jd-expando-trigger closed"
><img id="inherited-methods-android.view.KeyEvent.Callback-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/view/KeyEvent.Callback.html">android.view.KeyEvent.Callback</a>
<div id="inherited-methods-android.view.KeyEvent.Callback">
<div id="inherited-methods-android.view.KeyEvent.Callback-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.view.KeyEvent.Callback-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/KeyEvent.Callback.html#onKeyDown(int, android.view.KeyEvent)">onKeyDown</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a key down event has occurred.</div>
</td></tr>
<tr class=" api apilevel-5" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/KeyEvent.Callback.html#onKeyLongPress(int, android.view.KeyEvent)">onKeyLongPress</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a long press has occurred.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/KeyEvent.Callback.html#onKeyMultiple(int, int, android.view.KeyEvent)">onKeyMultiple</a></span>(int keyCode, int count, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when multiple down/up pairs of the same key have occurred
in a row.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/KeyEvent.Callback.html#onKeyUp(int, android.view.KeyEvent)">onKeyUp</a></span>(int keyCode, <a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called when a key up event has occurred.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.view.LayoutInflater.Factory" class="jd-expando-trigger closed"
><img id="inherited-methods-android.view.LayoutInflater.Factory-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/view/LayoutInflater.Factory.html">android.view.LayoutInflater.Factory</a>
<div id="inherited-methods-android.view.LayoutInflater.Factory">
<div id="inherited-methods-android.view.LayoutInflater.Factory-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.view.LayoutInflater.Factory-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView</a></span>(<a href="../../../reference/java/lang/String.html">String</a> name, <a href="../../../reference/android/content/Context.html">Context</a> context, <a href="../../../reference/android/util/AttributeSet.html">AttributeSet</a> attrs)</nobr>
<div class="jd-descrdiv">Hook you can supply that is called when inflating from a LayoutInflater.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.view.LayoutInflater.Factory2" class="jd-expando-trigger closed"
><img id="inherited-methods-android.view.LayoutInflater.Factory2-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/view/LayoutInflater.Factory2.html">android.view.LayoutInflater.Factory2</a>
<div id="inherited-methods-android.view.LayoutInflater.Factory2">
<div id="inherited-methods-android.view.LayoutInflater.Factory2-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.view.LayoutInflater.Factory2-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/LayoutInflater.Factory2.html#onCreateView(android.view.View, java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView</a></span>(<a href="../../../reference/android/view/View.html">View</a> parent, <a href="../../../reference/java/lang/String.html">String</a> name, <a href="../../../reference/android/content/Context.html">Context</a> context, <a href="../../../reference/android/util/AttributeSet.html">AttributeSet</a> attrs)</nobr>
<div class="jd-descrdiv">Version of <code><a href="../../../reference/android/view/LayoutInflater.Factory.html#onCreateView(java.lang.String, android.content.Context, android.util.AttributeSet)">onCreateView(String, Context, AttributeSet)</a></code>
that also supplies the parent that the view created view will be
placed in.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.view.View.OnCreateContextMenuListener" class="jd-expando-trigger closed"
><img id="inherited-methods-android.view.View.OnCreateContextMenuListener-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/view/View.OnCreateContextMenuListener.html">android.view.View.OnCreateContextMenuListener</a>
<div id="inherited-methods-android.view.View.OnCreateContextMenuListener">
<div id="inherited-methods-android.view.View.OnCreateContextMenuListener-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.view.View.OnCreateContextMenuListener-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/View.OnCreateContextMenuListener.html#onCreateContextMenu(android.view.ContextMenu, android.view.View, android.view.ContextMenu.ContextMenuInfo)">onCreateContextMenu</a></span>(<a href="../../../reference/android/view/ContextMenu.html">ContextMenu</a> menu, <a href="../../../reference/android/view/View.html">View</a> v, <a href="../../../reference/android/view/ContextMenu.ContextMenuInfo.html">ContextMenu.ContextMenuInfo</a> menuInfo)</nobr>
<div class="jd-descrdiv">Called when the context menu for this view is being built.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
<tr class="api apilevel-" >
<td colspan="12">
<a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.view.Window.Callback" class="jd-expando-trigger closed"
><img id="inherited-methods-android.view.Window.Callback-trigger"
src="../../../assets/images/triangle-closed.png"
class="jd-expando-trigger-img" /></a>
From interface
<a href="../../../reference/android/view/Window.Callback.html">android.view.Window.Callback</a>
<div id="inherited-methods-android.view.Window.Callback">
<div id="inherited-methods-android.view.Window.Callback-list"
class="jd-inheritedlinks">
</div>
<div id="inherited-methods-android.view.Window.Callback-summary" style="display: none;">
<table class="jd-sumtable-expando">
<tr class="alt-color api apilevel-12" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#dispatchGenericMotionEvent(android.view.MotionEvent)">dispatchGenericMotionEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process generic motion events.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#dispatchKeyEvent(android.view.KeyEvent)">dispatchKeyEvent</a></span>(<a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process key events.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#dispatchKeyShortcutEvent(android.view.KeyEvent)">dispatchKeyShortcutEvent</a></span>(<a href="../../../reference/android/view/KeyEvent.html">KeyEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process a key shortcut event.</div>
</td></tr>
<tr class=" api apilevel-4" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent)">dispatchPopulateAccessibilityEvent</a></span>(<a href="../../../reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process population of <code><a href="../../../reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a></code>s.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#dispatchTouchEvent(android.view.MotionEvent)">dispatchTouchEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process touch screen events.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#dispatchTrackballEvent(android.view.MotionEvent)">dispatchTrackballEvent</a></span>(<a href="../../../reference/android/view/MotionEvent.html">MotionEvent</a> event)</nobr>
<div class="jd-descrdiv">Called to process trackball events.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onActionModeFinished(android.view.ActionMode)">onActionModeFinished</a></span>(<a href="../../../reference/android/view/ActionMode.html">ActionMode</a> mode)</nobr>
<div class="jd-descrdiv">Called when an action mode has been finished.</div>
</td></tr>
<tr class=" api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onActionModeStarted(android.view.ActionMode)">onActionModeStarted</a></span>(<a href="../../../reference/android/view/ActionMode.html">ActionMode</a> mode)</nobr>
<div class="jd-descrdiv">Called when an action mode has been started.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onAttachedToWindow()">onAttachedToWindow</a></span>()</nobr>
<div class="jd-descrdiv">Called when the window has been attached to the window manager.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onContentChanged()">onContentChanged</a></span>()</nobr>
<div class="jd-descrdiv">This hook is called whenever the content view of the screen changes
(due to a call to
<code><a href="../../../reference/android/view/Window.html#setContentView(android.view.View, android.view.ViewGroup.LayoutParams)">Window.setContentView</a></code> or
<code><a href="../../../reference/android/view/Window.html#addContentView(android.view.View, android.view.ViewGroup.LayoutParams)">Window.addContentView</a></code>).</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onCreatePanelMenu(int, android.view.Menu)">onCreatePanelMenu</a></span>(int featureId, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Initialize the contents of the menu for panel 'featureId'.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/view/View.html">View</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onCreatePanelView(int)">onCreatePanelView</a></span>(int featureId)</nobr>
<div class="jd-descrdiv">Instantiate the view to display in the panel for 'featureId'.</div>
</td></tr>
<tr class="alt-color api apilevel-5" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onDetachedFromWindow()">onDetachedFromWindow</a></span>()</nobr>
<div class="jd-descrdiv">Called when the window has been attached to the window manager.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onMenuItemSelected(int, android.view.MenuItem)">onMenuItemSelected</a></span>(int featureId, <a href="../../../reference/android/view/MenuItem.html">MenuItem</a> item)</nobr>
<div class="jd-descrdiv">Called when a panel's menu item has been selected by the user.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onMenuOpened(int, android.view.Menu)">onMenuOpened</a></span>(int featureId, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Called when a panel's menu is opened by the user.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onPanelClosed(int, android.view.Menu)">onPanelClosed</a></span>(int featureId, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Called when a panel is being closed.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onPreparePanel(int, android.view.View, android.view.Menu)">onPreparePanel</a></span>(int featureId, <a href="../../../reference/android/view/View.html">View</a> view, <a href="../../../reference/android/view/Menu.html">Menu</a> menu)</nobr>
<div class="jd-descrdiv">Prepare a panel to be displayed.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
boolean</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onSearchRequested()">onSearchRequested</a></span>()</nobr>
<div class="jd-descrdiv">Called when the user signals the desire to start a search.</div>
</td></tr>
<tr class="alt-color api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onWindowAttributesChanged(android.view.WindowManager.LayoutParams)">onWindowAttributesChanged</a></span>(<a href="../../../reference/android/view/WindowManager.LayoutParams.html">WindowManager.LayoutParams</a> attrs)</nobr>
<div class="jd-descrdiv">This is called whenever the current window attributes change.</div>
</td></tr>
<tr class=" api apilevel-1" >
<td class="jd-typecol"><nobr>
abstract
void</nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onWindowFocusChanged(boolean)">onWindowFocusChanged</a></span>(boolean hasFocus)</nobr>
<div class="jd-descrdiv">This hook is called whenever the window focus changes.</div>
</td></tr>
<tr class="alt-color api apilevel-11" >
<td class="jd-typecol"><nobr>
abstract
<a href="../../../reference/android/view/ActionMode.html">ActionMode</a></nobr>
</td>
<td class="jd-linkcol" width="100%"><nobr>
<span class="sympad"><a href="../../../reference/android/view/Window.Callback.html#onWindowStartingActionMode(android.view.ActionMode.Callback)">onWindowStartingActionMode</a></span>(<a href="../../../reference/android/view/ActionMode.Callback.html">ActionMode.Callback</a> callback)</nobr>
<div class="jd-descrdiv">Called when an action mode is being started for this window.</div>
</td></tr>
</table>
</div>
</div>
</td></tr>
</table>
</div><!-- jd-descr (summary) -->
<!-- Details -->
<!-- XML Attributes -->
<!-- Enum Values -->
<!-- Constants -->
<!-- Fields -->
<!-- Public ctors -->
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<h2>Public Constructors</h2>
<A NAME="ActivityGroup()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
</span>
<span class="sympad">ActivityGroup</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
</div>
<A NAME="ActivityGroup(boolean)"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
</span>
<span class="sympad">ActivityGroup</span>
<span class="normal">(boolean singleActivityMode)</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
</div>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<!-- Protected ctors -->
<!-- ========= METHOD DETAIL ======== -->
<!-- Public methdos -->
<h2>Public Methods</h2>
<A NAME="getCurrentActivity()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
<a href="../../../reference/android/app/Activity.html">Activity</a>
</span>
<span class="sympad">getCurrentActivity</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
</div>
<A NAME="getLocalActivityManager()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
public
final
<a href="../../../reference/android/app/LocalActivityManager.html">LocalActivityManager</a>
</span>
<span class="sympad">getLocalActivityManager</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p></p></div>
</div>
</div>
<!-- ========= METHOD DETAIL ======== -->
<h2>Protected Methods</h2>
<A NAME="onCreate(android.os.Bundle)"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
protected
void
</span>
<span class="sympad">onCreate</span>
<span class="normal">(<a href="../../../reference/android/os/Bundle.html">Bundle</a> savedInstanceState)</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Called when the activity is starting. This is where most initialization
should go: calling <code><a href="../../../reference/android/app/Activity.html#setContentView(int)">setContentView(int)</a></code> to inflate the
activity's UI, using <code><a href="../../../reference/android/app/Activity.html#findViewById(int)">findViewById(int)</a></code> to programmatically interact
with widgets in the UI, calling
<code><a href="../../../reference/android/app/Activity.html#managedQuery(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)">managedQuery(android.net.Uri, String[], String, String[], String)</a></code> to retrieve
cursors for data being displayed, etc.
<p>You can call <code><a href="../../../reference/android/app/Activity.html#finish()">finish()</a></code> from within this function, in
which case onDestroy() will be immediately called without any of the rest
of the activity lifecycle (<code><a href="../../../reference/android/app/Activity.html#onStart()">onStart()</a></code>, <code><a href="../../../reference/android/app/Activity.html#onResume()">onResume()</a></code>,
<code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code>, etc) executing.
<p><em>Derived classes must call through to the super class's
implementation of this method. If they do not, an exception will be
thrown.</em></p></p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>savedInstanceState</td>
<td>If the activity is being re-initialized after
previously being shut down then this Bundle contains the data it most
recently supplied in <code><a href="../../../reference/android/app/ActivityGroup.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState(Bundle)</a></code>. <b><i>Note: Otherwise it is null.</i></b></td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="onDestroy()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
protected
void
</span>
<span class="sympad">onDestroy</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Perform any final cleanup before an activity is destroyed. This can
happen either because the activity is finishing (someone called
<code><a href="../../../reference/android/app/Activity.html#finish()">finish()</a></code> on it, or because the system is temporarily destroying
this instance of the activity to save space. You can distinguish
between these two scenarios with the <code><a href="../../../reference/android/app/Activity.html#isFinishing()">isFinishing()</a></code> method.
<p><em>Note: do not count on this method being called as a place for
saving data! For example, if an activity is editing data in a content
provider, those edits should be committed in either <code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code> or
<code><a href="../../../reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState(Bundle)</a></code>, not here.</em> This method is usually implemented to
free resources like threads that are associated with an activity, so
that a destroyed activity does not leave such things around while the
rest of its application is still running. There are situations where
the system will simply kill the activity's hosting process without
calling this method (or any others) in it, so it should not be used to
do things that are intended to remain around after the process goes
away.
<p><em>Derived classes must call through to the super class's
implementation of this method. If they do not, an exception will be
thrown.</em></p></p></div>
</div>
</div>
<A NAME="onPause()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
protected
void
</span>
<span class="sympad">onPause</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Called as part of the activity lifecycle when an activity is going into
the background, but has not (yet) been killed. The counterpart to
<code><a href="../../../reference/android/app/Activity.html#onResume()">onResume()</a></code>.
<p>When activity B is launched in front of activity A, this callback will
be invoked on A. B will not be created until A's <code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code> returns,
so be sure to not do anything lengthy here.
<p>This callback is mostly used for saving any persistent state the
activity is editing, to present a "edit in place" model to the user and
making sure nothing is lost if there are not enough resources to start
the new activity without first killing this one. This is also a good
place to do things like stop animations and other things that consume a
noticeable amount of CPU in order to make the switch to the next activity
as fast as possible, or to close resources that are exclusive access
such as the camera.
<p>In situations where the system needs more memory it may kill paused
processes to reclaim resources. Because of this, you should be sure
that all of your state is saved by the time you return from
this function. In general <code><a href="../../../reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState(Bundle)</a></code> is used to save
per-instance state in the activity and this method is used to store
global persistent data (in content providers, files, etc.)
<p>After receiving this call you will usually receive a following call
to <code><a href="../../../reference/android/app/Activity.html#onStop()">onStop()</a></code> (after the next activity has been resumed and
displayed), however in some cases there will be a direct call back to
<code><a href="../../../reference/android/app/Activity.html#onResume()">onResume()</a></code> without going through the stopped state.
<p><em>Derived classes must call through to the super class's
implementation of this method. If they do not, an exception will be
thrown.</em></p></p></div>
</div>
</div>
<A NAME="onResume()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
protected
void
</span>
<span class="sympad">onResume</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Called after <code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code>, <code><a href="../../../reference/android/app/Activity.html#onRestart()">onRestart()</a></code>, or
<code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code>, for your activity to start interacting with the user.
This is a good place to begin animations, open exclusive-access devices
(such as the camera), etc.
<p>Keep in mind that onResume is not the best indicator that your activity
is visible to the user; a system window such as the keyguard may be in
front. Use <code><a href="../../../reference/android/app/Activity.html#onWindowFocusChanged(boolean)">onWindowFocusChanged(boolean)</a></code> to know for certain that your
activity is visible to the user (for example, to resume a game).
<p><em>Derived classes must call through to the super class's
implementation of this method. If they do not, an exception will be
thrown.</em></p></p></div>
</div>
</div>
<A NAME="onSaveInstanceState(android.os.Bundle)"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
protected
void
</span>
<span class="sympad">onSaveInstanceState</span>
<span class="normal">(<a href="../../../reference/android/os/Bundle.html">Bundle</a> outState)</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Called to retrieve per-instance state from an activity before being killed
so that the state can be restored in <code><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate(Bundle)</a></code> or
<code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code> (the <code><a href="../../../reference/android/os/Bundle.html">Bundle</a></code> populated by this method
will be passed to both).
<p>This method is called before an activity may be killed so that when it
comes back some time in the future it can restore its state. For example,
if activity B is launched in front of activity A, and at some point activity
A is killed to reclaim resources, activity A will have a chance to save the
current state of its user interface via this method so that when the user
returns to activity A, the state of the user interface can be restored
via <code><a href="../../../reference/android/app/Activity.html#onCreate(android.os.Bundle)">onCreate(Bundle)</a></code> or <code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code>.
<p>Do not confuse this method with activity lifecycle callbacks such as
<code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code>, which is always called when an activity is being placed
in the background or on its way to destruction, or <code><a href="../../../reference/android/app/Activity.html#onStop()">onStop()</a></code> which
is called before destruction. One example of when <code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code> and
<code><a href="../../../reference/android/app/Activity.html#onStop()">onStop()</a></code> is called and not this method is when a user navigates back
from activity B to activity A: there is no need to call <code><a href="../../../reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState(Bundle)</a></code>
on B because that particular instance will never be restored, so the
system avoids calling it. An example when <code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code> is called and
not <code><a href="../../../reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState(Bundle)</a></code> is when activity B is launched in front of activity A:
the system may avoid calling <code><a href="../../../reference/android/app/Activity.html#onSaveInstanceState(android.os.Bundle)">onSaveInstanceState(Bundle)</a></code> on activity A if it isn't
killed during the lifetime of B since the state of the user interface of
A will stay intact.
<p>The default implementation takes care of most of the UI per-instance
state for you by calling <code><a href="../../../reference/android/view/View.html#onSaveInstanceState()">onSaveInstanceState()</a></code> on each
view in the hierarchy that has an id, and by saving the id of the currently
focused view (all of which is restored by the default implementation of
<code><a href="../../../reference/android/app/Activity.html#onRestoreInstanceState(android.os.Bundle)">onRestoreInstanceState(Bundle)</a></code>). If you override this method to save additional
information not captured by each individual view, you will likely want to
call through to the default implementation, otherwise be prepared to save
all of the state of each view yourself.
<p>If called, this method will occur before <code><a href="../../../reference/android/app/Activity.html#onStop()">onStop()</a></code>. There are
no guarantees about whether it will occur before or after <code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code>.</p></div>
<div class="jd-tagdata">
<h5 class="jd-tagtitle">Parameters</h5>
<table class="jd-tagtable">
<tr>
<th>outState</td>
<td>Bundle in which to place your saved state.</td>
</tr>
</table>
</div>
</div>
</div>
<A NAME="onStop()"></A>
<div class="jd-details api apilevel-1">
<h4 class="jd-details-title">
<span class="normal">
protected
void
</span>
<span class="sympad">onStop</span>
<span class="normal">()</span>
</h4>
<div class="api-level">
<div>
Added in <a href="../../../guide/topics/manifest/uses-sdk-element.html#ApiLevels">API level 1</a></div>
</div>
<div class="jd-details-descr">
<div class="jd-tagdata jd-tagdescr"><p>Called when you are no longer visible to the user. You will next
receive either <code><a href="../../../reference/android/app/Activity.html#onRestart()">onRestart()</a></code>, <code><a href="../../../reference/android/app/Activity.html#onDestroy()">onDestroy()</a></code>, or nothing,
depending on later user activity.
<p>Note that this method may never be called, in low memory situations
where the system does not have enough memory to keep your activity's
process running after its <code><a href="../../../reference/android/app/Activity.html#onPause()">onPause()</a></code> method is called.
<p><em>Derived classes must call through to the super class's
implementation of this method. If they do not, an exception will be
thrown.</em></p></p></div>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<A NAME="navbar_top"></A>
<div id="footer" class="wrap" >
<div id="copyright">
Except as noted, this content is licensed under <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>.
For details and restrictions, see the <a href="../../../license.html">
Content License</a>.
</div>
<div id="build_info">
Android 4.4 r1 —
<script src="../../../timestamp.js" type="text/javascript"></script>
<script>document.write(BUILD_TIMESTAMP)</script>
</div>
<div id="footerlinks">
<p>
<a href="../../../about/index.html">About Android</a> |
<a href="../../../legal.html">Legal</a> |
<a href="../../../support.html">Support</a>
</p>
</div>
</div> <!-- end footer -->
</div> <!-- jd-content -->
</div><!-- end doc-content -->
</div> <!-- end body-content -->
</body>
</html>
|
terrytowne/android-developer-cn
|
reference/android/app/ActivityGroup.html
|
HTML
|
mit
| 445,244 |
const matter = require('gray-matter');
const stringifyObject = require('stringify-object');
module.exports = async function (src) {
const callback = this.async();
const { content, data } = matter(src);
const code = `export const frontMatter = ${stringifyObject(data)}
${content}`;
return callback(null, code);
};
|
YoruNoHikage/yorunohikage.github.io
|
fm-loader.js
|
JavaScript
|
mit
| 325 |
require 'optparse'
require 'erb'
opt = OptionParser.new
opt.def_option('-h', 'help') {
puts opt
exit 0
}
opt_o = nil
opt.def_option('-o FILE', 'specify output file') {|filename|
opt_o = filename
}
opt_H = nil
opt.def_option('-H FILE', 'specify output header file') {|filename|
opt_H = filename
}
C_ESC = {
"\\" => "\\\\",
'"' => '\"',
"\n" => '\n',
}
0x00.upto(0x1f) {|ch| C_ESC[[ch].pack("C")] ||= "\\%03o" % ch }
0x7f.upto(0xff) {|ch| C_ESC[[ch].pack("C")] = "\\%03o" % ch }
C_ESC_PAT = Regexp.union(*C_ESC.keys)
def c_str(str)
'"' + str.gsub(C_ESC_PAT) {|s| C_ESC[s]} + '"'
end
opt.parse!
h = {}
DATA.each_line {|s|
name, default_value = s.scan(/\S+/)
next unless name && name[0] != ?#
if h.has_key? name
warn "#{$.}: warning: duplicate name: #{name}"
next
end
h[name] = default_value
}
DEFS = h.to_a
def each_const
DEFS.each {|name, default_value|
if name =~ /\AINADDR_/
make_value = "UINT2NUM"
else
make_value = "INT2NUM"
end
guard = nil
if /\A(AF_INET6|PF_INET6|IPV6_.*)\z/ =~ name
# IPv6 is not supported although AF_INET6 is defined on bcc32/mingw
guard = "defined(INET6)"
end
yield guard, make_value, name, default_value
}
end
def each_name(pat)
DEFS.each {|name, default_value|
next if pat !~ name
yield name
}
end
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_decls")
% each_const {|guard, make_value, name, default_value|
% if default_value
#ifndef <%=name%>
# define <%=name%> <%=default_value%>
#endif
% end
% }
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs_in_guard(make_value, name, default_value)")
#if defined(<%=name%>)
rb_define_const(rb_cSocket, <%=c_str name%>, <%=make_value%>(<%=name%>));
rb_define_const(rb_mSockConst, <%=c_str name%>, <%=make_value%>(<%=name%>));
#endif
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_const_defs")
% each_const {|guard, make_value, name, default_value|
% if guard
#if <%=guard%>
<%= gen_const_defs_in_guard(make_value, name, default_value).chomp %>
#endif
% else
<%= gen_const_defs_in_guard(make_value, name, default_value).chomp %>
% end
% }
EOS
def reverse_each_name(pat)
DEFS.reverse_each {|name, default_value|
next if pat !~ name
yield name
}
end
def each_names_with_len(pat, prefix_optional=nil)
h = {}
DEFS.each {|name, default_value|
next if pat !~ name
(h[name.length] ||= []) << [name, name]
}
if prefix_optional
if Regexp === prefix_optional
prefix_pat = prefix_optional
else
prefix_pat = /\A#{Regexp.escape prefix_optional}/
end
DEFS.each {|const, default_value|
next if pat !~ const
next if prefix_pat !~ const
name = $'
(h[name.length] ||= []) << [name, const]
}
end
hh = {}
h.each {|len, pairs|
pairs.each {|name, const|
raise "name crash: #{name}" if hh[name]
hh[name] = true
}
}
h.keys.sort.each {|len|
yield h[len], len
}
end
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_name_to_int_decl(funcname, pat, prefix_optional, guard=nil)")
%if guard
#ifdef <%=guard%>
int <%=funcname%>(const char *str, int len, int *valp);
#endif
%else
int <%=funcname%>(const char *str, int len, int *valp);
%end
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_name_to_int_func_in_guard(funcname, pat, prefix_optional, guard=nil)")
int
<%=funcname%>(const char *str, int len, int *valp)
{
switch (len) {
% each_names_with_len(pat, prefix_optional) {|pairs, len|
case <%=len%>:
% pairs.each {|name, const|
#ifdef <%=const%>
if (memcmp(str, <%=c_str name%>, <%=len%>) == 0) { *valp = <%=const%>; return 0; }
#endif
% }
return -1;
% }
default:
return -1;
}
}
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_name_to_int_func(funcname, pat, prefix_optional, guard=nil)")
%if guard
#ifdef <%=guard%>
<%=gen_name_to_int_func_in_guard(funcname, pat, prefix_optional, guard)%>
#endif
%else
<%=gen_name_to_int_func_in_guard(funcname, pat, prefix_optional, guard)%>
%end
EOS
NAME_TO_INT_DEFS = []
def def_name_to_int(funcname, pat, prefix_optional, guard=nil)
decl = gen_name_to_int_decl(funcname, pat, prefix_optional, guard)
func = gen_name_to_int_func(funcname, pat, prefix_optional, guard)
NAME_TO_INT_DEFS << [decl, func]
end
def reverse_each_name_with_prefix_optional(pat, prefix_pat)
reverse_each_name(pat) {|n|
yield n, n
}
if prefix_pat
reverse_each_name(pat) {|n|
next if prefix_pat !~ n
yield n, $'
}
end
end
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_int_to_name_hash(hash_var, pat, prefix_pat)")
<%=hash_var%> = st_init_numtable();
% reverse_each_name_with_prefix_optional(pat, prefix_pat) {|n,s|
#ifdef <%=n%>
st_insert(<%=hash_var%>, (st_data_t)<%=n%>, (st_data_t)rb_intern2(<%=c_str s%>, <%=s.length%>));
#endif
% }
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_int_to_name_func(func_name, hash_var)")
ID
<%=func_name%>(int val)
{
st_data_t name;
if (st_lookup(<%=hash_var%>, (st_data_t)val, &name))
return (ID)name;
return 0;
}
EOS
ERB.new(<<'EOS', nil, '%').def_method(Object, "gen_int_to_name_decl(func_name, hash_var)")
ID <%=func_name%>(int val);
EOS
INTERN_DEFS = []
def def_intern(func_name, pat, prefix_optional=nil)
prefix_pat = nil
if prefix_optional
if Regexp === prefix_optional
prefix_pat = prefix_optional
else
prefix_pat = /\A#{Regexp.escape prefix_optional}/
end
end
hash_var = "#{func_name}_hash"
vardef = "static st_table *#{hash_var};"
gen_hash = gen_int_to_name_hash(hash_var, pat, prefix_pat)
decl = gen_int_to_name_decl(func_name, hash_var)
func = gen_int_to_name_func(func_name, hash_var)
INTERN_DEFS << [vardef, gen_hash, decl, func]
end
def_name_to_int("rsock_family_to_int", /\A(AF_|PF_)/, "AF_")
def_name_to_int("rsock_socktype_to_int", /\ASOCK_/, "SOCK_")
def_name_to_int("rsock_ipproto_to_int", /\AIPPROTO_/, "IPPROTO_")
def_name_to_int("rsock_unknown_level_to_int", /\ASOL_SOCKET\z/, "SOL_")
def_name_to_int("rsock_ip_level_to_int", /\A(SOL_SOCKET\z|IPPROTO_)/, /\A(SOL_|IPPROTO_)/)
def_name_to_int("rsock_so_optname_to_int", /\ASO_/, "SO_")
def_name_to_int("rsock_ip_optname_to_int", /\AIP_/, "IP_")
def_name_to_int("rsock_ipv6_optname_to_int", /\AIPV6_/, "IPV6_", "IPPROTO_IPV6")
def_name_to_int("rsock_tcp_optname_to_int", /\ATCP_/, "TCP_")
def_name_to_int("rsock_udp_optname_to_int", /\AUDP_/, "UDP_")
def_name_to_int("rsock_shutdown_how_to_int", /\ASHUT_/, "SHUT_")
def_name_to_int("rsock_scm_optname_to_int", /\ASCM_/, "SCM_")
def_intern('rsock_intern_family', /\AAF_/)
def_intern('rsock_intern_family_noprefix', /\AAF_/, "AF_")
def_intern('rsock_intern_protocol_family', /\APF_/)
def_intern('rsock_intern_socktype', /\ASOCK_/)
def_intern('rsock_intern_ipproto', /\AIPPROTO_/)
def_intern('rsock_intern_iplevel', /\A(SOL_SOCKET\z|IPPROTO_)/, /\A(SOL_|IPPROTO_)/)
def_intern('rsock_intern_so_optname', /\ASO_/, "SO_")
def_intern('rsock_intern_ip_optname', /\AIP_/, "IP_")
def_intern('rsock_intern_ipv6_optname', /\AIPV6_/, "IPV6_")
def_intern('rsock_intern_tcp_optname', /\ATCP_/, "TCP_")
def_intern('rsock_intern_udp_optname', /\AUDP_/, "UDP_")
def_intern('rsock_intern_scm_optname', /\ASCM_/, "SCM_")
def_intern('rsock_intern_local_optname', /\ALOCAL_/, "LOCAL_")
result = ERB.new(<<'EOS', nil, '%').result(binding)
/* autogenerated file */
<%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| vardef }.join("\n") %>
static void
init_constants(void)
{
/* for rdoc */
/* rb_cSocket = rb_define_class("Socket", rb_cBasicSocket); */
/* rb_mSockConst = rb_define_module_under(rb_cSocket, "Constants"); */
<%= gen_const_defs %>
<%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| gen_hash }.join("\n") %>
}
<%= NAME_TO_INT_DEFS.map {|decl, func| func }.join("\n") %>
<%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| func }.join("\n") %>
EOS
header_result = ERB.new(<<'EOS', nil, '%').result(binding)
/* autogenerated file */
<%= gen_const_decls %>
<%= NAME_TO_INT_DEFS.map {|decl, func| decl }.join("\n") %>
<%= INTERN_DEFS.map {|vardef, gen_hash, decl, func| decl }.join("\n") %>
EOS
if opt_H
File.open(opt_H, 'w') {|f|
f << header_result
}
else
result = header_result + result
end
if opt_o
File.open(opt_o, 'w') {|f|
f << result
}
else
$stdout << result
end
__END__
SOCK_STREAM
SOCK_DGRAM
SOCK_RAW
SOCK_RDM
SOCK_SEQPACKET
SOCK_PACKET
AF_UNSPEC
PF_UNSPEC
AF_INET
PF_INET
AF_INET6
PF_INET6
AF_UNIX
PF_UNIX
AF_AX25
PF_AX25
AF_IPX
PF_IPX
AF_APPLETALK
PF_APPLETALK
AF_LOCAL
PF_LOCAL
AF_IMPLINK
PF_IMPLINK
AF_PUP
PF_PUP
AF_CHAOS
PF_CHAOS
AF_NS
PF_NS
AF_ISO
PF_ISO
AF_OSI
PF_OSI
AF_ECMA
PF_ECMA
AF_DATAKIT
PF_DATAKIT
AF_CCITT
PF_CCITT
AF_SNA
PF_SNA
AF_DEC
PF_DEC
AF_DLI
PF_DLI
AF_LAT
PF_LAT
AF_HYLINK
PF_HYLINK
AF_ROUTE
PF_ROUTE
AF_LINK
PF_LINK
AF_COIP
PF_COIP
AF_CNT
PF_CNT
AF_SIP
PF_SIP
AF_NDRV
PF_NDRV
AF_ISDN
PF_ISDN
AF_NATM
PF_NATM
AF_SYSTEM
PF_SYSTEM
AF_NETBIOS
PF_NETBIOS
AF_PPP
PF_PPP
AF_ATM
PF_ATM
AF_NETGRAPH
PF_NETGRAPH
AF_MAX
PF_MAX
AF_PACKET
PF_PACKET
AF_E164
PF_XTP
PF_RTIP
PF_PIP
PF_KEY
MSG_OOB
MSG_PEEK
MSG_DONTROUTE
MSG_EOR
MSG_TRUNC
MSG_CTRUNC
MSG_WAITALL
MSG_DONTWAIT
MSG_EOF
MSG_FLUSH
MSG_HOLD
MSG_SEND
MSG_HAVEMORE
MSG_RCVMORE
MSG_COMPAT
MSG_PROXY
MSG_FIN
MSG_SYN
MSG_CONFIRM
MSG_RST
MSG_ERRQUEUE
MSG_NOSIGNAL
MSG_MORE
SOL_SOCKET
SOL_IP
SOL_IPX
SOL_AX25
SOL_ATALK
SOL_TCP
SOL_UDP
IPPROTO_IP 0
IPPROTO_ICMP 1
IPPROTO_IGMP
IPPROTO_GGP
IPPROTO_TCP 6
IPPROTO_EGP
IPPROTO_PUP
IPPROTO_UDP 17
IPPROTO_IDP
IPPROTO_HELLO
IPPROTO_ND
IPPROTO_TP
IPPROTO_XTP
IPPROTO_EON
IPPROTO_BIP
IPPROTO_AH
IPPROTO_DSTOPTS
IPPROTO_ESP
IPPROTO_FRAGMENT
IPPROTO_HOPOPTS
IPPROTO_ICMPV6
IPPROTO_IPV6
IPPROTO_NONE
IPPROTO_ROUTING
IPPROTO_RAW 255
IPPROTO_MAX
# Some port configuration
IPPORT_RESERVED 1024
IPPORT_USERRESERVED 5000
# Some reserved IP v.4 addresses
INADDR_ANY 0x00000000
INADDR_BROADCAST 0xffffffff
INADDR_LOOPBACK 0x7F000001
INADDR_UNSPEC_GROUP 0xe0000000
INADDR_ALLHOSTS_GROUP 0xe0000001
INADDR_MAX_LOCAL_GROUP 0xe00000ff
INADDR_NONE 0xffffffff
# IP [gs]etsockopt options
IP_OPTIONS
IP_HDRINCL
IP_TOS
IP_TTL
IP_RECVOPTS
IP_RECVRETOPTS
IP_RECVDSTADDR
IP_RETOPTS
IP_MINTTL
IP_DONTFRAG
IP_SENDSRCADDR
IP_ONESBCAST
IP_RECVTTL
IP_RECVIF
IP_RECVSLLA
IP_PORTRANGE
IP_MULTICAST_IF
IP_MULTICAST_TTL
IP_MULTICAST_LOOP
IP_ADD_MEMBERSHIP
IP_DROP_MEMBERSHIP
IP_DEFAULT_MULTICAST_TTL
IP_DEFAULT_MULTICAST_LOOP
IP_MAX_MEMBERSHIPS
IP_ROUTER_ALERT
IP_PKTINFO
IP_PKTOPTIONS
IP_MTU_DISCOVER
IP_RECVERR
IP_RECVTOS
IP_MTU
IP_FREEBIND
IP_IPSEC_POLICY
IP_XFRM_POLICY
IP_PASSSEC
IP_PMTUDISC_DONT
IP_PMTUDISC_WANT
IP_PMTUDISC_DO
IP_UNBLOCK_SOURCE
IP_BLOCK_SOURCE
IP_ADD_SOURCE_MEMBERSHIP
IP_DROP_SOURCE_MEMBERSHIP
IP_MSFILTER
MCAST_JOIN_GROUP
MCAST_BLOCK_SOURCE
MCAST_UNBLOCK_SOURCE
MCAST_LEAVE_GROUP
MCAST_JOIN_SOURCE_GROUP
MCAST_LEAVE_SOURCE_GROUP
MCAST_MSFILTER
MCAST_EXCLUDE
MCAST_INCLUDE
SO_DEBUG
SO_REUSEADDR
SO_REUSEPORT
SO_TYPE
SO_ERROR
SO_DONTROUTE
SO_BROADCAST
SO_SNDBUF
SO_RCVBUF
SO_KEEPALIVE
SO_OOBINLINE
SO_NO_CHECK
SO_PRIORITY
SO_LINGER
SO_PASSCRED
SO_PEERCRED
SO_RCVLOWAT
SO_SNDLOWAT
SO_RCVTIMEO
SO_SNDTIMEO
SO_ACCEPTCONN
SO_USELOOPBACK
SO_ACCEPTFILTER
SO_DONTTRUNC
SO_WANTMORE
SO_WANTOOBFLAG
SO_NREAD
SO_NKE
SO_NOSIGPIPE
SO_SECURITY_AUTHENTICATION
SO_SECURITY_ENCRYPTION_TRANSPORT
SO_SECURITY_ENCRYPTION_NETWORK
SO_BINDTODEVICE
SO_ATTACH_FILTER
SO_DETACH_FILTER
SO_PEERNAME
SO_TIMESTAMP
SO_TIMESTAMPNS
SO_BINTIME
SO_RECVUCRED
SO_MAC_EXEMPT
SO_ALLZONES
SOPRI_INTERACTIVE
SOPRI_NORMAL
SOPRI_BACKGROUND
IPX_TYPE
TCP_NODELAY
TCP_MAXSEG
TCP_CORK
TCP_DEFER_ACCEPT
TCP_INFO
TCP_KEEPCNT
TCP_KEEPIDLE
TCP_KEEPINTVL
TCP_LINGER2
TCP_MD5SIG
TCP_NOOPT
TCP_NOPUSH
TCP_QUICKACK
TCP_SYNCNT
TCP_WINDOW_CLAMP
UDP_CORK
EAI_ADDRFAMILY
EAI_AGAIN
EAI_BADFLAGS
EAI_FAIL
EAI_FAMILY
EAI_MEMORY
EAI_NODATA
EAI_NONAME
EAI_OVERFLOW
EAI_SERVICE
EAI_SOCKTYPE
EAI_SYSTEM
EAI_BADHINTS
EAI_PROTOCOL
EAI_MAX
AI_PASSIVE
AI_CANONNAME
AI_NUMERICHOST
AI_NUMERICSERV
AI_MASK
AI_ALL
AI_V4MAPPED_CFG
AI_ADDRCONFIG
AI_V4MAPPED
AI_DEFAULT
NI_MAXHOST
NI_MAXSERV
NI_NOFQDN
NI_NUMERICHOST
NI_NAMEREQD
NI_NUMERICSERV
NI_DGRAM
SHUT_RD 0
SHUT_WR 1
SHUT_RDWR 2
IPV6_JOIN_GROUP
IPV6_LEAVE_GROUP
IPV6_MULTICAST_HOPS
IPV6_MULTICAST_IF
IPV6_MULTICAST_LOOP
IPV6_UNICAST_HOPS
IPV6_V6ONLY
IPV6_CHECKSUM
IPV6_DONTFRAG
IPV6_DSTOPTS
IPV6_HOPLIMIT
IPV6_HOPOPTS
IPV6_NEXTHOP
IPV6_PATHMTU
IPV6_PKTINFO
IPV6_RECVDSTOPTS
IPV6_RECVHOPLIMIT
IPV6_RECVHOPOPTS
IPV6_RECVPKTINFO
IPV6_RECVRTHDR
IPV6_RECVTCLASS
IPV6_RTHDR
IPV6_RTHDRDSTOPTS
IPV6_RTHDR_TYPE_0
IPV6_RECVPATHMTU
IPV6_TCLASS
IPV6_USE_MIN_MTU
INET_ADDRSTRLEN
INET6_ADDRSTRLEN
IFNAMSIZ
SOMAXCONN
SCM_RIGHTS
SCM_TIMESTAMP
SCM_TIMESTAMPNS
SCM_BINTIME
SCM_CREDENTIALS
SCM_CREDS
SCM_UCRED
LOCAL_PEERCRED
LOCAL_CREDS
LOCAL_CONNWAIT
|
tmtm/ruby-benchmark-suite
|
benchmarks/rdoc/ruby_trunk/ext/socket/mkconstants.rb
|
Ruby
|
mit
| 12,801 |
<aside class="right-side">
<!-- Content Header (Page header) -->
<section class="content-header" style="margin-top: 45px;">
<h1>
Verifikasi Bayar
</h1>
<ol class="breadcrumb">
<li><i class="fa fa-dashboard"></i>Kelola Pendaftar</li>
<li class="active">Verifikasi Bayar</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- left column -->
<div class="col-md-1">
</div><!--/.col (left) -->
<div class="col-md-10">
<!-- general form elements -->
<div class="box box-primary">
<!--Mulai Tampilkan Data Table-->
<div class="box-body" style="align-content: center;">
<H3 style="text-align: center;"><label><?php echo $id_coming->nama_coming;?></label></H3>
<p style="text-align: center;">Diposting oleh : <?php echo $id_coming->posted_by;?></p>
<hr>
<div class="row">
<div class="col-md-4">
<div class="box-body">
<!--Gambar Event-->
<div style="height:250px; width: 250px; text-align:center;">
<img style="border: solid currentColor; height:100%" src="<?php echo base_url('asset/upload_img_coming/'.$id_coming->path_gambar); ?>">
</div><br>
<div style="margin-left: 20px;">
<?php if($id_coming->status==1){?>
<!-- Tombol kembali -->
<a href="<?php echo site_url('KelolaComing');?>"><button class="btn btn-warning btn-sm"><i class="glyphicon glyphicon-arrow-left" ></i> Kembali</button></a>
<!-- Tombol Edit -->
<a href="<?php echo site_url('KelolaComing/edit_comming_soon/'.$id_coming->id_coming);?>"><button id="edit-button-coming" type="submit" class="btn btn-info btn-sm"><i class="glyphicon glyphicon-pencil" ></i> Edit</button></a>
<!-- Tombol Hapus -->
<a href="<?php echo site_url('KelolaComing/delete_detail_coming/'.$id_coming->id_coming);?>"><button class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-trash" ></i> Hapus</button></a>
</div>
<div style="width: 300px;">
<?php } else {?>
<!-- Tombol kembali -->
<a href="<?php echo site_url('KelolaComing/validasi_Coming');?>"><button class="btn btn-warning btn-sm"><i class="glyphicon glyphicon-arrow-left" ></i> Kembali</button></a>
<!-- Tombol Edit -->
<a href="<?php echo site_url('KelolaComing/edit_comming_soon/'.$id_coming->id_coming);?>"><button id="edit-button-coming" type="submit" class="btn btn-info btn-sm"><i class="glyphicon glyphicon-pencil" ></i> Edit</button></a>
<!-- Tombol Setuju -->
<a href="<?php echo site_url('KelolaComing/setuju_detail_coming/'.$id_coming->id_coming);?>"><button id="success-button-coming" type="submit" class="btn btn-success btn-sm"><i class="glyphicon glyphicon-ok" ></i> Setuju</button></a>
<!-- Tombol Hapus -->
<a href="<?php echo site_url('KelolaComing/tolak_detail_coming/'.$id_coming->id_coming);?>"><button id="delete-button-coming" type="submit" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-remove" ></i> Tolak</button></a>
<?php }?>
</div>
</div>
</div>
<!--Detail Event-->
<div class="col-sm-8" style="padding-top: 10px;">
<div class="box-group" id="accordion">
<!--Accordion for information event-->
<div class="panel box box-primary">
<div class="box-header">
<h4 class="box-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">
<label>Informasi Event</label>
</a>
</h4>
</div>
<div id="collapseOne" class="panel-collapse collapse">
<div class="box-body">
<table class="table">
<tr>
<td>Institusi Penyelenggara</td>
<td>:</td>
<td style="text-align: left;"><?php echo $id_coming->institusi;?></td>
</tr>
<tr>
<td style="width: 200px;">Kategori Event</td>
<td style="width: 10px;">:</td>
<td style="text-align: left;"><?php echo $id_coming->kategori_coming;?></td>
</tr>
<tr>
<td>Tipe Event</td>
<td>:</td>
<td style="text-align: left;"><?php echo $id_coming->tipe_event;?></td>
</tr>
<tr>
<td>Jenis Event</td>
<td>:</td>
<td style="text-align: left;">
<?php
$jenis_event=$id_coming->jenis_event;
if ($jenis_event == 1)
{
echo "Gratis";
}
else
{
echo "Berbayar";
}
?>
</td>
</tr>
<tr>
<td>Pendaftaran</td>
<td>:</td>
<td style="text-align: left;">
<?php
$pendaftaran=$id_coming->pendaftaran;
if ($pendaftaran == 1)
{
echo "Ya";
}
else
{
echo "Tidak";
}
?>
</td>
</tr>
<tr>
<td>Contact Person</td>
<td>:</td>
<td style="text-align: left;"><?php echo $id_coming->telepon;?></td>
</tr>
<tr>
<td>E-Mail</td>
<td>:</td>
<td style="text-align: left;"><?php echo $id_coming->email;?></td>
</tr>
<tr>
<td>Tanggal Event</td>
<td>:</td>
<td>
<?php
$tgl_mulai=$id_coming->tgl_mulai;
$tgl_selesai=$id_coming->tgl_selesai;
if ($tgl_mulai == $tgl_selesai)
{
echo $tgl_mulai;
}
else
{
echo $tgl_mulai." s/d ".$tgl_selesai;
}
?>
</td>
</tr>
<tr>
<td>Waktu Event</td>
<td>:</td>
<td>
<?php
$jam_mulai=$id_coming->jam_mulai;
$jam_selesai=$id_coming->jam_selesai;
if ($jam_mulai == $jam_selesai)
{
echo $jam_mulai;
}
else
{
echo $jam_mulai." s/d ".$jam_selesai;
}
?>
</td>
</tr>
<tr>
<td>Keterangan Event</td>
<td>:</td>
<td><?php echo $id_coming->deskripsi_coming;?></td>
</tr>
</table>
</div>
</div>
</div>
<!--Accordion for Press Release List-->
<div class="panel box box-danger">
<div class="box-header">
<h4 class="box-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseTwo">
<label>Daftar Press Release News</label>
</a>
</h4>
</div>
<div id="collapseTwo" class="panel-collapse collapse">
<div class="box-body">
<table class="table">
<?php
if(count($dataNews->result_array())>0)
{
foreach ($dataNews->result() as $data)
{ ?>
<tr>
<td style="width: 400px;">
<b><a href="#"><?php echo $data->judul_news; ?></a></b><br>
<?php echo "Posted By: ".$data->posted_by; ?>
</td>
<td style="text-align: center; padding-top: 13px;">
<!-- Tombol Edit -->
<a href="<?php echo site_url('KelolaNews/edit_news/'.$data->id_news);?>"><button id="edit-button-coming" type="submit" class="btn btn-warning btn-sm"><i class="glyphicon glyphicon-pencil" ></i> Edit</button></a>
<!-- Tombol Hapus -->
<button onclick="delete_news_ajax(<?php echo $data->id_news; ?>)" id="delete-button-coming" type="submit" class="btn btn-danger btn-sm" value=1><i class="glyphicon glyphicon-trash" ></i> Hapus</button>
</td>
</tr>
<?php }
}
else
{?>
<tr>
<td>Data Press Release Kosong</td>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
<!--Accordion for Testimoni List-->
<div class="panel box box-success">
<div class="box-header">
<h4 class="box-title">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree">
<label>Daftar Testimoni</label>
</a>
</h4>
</div>
<div id="collapseThree" class="panel-collapse collapse">
<div class="box-body">
<table class="table">
<?php
if(count($dataTestimoni->result_array())>0)
{
foreach ($dataTestimoni->result() as $testimoni)
{?>
<tr>
<td style="width: 500px; padding-top: 12px;">
<i class="glyphicon glyphicon-user"></i> <?php echo $testimoni->penulis_testimoni; ?> || <i class="glyphicon glyphicon-calendar"></i> <?php echo $testimoni->tgl_posting; ?>
<br><br>
<?php echo $testimoni->isi_testimoni; ?>
</td>
<td>
<!-- Tombol Hapus -->
<button onclick="delete_testimoni_ajax(<?php echo $testimoni->id_testimoni; ?>)" id="delete-button-testimoni" type="submit" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-trash" ></i> Hapus</button>
</td>
</tr>
<?php }
}
else
{?>
<tr>
<td>Data Testimoni</td>
</tr>
<?php } ?>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!--/.col (left) -->
<div class="col-md-1">
</div><!--/.col (left) -->
</div> <!-- /.row -->
</section><!-- /.content -->
</aside><!-- /.right-side -->
|
SezaDio/boloku_id
|
application/views/content_admin/verifikasi_bayar.php
|
PHP
|
mit
| 24,884 |
<!DOCTYPE html>
<html>
{% include head.html %}
<body>
<div class="content-container">
{{ content }}
</div>
<div class="footer-container">
{% include footer.html %}
</div>
</body>
</html>
|
jermspeaks/jermspeaks.github.io
|
_layouts/next-default.html
|
HTML
|
mit
| 226 |
var System = require('systemjs');
var path = require('path');
var fs = require('fs');
module.exports = {
getJSPMPackagePath: function getJSPMPackagePath(dep) {
if (Object.keys(System.map).length === 0) {
eval(fs.readFileSync(global.paths.systemConfig, 'utf8'));
}
var src = '/' + dep.src;
if (dep.name) {
var url = System.normalizeSync(dep.name).replace('file:', '');
var dir = path.resolve(url.substring(0, url.length - 3));
src = dir + src;
}
return '.' + src;
}
};
|
vadimpopa/jspm-ionic2-starter
|
gulp/utils.js
|
JavaScript
|
mit
| 593 |
module AjaxDataGrid
class TableBuilder
attr_reader :config, :tile_config, :columns, :table_options, :aggregated_data_config, :table_footer_block
def initialize(config, table_options = {})
@config = config
@table_options = {:manual_clear_filter => false, :empty_rows => config.translate('no_rows.message'), :empty_filter => config.translate('no_rows_filter.message'), :render_type => :string_concat}.update(table_options)
raise ArgumentError.new(":row_title attribute not specified or not a Proc") if @table_options[:row_title].present? && !@table_options[:row_title].is_a?(Proc)
@columns = []
@tile = nil
end
def tile(options = {}, &block)
raise ArgumentError.new("Must pass a block") unless block_given?
@tile_config = TileConfig.new(options, &block)
end
def column(title, options = {}, &block)
add_column(Column, title, options, &block)
end
def select_column
add_column(SelectColumn, '', :class => 'selection')
end
def edit_column(options = {}, &block)
options = {:width => 50}.update(options.update(:class => 'edit'))
raise ArgumentError.new("Must specify url attribute for edit column (:url => ..)") if options[:url].blank?
add_column(EditColumn, options[:title] || '', options, &block)
end
def destroy_column(options = {}, &block)
options = {:width => 50,
:button_tooltip => @config.translate('destroy_column.tooltip'),
:url_method => :delete,
:url_remote => true,
:confirm_message => @config.translate('destroy_column.confirm_message')
}.update(options.update(:class => 'destroy'))
raise ArgumentError.new("Must specify url attribute for destroy column (:url => ..)") if options[:url].blank?
add_column(DestroyColumn, options[:title] || '', options, &block)
end
def data_aggregator(init_data = {}, &block)
@aggregated_data_config = AggregatedDataConfig.new(init_data, &block)
end
def table_footer(&block)
@table_footer_block = block
end
private
def add_column(clazz, title, options, &block)
@columns << clazz.new(title, options.update(:index => @columns.length), &block)
end
end
class AggregatedDataConfig
attr_reader :aggregator_block, :data
def initialize(init_data, &block)
@aggregator_block = block
@data = init_data
end
end
class TileConfig
attr_reader :block
def initialize(options, &block)
@block = block
end
end
class Column
attr_reader :title, :options, :header_cell_options, :body_cell_options, :js_options, :block
@@default_formats = {
:float => '%.2f' # will be passed to sprintf
}
def self.default_formats; @@default_formats; end
def initialize(title, options = {}, &block)
@title = title
@options = {:id => "column_#{options[:index]}", :html => {}}.update(options)
@block = block_given? ? block : nil
init_options
init_html_options
init_js_options
end
def id
@options[:id]
end
def sub_title
@options[:sub_title]
end
def binding_path
@options[:binding_path]
end
def value_format
@options[:format]
end
def sortable?
@options[:sortable]
end
def sort_by
@options[:sort_by]
end
def sort_direction
@options[:sort_direction]
end
def editable?
@options[:editable]
end
def data_attributes
@options[:data_attributes]
end
def escape_data_attributes
@options[:escape_data_attributes]
end
# array of grid views this columns belongs to. if nil, column belongs to all views
def views
@options[:views]
end
def in_view?(view)
views.present? ? views.include?(view.to_sym) : true
end
def qtip?
!options[:qtip].blank?
end
private
def init_options
opts = @options
opts[:data_attributes] = opts[:data_attributes] || {}
opts[:escape_data_attributes] = opts[:escape_data_attributes] || {}
opts[:editable] = opts[:editor] if opts[:editable].blank?
#if opts[:editor] && !opts[:binding_path].blank?
# opts[:editor][:value_path] = opts[:binding_path] if opts[:editor][:value_path].blank?
# opts[:editor][:update_path] = opts[:binding_path] if opts[:editor][:update_path].blank?
#end
if opts[:data_attributes].is_a?(Array)
opts[:data_attributes] = opts[:data_attributes].inject({}){|h, item| h[item] = item; h }
end
if !opts[:binding_path].blank? && opts[:data_attributes][opts[:binding_path]].blank?
opts[:data_attributes][opts[:binding_path]] = opts[:binding_path]
end
if editable?
opts[:refresh_cols_indices] ||= []
opts[:refresh_cols_indices] << options[:index] unless opts[:refresh_cols_indices].include?(options[:index])
end
#if editable? && opts[:data_attributes][opts[:editor][:value_path]].blank?
# opts[:data_attributes][opts[:editor][:value_path]] = opts[:editor][:value_path]
#end
if sortable?
opts[:sort_by] = binding_path if opts[:sort_by].blank?
opts[:sort_direction] = 'asc' if opts[:sort_direction].blank?
end
opts[:views] = [opts[:views]] if opts[:views].present? && !opts[:views].is_a?(Array)
end
def init_html_options
@header_cell_options = {'data-column_id' => @id}
@body_cell_options = {}
header_styles = []
body_styles = []
header_classes = []
body_classes = []
html = options[:html]
header_styles << "width: #{options[:width]}px" if options[:width].present?
body_styles << "width: #{options[:width]}px" if options[:width].present?
if options[:class]
header_classes << options[:class]
body_classes << options[:class]
end
if editable?
body_classes << 'editable'
body_classes << 'dialog_editor' if options[:editor] && options[:editor][:dialog]
body_classes << 'fbox_editor' if options[:editor] && options[:editor][:fbox]
body_classes << 'qtip_editor' if options[:editor] && options[:editor][:qtip]
end
if sortable?
header_classes << 'sortable'
@header_cell_options['data-sort-by'] = sort_by
@header_cell_options['data-sort-direction'] = sort_direction
end
if qtip?
header_classes << 'tooltipTarget pos-bc-tc'
end
@header_cell_options[:style] = header_styles.join(';') if header_styles.size > 0
@body_cell_options[:style] = body_styles.join(';') if body_styles.size > 0
@body_cell_options[:class] = body_classes.join(' ') if body_classes.size > 0
@header_cell_options[:class] = header_classes.join(' ') if header_classes.size > 0
end
def init_js_options
@js_options = {}
[:id, :binding_path, :editor, :index, :jq_dialog_confirm].each{|key| @js_options[key] = @options[key] if @options.has_key?(key) }
end
end
class SelectColumn < Column
def selection
@options[:selection]
end
end
class EditColumn < Column
def url
options[:url]
end
def link_to_options
opts = {}
opts[:class] = self.options[:url_class] if self.options[:url_class].present?
opts
end
end
class DestroyColumn < Column
def button_tooltip
options[:button_tooltip]
end
def url
options[:url]
end
def url_method
options[:url_method]
end
def url_remote
#options[:url_remote]
true #non remote urls not supported for now
end
def link_to_options
opts = {'ajax_method' => url_method, :title => button_tooltip}
if self.options[:confirm_message].present?
opts['data-confirm_message'] = self.options[:confirm_message]
self.options[:confirm_type] ||= :alert
end
opts['data-confirm_type'] = self.options[:confirm_type] if self.options[:confirm_type].present?
opts['data-ajax_submit'] = true if self.url_remote
opts
end
end
end
|
alextk/rego-data-grid
|
lib/ajax_data_grid/table_builder.rb
|
Ruby
|
mit
| 8,128 |
<!-- task row -->
<tr class="board-swimlane swimlane-row-<?= $swimlane['id'] ?>">
<?php foreach ($swimlane['columns'] as $column): ?>
<td class="
board-column-<?= $column['id'] ?>
<?= $column['task_limit'] > 0 && $column['nb_tasks'] > $column['task_limit'] ? 'board-task-list-limit' : '' ?>
">
<!-- tasks list -->
<div class="board-task-list board-column-expanded" data-column-id="<?= $column['id'] ?>" data-swimlane-id="<?= $swimlane['id'] ?>" data-task-limit="<?= $column['task_limit'] ?>">
<?php foreach ($column['tasks'] as $task): ?>
<?= $this->render($not_editable ? 'board/task_public' : 'board/task_private', array(
'project' => $project,
'task' => $task,
'board_highlight_period' => $board_highlight_period,
'not_editable' => $not_editable,
)) ?>
<?php endforeach ?>
</div>
<!-- column in collapsed mode (rotated text) -->
<div class="board-column-collapsed">
<div class="board-rotation-wrapper">
<div class="board-column-title board-rotation" data-column-id="<?= $column['id'] ?>" title="<?= t('Show this column') ?>">
<i class="fa fa-chevron-circle-up tooltip" title="<?= $this->e($column['title']) ?>"></i> <?= $this->e($column['title']) ?>
</div>
</div>
</div>
</td>
<?php endforeach ?>
</tr>
|
sanbiv/kanboard
|
app/Template/board/table_tasks.php
|
PHP
|
mit
| 1,604 |
# Auto-generated code below aims at helping you parse
# the standard input according to the problem statement.
@lon = gets.chomp
@lat = gets.chomp
@n = gets.to_i
def to_rad(degree)
return degree * Math::PI / 180
end
def distBetween(latA, longA, latB, longB)
x = (longB - longA) * Math.cos((latA + latB) / 2)
y = latB - latA
return Math.sqrt((x*x) + (y*y)) * 6371
end
@lat, @lon = to_rad(@lat.sub(",",".").to_f), to_rad(@lon.sub(",",".").to_f)
name = ""
min = -1
@n.times do
defib = gets.chomp.split(";")
defib_name = defib[1]
defibLat, defibLong = to_rad(defib[5].sub(",",".").to_f), to_rad(defib[4].sub(",",".").to_f)
distance = distBetween(@lat, @lon, defibLat, defibLong)
if(min == -1 || distance < min)
min = distance
name = defib_name
end
end
puts name
|
Callidon/codingame
|
easy_level/defibrillators.rb
|
Ruby
|
mit
| 820 |
class DeviseCreateUsers < ActiveRecord::Migration
def change
create_table(:users) do |t|
t.string :username
t.string :first_name
t.string :last_name
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Recoverable
t.string :reset_password_token
t.datetime :reset_password_sent_at
## Rememberable
t.datetime :remember_created_at
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip
## Confirmable
# t.string :confirmation_token
# t.datetime :confirmed_at
# t.datetime :confirmation_sent_at
# t.string :unconfirmed_email # Only if using reconfirmable
## Lockable
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
# t.string :unlock_token # Only if unlock strategy is :email or :both
# t.datetime :locked_at
t.timestamps
end
add_index :users, :email, unique: true
add_index :users, :reset_password_token, unique: true
# add_index :users, :confirmation_token, unique: true
# add_index :users, :unlock_token, unique: true
end
end
|
alankehoe/ziemniak
|
db/migrate/20140428075531_devise_create_users.rb
|
Ruby
|
mit
| 1,423 |
require 'net/http'
require 'outpost/expectations'
module Outpost
module Scouts
# Uses ruby's own Net:HTTP to send HTTP requests and evaluate response
# body, response time and response code.
#
# * Responds to response_time expectation
# ({Outpost::Expectations::ResponseTime})
# * Responds to response_code expectation
# ({Outpost::Expectations::ResponseCode})
# * Responds to response_body expectation
# ({Outpost::Expectations::ResponseBody})
#
class Http < Outpost::Scout
extend Outpost::Expectations::ResponseCode
extend Outpost::Expectations::ResponseBody
extend Outpost::Expectations::ResponseTime
attr_reader :response_code, :response_body, :response_time
report_data :response_code, :response_body, :response_time
# Configure the scout with given options.
# @param [Hash] Options to setup the scout
# @option options [String] :host The host that will be connected to.
# @option options [Number] :port The port that will be used to.
# @option options [String] :path The path that will be fetched from the
# host.
# @option options [String] :http_class The class that will be used to
# fetch the page, defaults to Net::HTTP
def setup(options)
@host = options[:host]
@port = options[:port] || 80
@path = options[:path] || '/'
@http_class = options[:http_class] || Net::HTTP
end
# Runs the scout, connecting to the host and getting the response code,
# body and time.
def execute
previous_time = Time.now
response = @http_class.get_response(@host, @path, @port)
@response_time = (Time.now - previous_time) * 1000 # Miliseconds
@response_code = response.code.to_i
@response_body = response.body
rescue SocketError, Errno::ECONNREFUSED
@response_code = @response_body = @response_time = nil
end
end
end
end
|
johnbintz/outpost
|
lib/outpost/scouts/http.rb
|
Ruby
|
mit
| 2,006 |
<?php
namespace Kvartiri\KvartiriBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* GuestsRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class GuestsRepository extends EntityRepository
{
}
|
kvartiri/kvartiri
|
src/Kvartiri/KvartiriBundle/Repository/GuestsRepository.php
|
PHP
|
mit
| 271 |
var locale_select = document.getElementById("locales"),
locale_script = document.getElementById("locale_script"),
locales = ["ar", "bg", "bn", "cat", "cs", "da", "de", "es", "fa", "fi", "fr", "he", "hi", "id", "ja", "ko", "my", "nl", "no", "pa", "pl", "pt", "ru", "si", "sq", "tr", "zh"];
for(var i = 0; i < locales.length; i++){
var opt = document.createElement("option");
opt.value = locales[i];
opt.textContent = locales[i];
locale_select.appendChild(opt);
}
locale_select.addEventListener("change", function(e){
locale_script.removeEventListener("load", onLocaleChange);
locale_script.parentNode.removeChild(locale_script);
if (e.target.value !== "") {
locale_script = document.createElement("script");
locale_script.src = "src/flatpickr.l10n." + e.target.value +".js";
locale_script.addEventListener("load", onLocaleChange);
document.body.appendChild(locale_script);
}
else {
Flatpickr.l10n = defaultLocale;
document.getElementById("demo_calendar")._flatpickr.redraw();
}
});
function onLocaleChange(){
document.getElementById("demo_calendar")._flatpickr.redraw();
}
|
benignware/date_picker
|
test/dummy/vendor/assets/components/flatpickr/assets/js/localizr.js
|
JavaScript
|
mit
| 1,179 |
/*****************************************************************
* Copyright (c) 2005, Tim de Jong *
* *
* All rights reserved. *
* Distributed under the terms of the MIT License. *
*****************************************************************/
#ifndef STATUS_ITEM_H
#define STATUS_ITEM_H
#include <be/app/Message.h>
#include <be/interface/MenuItem.h>
#include <be/interface/Bitmap.h>
/** MenuItem that represents the user status at a moment. Displays
the status text and a status icon.
@author Tim de Jong
*/
class StatusItem : public BMenuItem
{
public:
StatusItem(BBitmap *icon, const char *label, BMessage *message, char shortcut = 0, uint32 modifiers = 0);
virtual ~StatusItem();
virtual void DrawContent();
private:
BBitmap *m_statusIcon;
};
#endif
|
thinkpractice/bme
|
Src/StatusItem.h
|
C
|
mit
| 848 |
// Copyright © Microsoft Corporation. All Rights Reserved.
// This code released under the terms of the
// Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.Migration.Toolkit.Services;
using System.Xml;
namespace Microsoft.TeamFoundation.Migration.Toolkit
{
[Serializable]
public class FileAttachmentMetadata : IMigrationFileAttachment
{
public FileAttachmentMetadata()
{ }
public FileAttachmentMetadata(
string name,
long length,
DateTime utcCreationDate,
DateTime utcLastWriteDate,
string comment)
{
Name = name;
Length = length;
UtcCreationDate = utcCreationDate;
UtcLastWriteDate = utcLastWriteDate;
Comment = comment;
}
public string Name { get; set; }
public long Length { get; set; }
public DateTime UtcCreationDate { get; set; }
public DateTime UtcLastWriteDate { get; set; }
public string Comment { get; set; }
public System.IO.Stream GetFileContents()
{
return null;
}
public override string ToString()
{
GenericSerializer<FileAttachmentMetadata> serializer = new GenericSerializer<FileAttachmentMetadata>();
return serializer.Serialize(this);
}
internal static string CreateAttachmentStorageId(System.Xml.XmlDocument updateDocument)
{
FileAttachmentMetadata metadata = Create(updateDocument);
if (null == metadata)
{
return string.Empty;
}
else
{
return metadata.ToString();
}
}
internal static FileAttachmentMetadata Create(System.Xml.XmlDocument updateDocument)
{
try
{
XmlElement rootNode = updateDocument.DocumentElement;
XmlNode attachmentNode = rootNode.SelectSingleNode("/WorkItemChanges/Attachment");
return new FileAttachmentMetadata(
attachmentNode.Attributes["Name"].Value,
long.Parse(attachmentNode.Attributes["Length"].Value),
DateTime.Parse(attachmentNode.Attributes["UtcCreationDate"].Value),
DateTime.Parse(attachmentNode.Attributes["UtcLastWriteDate"].Value),
attachmentNode.FirstChild.InnerText);
}
catch (Exception e)
{
TraceManager.TraceVerbose(e.ToString());
return null;
}
}
}
public class WorkItemAttachmentStore : RelatedArtifactStoreBase
{
public const string AttachmentRelationship = "Microsoft.TeamFoundation.Migration.Toolkit.AttachmentRelationship";
public WorkItemAttachmentStore(Guid migrationSourceId)
: base(migrationSourceId)
{ }
public void UpdatePerItemAttachmentChangesByCheckingRelatedItemRecords(
string workItemId,
ChangeGroup attachmentChangeGroup,
out List<FileAttachmentMetadata> additionalAttachmentToDelete)
{
if (string.IsNullOrEmpty(workItemId))
{
throw new ArgumentNullException("workItemId");
}
additionalAttachmentToDelete = new List<FileAttachmentMetadata>();
var queryByItem = QueryByItem(workItemId);
var perItemExistingAttachments =
from attch in queryByItem
where attch.RelationshipExistsOnServer
select attch;
if (attachmentChangeGroup.Actions == null
|| attachmentChangeGroup.Actions.Count == 0)
{
GenericSerializer<FileAttachmentMetadata> serializer = new GenericSerializer<FileAttachmentMetadata>();
foreach (var attch in perItemExistingAttachments)
{
if (!attch.OtherProperty.HasValue)
{
continue;
}
for (int i = 0; i < attch.OtherProperty.Value; ++i)
{
try
{
additionalAttachmentToDelete.Add(serializer.Deserialize(attch.RelatedArtifactId));
}
catch (Exception e)
{
TraceManager.TraceVerbose(e.ToString());
}
}
}
foreach (var attch in perItemExistingAttachments)
{
attch.OtherProperty = 0;
attch.RelationshipExistsOnServer = false;
}
m_context.TrySaveChanges();
}
else
{
Dictionary<IMigrationFileAttachment, List<IMigrationAction>> perAttachmentChangeActions =
GroupAttachmentByMetadata(attachmentChangeGroup);
List<IMigrationAction> skippedActions = new List<IMigrationAction>(attachmentChangeGroup.Actions.Count);
foreach (var attchSpecificActions in perAttachmentChangeActions)
{
if (attchSpecificActions.Value.Count == 0)
{
continue;
}
string attachmentStorageId = attchSpecificActions.Key.ToString();
int deltaAttachmentCount = GetAttachmentCountInDelta(attchSpecificActions.Value);
var attachmentInStore = QueryItemSpecificAttachment(perItemExistingAttachments, attachmentStorageId);
int attachmentInStoreCount = GetAttachmentInStoreCount(attachmentInStore);
int serverStoreCountDiff = deltaAttachmentCount - attachmentInStoreCount;
if (serverStoreCountDiff >= 0)
{
int redundantAttachmentActionCount = deltaAttachmentCount - serverStoreCountDiff;
var addAttachmentActionToSkip =
attchSpecificActions.Value.Where(a => a.Action == WellKnownChangeActionId.AddAttachment).Take(redundantAttachmentActionCount);
skippedActions.AddRange(addAttachmentActionToSkip);
}
else if (serverStoreCountDiff < 0)
{
IMigrationAction action = attchSpecificActions.Value[0];
do
{
attachmentChangeGroup.Actions.Add(CreateDeleteAttachmentAction(action));
}
while (++serverStoreCountDiff < 0);
}
int countAfterUpdateStore = UpdateStore(workItemId, attachmentStorageId, serverStoreCountDiff);
foreach (IMigrationAction action in attchSpecificActions.Value)
{
XmlElement attachmentNode =
action.MigrationActionDescription.DocumentElement.SelectSingleNode("/WorkItemChanges/Attachment") as XmlElement;
System.Diagnostics.Debug.Assert(null != attachmentNode, "attachmentNode is NULL");
attachmentNode.SetAttribute("CountInSourceSideStore", countAfterUpdateStore.ToString());
}
}
foreach (IMigrationAction skippedAction in skippedActions)
{
attachmentChangeGroup.Actions.Remove(skippedAction);
}
}
}
public int GetWorkItemAttachmentSpecificCount(string workItemId, XmlDocument updateDocument)
{
var queryByItem = QueryByItem(workItemId);
var perItemExistingAttachments =
from attch in queryByItem
where attch.RelationshipExistsOnServer
select attch;
string attachmentStorageId = FileAttachmentMetadata.CreateAttachmentStorageId(updateDocument);
var attachmentInStore = QueryItemSpecificAttachment(perItemExistingAttachments, attachmentStorageId);
return GetAttachmentInStoreCount(attachmentInStore);
}
private static IQueryable<EntityModel.RTRelatedArtifactsRecords> QueryItemSpecificAttachment(
IQueryable<EntityModel.RTRelatedArtifactsRecords> perItemExistingAttachments,
string attachmentStorageId)
{
var attachmentInStore =
from attch in perItemExistingAttachments
where attch.Relationship == AttachmentRelationship
&& attch.RelatedArtifactId == attachmentStorageId
select attch;
return attachmentInStore;
}
/// <summary>
/// Update the attachment count in the store
/// </summary>
/// <param name="workItemId"></param>
/// <param name="attachmentStorageId"></param>
/// <param name="serverStoreCountDiff">Positive if there are more attachments on endpoint (server);
/// Negative if there are more in the store; Zero if the count is equal</param>
private int UpdateStore(string workItemId, string attachmentStorageId, int serverStoreCountDiff)
{
int countAfterUpdate = 0;
if (serverStoreCountDiff != 0)
{
var queryByItem = QueryByItem(workItemId);
var queryAttachment = QueryItemSpecificAttachment(queryByItem, attachmentStorageId);
if (serverStoreCountDiff > 0)
{
if (queryAttachment.Count() > 0)
{
queryAttachment.First().OtherProperty =
(queryAttachment.First().OtherProperty.HasValue
? queryAttachment.First().OtherProperty.Value + serverStoreCountDiff
: serverStoreCountDiff);
countAfterUpdate = queryAttachment.First().OtherProperty.Value;
}
else
{
var attchRecord = CreateNewAttachmentStoreRecord(workItemId, attachmentStorageId, serverStoreCountDiff);
countAfterUpdate = attchRecord.OtherProperty.Value;
}
m_context.TrySaveChanges();
}
else if (serverStoreCountDiff < 0)
{
if (queryAttachment.Count() > 0)
{
queryAttachment.First().OtherProperty =
(queryAttachment.First().OtherProperty.HasValue
? queryAttachment.First().OtherProperty.Value + serverStoreCountDiff
: 0);
if (queryAttachment.First().OtherProperty.Value <= 0)
{
queryAttachment.First().OtherProperty = 0;
queryAttachment.First().RelationshipExistsOnServer = false;
}
countAfterUpdate = queryAttachment.First().OtherProperty.Value;
m_context.TrySaveChanges();
}
}
}
return countAfterUpdate;
}
private EntityModel.RTRelatedArtifactsRecords CreateNewAttachmentStoreRecord(
string workItemId,
string attachmentStorageId,
int numberOfIdenticalAttachments)
{
var attchRecord = EntityModel.RTRelatedArtifactsRecords.CreateRTRelatedArtifactsRecords(
0, workItemId, AttachmentRelationship, attachmentStorageId, true);
attchRecord.MigrationSource = this.RuntimeMigrationSource;
attchRecord.OtherProperty = numberOfIdenticalAttachments;
m_context.AddToRTRelatedArtifactsRecordsSet(attchRecord);
return attchRecord;
}
private IMigrationAction CreateDeleteAttachmentAction(IMigrationAction action)
{
SqlMigrationAction sqlMigrationAction = action as SqlMigrationAction;
System.Diagnostics.Debug.Assert(null != sqlMigrationAction, "cannot convert action to SqlMigrationAction");
SqlMigrationAction copy = new SqlMigrationAction(
action.ChangeGroup, 0, WellKnownChangeActionId.DelAttachment, action.SourceItem,
action.FromPath, action.Path, action.Version, action.MergeVersionTo, action.ItemTypeReferenceName,
action.MigrationActionDescription, action.State);
return copy;
}
private static int GetAttachmentInStoreCount(IQueryable<EntityModel.RTRelatedArtifactsRecords> attachmentInStore)
{
int attachmentInStoreCount;
if (attachmentInStore.Count() == 0
|| !attachmentInStore.First().OtherProperty.HasValue)
{
attachmentInStoreCount = 0;
}
else
{
attachmentInStoreCount = attachmentInStore.First().OtherProperty.Value;
}
return attachmentInStoreCount;
}
private int GetAttachmentCountInDelta(List<IMigrationAction> migrationActions)
{
int count = 0;
foreach (var action in migrationActions)
{
if (action.Action == WellKnownChangeActionId.AddAttachment)
{
++count;
}
else if (action.Action == WellKnownChangeActionId.DelAttachment)
{
--count;
}
}
return count;
}
private static Dictionary<IMigrationFileAttachment, List<IMigrationAction>> GroupAttachmentByMetadata(ChangeGroup attachmentChangeGroup)
{
var metadataComparer = new BasicFileAttachmentComparer();
Dictionary<IMigrationFileAttachment, List<IMigrationAction>> perAttachmentChangeActions =
new Dictionary<IMigrationFileAttachment, List<IMigrationAction>>(new BasicFileAttachmentComparer());
foreach (IMigrationAction migrationAction in attachmentChangeGroup.Actions)
{
if (IsAttachmentSpecificChangeAction(migrationAction.Action))
{
FileAttachmentMetadata attchMetadata = FileAttachmentMetadata.Create(migrationAction.MigrationActionDescription);
if (null != attchMetadata)
{
IMigrationFileAttachment existingKey = null;
foreach (IMigrationFileAttachment key in perAttachmentChangeActions.Keys)
{
if (metadataComparer.Equals(key, attchMetadata))
{
existingKey = key;
break;
}
}
if (null == existingKey)
{
existingKey = attchMetadata;
perAttachmentChangeActions.Add(existingKey, new List<IMigrationAction>());
}
perAttachmentChangeActions[existingKey].Add(migrationAction);
}
}
}
return perAttachmentChangeActions;
}
/// <summary>
/// Determines if a change action is related to work item attachment
/// </summary>
/// <param name="changeActionId"></param>
/// <returns></returns>
private static bool IsAttachmentSpecificChangeAction(Guid changeActionId)
{
return changeActionId == WellKnownChangeActionId.AddAttachment
|| changeActionId == WellKnownChangeActionId.DelAttachment;
}
public void Update(string workItemId, IMigrationAction action)
{
FileAttachmentMetadata attchMetadata = FileAttachmentMetadata.Create(action.MigrationActionDescription);
if (null != attchMetadata)
{
var queryByItem = QueryByItem(workItemId);
if (action.Action == WellKnownChangeActionId.AddAttachment)
{
if (queryByItem.Count() > 0)
{
queryByItem.First().RelationshipExistsOnServer = true;
if (queryByItem.First().OtherProperty.HasValue)
{
queryByItem.First().OtherProperty = queryByItem.First().OtherProperty.Value + 1;
}
else
{
queryByItem.First().OtherProperty = 1;
}
}
else
{
var newAttchRecord = CreateNewAttachmentStoreRecord(
workItemId, FileAttachmentMetadata.CreateAttachmentStorageId(action.MigrationActionDescription), 1);
}
}
else if (action.Action == WellKnownChangeActionId.DelAttachment)
{
if (queryByItem.Count() > 0)
{
if (queryByItem.First().RelationshipExistsOnServer)
{
if (queryByItem.First().OtherProperty.HasValue && queryByItem.First().OtherProperty.Value > 0)
{
queryByItem.First().OtherProperty = queryByItem.First().OtherProperty.Value - 1;
if (queryByItem.First().OtherProperty == 0)
{
queryByItem.First().RelationshipExistsOnServer = false;
}
}
else
{
queryByItem.First().OtherProperty = 0;
queryByItem.First().RelationshipExistsOnServer = false;
}
}
}
}
m_context.TrySaveChanges();
}
}
}
}
|
adamdriscoll/TfsIntegrationPlatform
|
Features/IntegrationPlatform-svn/Core/Toolkit/WorkItemAttachmentStore.cs
|
C#
|
mit
| 18,786 |
"""Interfaces with iAlarm control panels."""
from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
SUPPORT_ALARM_ARM_HOME,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.helpers.entity import DeviceInfo
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DATA_COORDINATOR, DOMAIN
async def async_setup_entry(
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
) -> None:
"""Set up a iAlarm alarm control panel based on a config entry."""
coordinator = hass.data[DOMAIN][entry.entry_id][DATA_COORDINATOR]
async_add_entities([IAlarmPanel(coordinator)], False)
class IAlarmPanel(CoordinatorEntity, AlarmControlPanelEntity):
"""Representation of an iAlarm device."""
@property
def device_info(self) -> DeviceInfo:
"""Return device info for this device."""
return DeviceInfo(
identifiers={(DOMAIN, self.unique_id)},
manufacturer="Antifurto365 - Meian",
name=self.name,
)
@property
def unique_id(self):
"""Return a unique id."""
return self.coordinator.mac
@property
def name(self):
"""Return the name."""
return "iAlarm"
@property
def state(self):
"""Return the state of the device."""
return self.coordinator.state
@property
def supported_features(self) -> int:
"""Return the list of supported features."""
return SUPPORT_ALARM_ARM_HOME | SUPPORT_ALARM_ARM_AWAY
def alarm_disarm(self, code=None):
"""Send disarm command."""
self.coordinator.ialarm.disarm()
def alarm_arm_home(self, code=None):
"""Send arm home command."""
self.coordinator.ialarm.arm_stay()
def alarm_arm_away(self, code=None):
"""Send arm away command."""
self.coordinator.ialarm.arm_away()
|
rohitranjan1991/home-assistant
|
homeassistant/components/ialarm/alarm_control_panel.py
|
Python
|
mit
| 2,146 |
describe('AMDManager integration', function () {
var server = meteor();
var client = browser(server);
it('should work on server', function () {
return server.execute(function () {
var manager = new AMDManager();
});
});
it('should work on client', function () {
return client.execute(function () {
var manager = new AMDManager();
});
});
});
|
deanius/meteor-amd-manager
|
example/tests/gagarin/AMDManager.js
|
JavaScript
|
mit
| 392 |
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/observable/throw';
import 'rxjs/add/operator/catch'
import {Injectable} from '@angular/core';
import {Http, RequestOptionsArgs, RequestOptions, Response, Headers, URLSearchParams} from '@angular/http';
import {Router} from '@angular/router';
declare var $;
import * as querystring from 'querystring'
const mergeAuthToken = (options: RequestOptionsArgs)=> {
let newOptions = new RequestOptions({}).merge(options);
let newHeaders = new Headers(newOptions.headers);
newHeaders.set('Content-Type', 'application/json');
newHeaders.set('token', localStorage.getItem('hl-token'));
newHeaders.set('city', localStorage.getItem("hualaCity"));
if (!localStorage.getItem("hualaCity")) {
alert('请选择城市');
}
newOptions.headers = newHeaders;
return newOptions;
};
//接口地址
const ApiUrl = process.env.ApiUrl;
@Injectable()
export class MyHttp {
private template: string = '<div class="httpOverlay" style="z-index: 9999;background: rgba(0,0,0,.4);width: 100%;height: 100vh;position: fixed;left: 0;top: 0;">' +
'<div class="row" style="padding-top: 20%;"><div class="col-md-4"></div><div class="col-md-4" style="text-align: center;color:#fff;"><i class="fa fa-spinner fa-spin fa-3x fa-fw"></i></div><div class="col-md-4"></div></div></div>';
constructor(public http: Http, public router?: Router) {
}
get(url: string, body?: Object, options?: RequestOptionsArgs): Observable<Response> {
let overlay = $('body .httpOverlay');
if (overlay.length == 0) {
$('body').append(this.template);
}
let opt = mergeAuthToken(options);
opt.search = new URLSearchParams(querystring.stringify(body));
let route = this.router;
return this.http.get(ApiUrl + url, opt).map(res=> {
$('body .httpOverlay').remove();
return res;
}).catch((error) => {
let body = error.json();
if (error.status == 401 || error.status == 402) {
window.localStorage.removeItem("hl-token");
route.navigate(["login"]);
}
$('body .httpOverlay').remove();
return Observable.throw(error);
});
}
post(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {
let overlay = $('body .httpOverlay');
if (overlay.length == 0) {
$('body').append(this.template);
}
let route = this.router;
return this.http.post(ApiUrl + url, body, mergeAuthToken(options)).map(res=> {
$('body .httpOverlay').remove();
return res;
}).catch((error) => {
let body = error.json();
if (error.status == 401 || error.status == 402) {
window.localStorage.removeItem("hl-token");
route.navigate(["login"]);
}
$('body .httpOverlay').remove();
return Observable.throw(error);
});
}
put(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {
return this.http.put(ApiUrl + url, body, mergeAuthToken(options));
}
delete(url: string, options?: RequestOptionsArgs): Observable<Response> {
return this.http.delete(ApiUrl + url, mergeAuthToken(options));
}
patch(url: string, body: any, options?: RequestOptionsArgs): Observable<Response> {
return this.http.patch(ApiUrl + url, body, mergeAuthToken(options));
}
head(url: string, options?: RequestOptionsArgs): Observable<Response> {
return this.http.head(ApiUrl + url, mergeAuthToken(options));
}
}
|
ScorpionTeam/angular2-system
|
src/app/core/http.ts
|
TypeScript
|
mit
| 3,434 |
package net.glowstone.block.itemtype;
import net.glowstone.EventFactory;
import net.glowstone.block.GlowBlock;
import net.glowstone.block.GlowBlockState;
import net.glowstone.block.ItemTable;
import net.glowstone.block.blocktype.BlockLiquid;
import net.glowstone.block.blocktype.BlockType;
import net.glowstone.entity.GlowPlayer;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.event.player.PlayerBucketFillEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.BlockIterator;
import org.bukkit.util.Vector;
import java.util.Iterator;
public class ItemBucket extends ItemType {
public ItemBucket() {
setMaxStackSize(16);
}
@Override
public Context getContext() {
return Context.ANY;
}
@Override
public void rightClickAir(GlowPlayer player, ItemStack holding) {
clickBucket(player, holding);
}
@Override
public void rightClickBlock(
GlowPlayer player, GlowBlock target, BlockFace face, ItemStack holding,
Vector clickedLoc, EquipmentSlot hand) {
clickBucket(player, holding);
}
private void clickBucket(GlowPlayer player, ItemStack holding) {
Iterator<Block> itr = new BlockIterator(player, 5);
Block target = null;
// Used to determine the side the block was clicked on:
Block previousTarget = null;
BlockType targetBlockType = null;
boolean validTarget = false;
// Find the next available non-air liquid block type which is collectible in a radius of 5
// blocks
while (itr.hasNext()) {
previousTarget = target;
target = itr.next();
targetBlockType = ItemTable.instance().getBlock(target.getType());
if (targetBlockType instanceof BlockLiquid) {
if (((BlockLiquid) targetBlockType)
.isCollectible((GlowBlockState) target.getState())) {
validTarget = true;
break;
}
} else if (!target.isEmpty()) {
break;
}
}
if (target != null && validTarget) {
// Get the direction of the bucket fill
BlockFace face;
if (previousTarget != null) {
face = target.getFace(previousTarget);
} else {
face = BlockFace.SELF;
}
Material replaceWith = ((BlockLiquid) targetBlockType).getBucketType();
PlayerBucketFillEvent event = EventFactory.getInstance().callEvent(
new PlayerBucketFillEvent(player, target, face, holding.getType(), holding));
if (event.isCancelled()) {
return;
}
if (player.getGameMode() != GameMode.CREATIVE) {
if (holding.getAmount() == 1) {
holding.setType(replaceWith);
} else {
holding.setAmount(holding.getAmount() - 1);
player.getInventory().addItem(new ItemStack(replaceWith));
}
}
target.setType(Material.AIR);
}
}
}
|
GlowstonePlusPlus/GlowstonePlusPlus
|
src/main/java/net/glowstone/block/itemtype/ItemBucket.java
|
Java
|
mit
| 3,278 |
(function() {
var Twitter, exec, inspect, setting, twitter;
setting = require('../setting');
twitter = require('twitter');
inspect = require('util').inspect;
exec = require('child_process').exec;
module.exports = Twitter = (function() {
function Twitter(logger, emitter) {
this.logger = logger;
this.emitter = emitter;
this.client = new twitter({
consumer_key: setting.TWITTER.CONSUMER_KEY,
consumer_secret: setting.TWITTER.CONSUMER_SECRET,
access_token_key: setting.TWITTER.ACCESS_TOKEN,
access_token_secret: setting.TWITTER.ACCESS_SECRET
});
this.connect = (function(_this) {
return function() {
return _this.client.stream('user', {}, function(stream) {
stream.on('data', function(tweet) {
if (tweet.text != null) {
return _this.procTweet(tweet);
}
});
stream.on('error', function(err) {
if (err) {
throw err;
}
});
return stream.on('end', function() {
_this.logger.info("stream disconnected. try reconnect.");
return setTimeout(function() {
return _this.reconnect();
}, 3000);
});
});
};
})(this);
this.connect();
this.commands = [];
this.addCommand(/stop/i, function(screen_name, text, cb) {
setTimeout((function() {
return process.exit(1);
}), 1000);
return cb("終了します");
});
this.addCommand(/^restart$/i, function(screen_name, text, cb) {
var command;
command = 'restart';
return this.emitter(screen_name, command).then(cb);
});
this.addCommand(/lasterror/i, function(screen_name, text, cb) {
return exec('cat log/sysyem.log.1 log/system.log | grep ERROR | tail -1', function(error, stdout, stderr) {
return cb("\n" + stdout);
});
});
this.addCommand(/^cmd:/i, (function(_this) {
return function(screen_name, text, cb) {
var command;
command = text.replace(/^cmd:[\s ]*/i, '');
command = command.replace(/^report/i, 'report_no');
return _this.emitter(screen_name, command).then(cb);
};
})(this));
}
Twitter.prototype.reconnect = function() {
return this.connect();
};
Twitter.prototype.tweet = function(text) {
return new Promise((function(_this) {
return function(resolve, reject) {
var data;
data = {
status: text
};
return _this.client.post('statuses/update', data, function(err) {
if (err) {
return reject(err);
} else {
return resolve();
}
});
};
})(this));
};
Twitter.prototype.descape = function(text) {
text = text.replace(/&/g, "&");
text = text.replace(/</g, "<");
text = text.replace(/>/g, ">");
return text;
};
Twitter.prototype.addCommand = function(regex, cb) {
return this.commands.push({
regex: regex,
callback: cb
});
};
Twitter.prototype.procTweet = function(data) {
var command, i, isBot, isIgnore, isMention, isRetweet, len, mentions, name, ref, reply_status_id, screen_name, text, via;
if (data.user.id_str === setting.TWITTER.OWNER_ID) {
return;
}
text = this.descape(data.text);
mentions = data.entities.user_mentions;
name = data.user.name;
screen_name = data.user.screen_name;
reply_status_id = data.id_str;
via = data.source.replace(new RegExp(/<[^>]+>/g), '');
isMention = mentions.length === 0 ? false : mentions[0].id_str === setting.TWITTER.OWNER_ID;
isRetweet = data.retweeted_status;
isBot = [screen_name, name, via].some(function(v) {
return /bot/i.test(v);
});
if (/tweetbot/i.test(via)) {
isBot = false;
}
isIgnore = [/Tweet Button/i, /ツイ廃あらーと/i, /ツイート数カウントくん/i, /リプライ数チェッカ/i, /twittbot/i, /twirobo/i, /EasyBotter/i, /makebot/i, /botbird/i, /botmaker/i, /autotweety/i, /rekkacopy/i, /ask\.fm/i].some(function(v) {
return v.test(via);
});
if (isIgnore || isRetweet || isBot) {
return;
}
if (isMention) {
text = text.replace(/@[^\s ]+[\s ]+/g, '');
ref = this.commands;
for (i = 0, len = ref.length; i < len; i++) {
command = ref[i];
if (command.regex.test(text)) {
command.callback(screen_name, text, (function(_this) {
return function(res) {
data = {
status: "@" + screen_name + " " + res,
in_reply_to_status_id: reply_status_id
};
return _this.client.post('statuses/update', data, function(err) {
if (err) {
throw err;
}
});
};
})(this));
return;
}
}
this.emitter(screen_name, "list").then((function(_this) {
return function(res) {
data = {
status: "@" + screen_name + " " + res,
in_reply_to_status_id: reply_status_id
};
return _this.client.post('statuses/update', data, function(err) {
if (err) {
throw err;
}
});
};
})(this));
return;
}
if (/^抹茶$/.test(text)) {
data = {
status: "抹茶 " + (new Date().getTime())
};
return this.client.post('statuses/update', data, function(err) {
if (err) {
throw err;
}
});
}
};
return Twitter;
})();
}).call(this);
|
rhakt/mc
|
dest/twitter.js
|
JavaScript
|
mit
| 5,991 |
import Ember from 'ember';
import { validator, buildValidations } from 'ember-cp-validations';
import ValidationErrorDisplay from 'ilios/mixins/validation-error-display';
const { Component, RSVP, computed, inject } = Ember;
const { alias, reads } = computed;
const { Promise } = RSVP;
const { service } = inject;
const Validations = buildValidations({
description: [
validator('length', {
min: 0,
max: 21844,
allowBlank: true
}),
],
startDate: [
validator('date', {
dependentKeys: ['model.endDate'],
onOrBefore: reads('model.endDate'),
}),
],
endDate: [
validator('date', {
dependentKeys: ['model.startDate'],
onOrAfter: reads('model.startDate'),
}),
],
});
export default Component.extend(Validations, ValidationErrorDisplay, {
currentUser: service(),
routing: service('-routing'),
currentRoute: '',
year: null,
didReceiveAttrs(){
this._super(...arguments);
const report = this.get('report');
const description = report.get('description');
const currentYear = new Date().getFullYear();
const year = report.get('year');
const yearLabel = report.get('yearLabel');
const startDate = report.get('startDate');
const endDate = report.get('endDate');
let yearOptions = [];
yearOptions.pushObject(Ember.Object.create({'id': year, 'title': yearLabel}));
for (let i = currentYear - 5, n = currentYear + 5; i <= n; i++) {
if (i != year) {
yearOptions.pushObject(Ember.Object.create({'id': i, 'title': i + ' - ' + (i + 1)}));
}
}
yearOptions = yearOptions.uniq().sortBy('title');
this.setProperties({
description,
yearOptions,
startDate,
endDate,
year
});
},
yearLabel: computed('year', function() {
const year = this.get('year');
return year + ' - ' + (parseInt(year, 10) + 1);
}),
showRollover: computed('currentUser', 'routing.currentRouteName', function(){
return new Promise(resolve => {
const routing = this.get('routing');
if (routing.get('currentRouteName') === 'curriculumInventoryReport.rollover') {
resolve(false);
} else {
const currentUser = this.get('currentUser');
currentUser.get('userIsDeveloper').then(hasRole => {
resolve(hasRole);
});
}
});
}),
classNames: ['curriculum-inventory-report-overview'],
tagName: 'section',
description: null,
report: null,
startDate: null,
endDate: null,
yearOptions: null,
isFinalized: alias('report.isFinalized'),
actions: {
changeStartDate(){
const newDate = this.get('startDate');
const report = this.get('report');
this.send('addErrorDisplayFor', 'startDate');
return new Promise((resolve, reject) => {
this.validate().then(({validations}) => {
if (validations.get('isValid')) {
this.send('removeErrorDisplayFor', 'startDate');
report.set('startDate', newDate);
report.save().then((newCourse) => {
this.set('startDate', newCourse.get('startDate'));
this.set('report', newCourse);
resolve();
});
} else {
reject();
}
});
});
},
revertStartDateChanges(){
const report = this.get('report');
this.set('startDate', report.get('startDate'));
},
changeEndDate(){
const newDate = this.get('endDate');
const report = this.get('report');
this.send('addErrorDisplayFor', 'endDate');
return new Promise((resolve, reject) => {
this.validate().then(({validations}) => {
if (validations.get('isValid')) {
this.send('removeErrorDisplayFor', 'endDate');
report.set('endDate', newDate);
report.save().then((newCourse) => {
this.set('endDate', newCourse.get('endDate'));
this.set('report', newCourse);
resolve();
});
} else {
reject();
}
});
});
},
revertEndDateChanges(){
const report = this.get('report');
this.set('endDate', report.get('endDate'));
},
changeYear() {
let report = this.get('report');
let year = this.get('year');
report.set('year', year);
report.save();
},
revertYearChanges(){
this.set('year', this.get('report').get('year'));
},
changeDescription() {
const report = this.get('report');
const newDescription = this.get('description');
this.send('addErrorDisplayFor', 'description');
return new Promise((resolve, reject) => {
this.validate().then(({validations}) => {
if (validations.get('isValid')) {
this.send('removeErrorDisplayFor', 'description');
report.set('description', newDescription);
report.save().then((newReport) => {
this.set('description', newReport.get('description'));
this.set('report', newReport);
resolve();
});
} else {
reject();
}
});
});
},
revertDescriptionChanges(){
const report = this.get('report');
this.set('description', report.get('description'));
},
}
});
|
gabycampagna/frontend
|
app/components/curriculum-inventory-report-overview.js
|
JavaScript
|
mit
| 5,317 |
class CourseSummariesController < ApplicationController
include CourseSummariesHelper
before_filter :authorize_only_for_admin,
except: [:populate]
layout 'assignment_content'
def index
@assignments = Assignment.all
@marking_schemes = MarkingScheme.all
@marking_weights = MarkingWeight.all
@grade_entry_forms = GradeEntryForm.all
end
def populate
if current_user.admin?
render json: get_table_json_data
else
render json: get_student_row_information
end
end
def get_marking_scheme_details
redirect_to url_for(controller: 'marking_schemes', action: 'populate')
end
def download_csv_grades_report
csv_string = CSV.generate do |csv|
generate_csv_header(csv)
insert_student_marks(csv)
end
name_grades_report_file(csv_string)
end
def generate_csv_header(csv)
assignments = Assignment.order(:id)
grade_entry_forms = GradeEntryForm.order(:id)
marking_schemes = MarkingScheme.order(:id)
header = ['Username']
header.concat(assignments.map(&:short_identifier))
header.concat(grade_entry_forms.map(&:short_identifier))
header.concat(marking_schemes.map(&:name))
csv << header
end
def insert_student_marks(csv)
JSON.parse(get_table_json_data).each do |student|
row = []
row.push(student['user_name'])
row.concat(student['assignment_marks'].values)
row.concat(student['grade_entry_form_marks'].values)
row.concat(student['weighted_marks'].values)
csv << row
end
end
def name_grades_report_file(csv_string)
course_name = "#{COURSE_NAME}"
course_name_underscore = course_name.squish.downcase.tr(' ', '_')
send_data csv_string,
disposition: 'attachment',
filename: "#{course_name_underscore}_grades_report.csv"
end
end
|
arkon/Markus
|
app/controllers/course_summaries_controller.rb
|
Ruby
|
mit
| 1,847 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.