text
stringlengths
4
5.48M
meta
stringlengths
14
6.54k
package us.codecraft.xsoup.xevaluator; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.jsoup.select.Elements; import us.codecraft.xsoup.XElements; /** * @author [email protected] */ public class CombiningDefaultXElements implements XElements { private List<XElements> elementsList; public CombiningDefaultXElements(List<XElements> elementsList) { this.elementsList = elementsList; } public CombiningDefaultXElements(XElements... elementsList) { this.elementsList = Arrays.asList(elementsList); } @Override public String get() { for (XElements xElements : elementsList) { String result = xElements.get(); if (result != null) { return result; } } return null; } @Override public List<String> list() { List<String> results = new ArrayList<String>(); for (XElements xElements : elementsList) { results.addAll(xElements.list()); } return results; } public Elements getElements() { Elements elements = new Elements(); for (XElements xElements : elementsList) { elements.addAll(xElements.getElements()); } return elements; } }
{'content_hash': '36560e44bb6e3747d1243c1d87fcdfb6', 'timestamp': '', 'source': 'github', 'line_count': 51, 'max_line_length': 68, 'avg_line_length': 25.607843137254903, 'alnum_prop': 0.6309341500765697, 'repo_name': 'code4craft/xsoup', 'id': 'f666c53a73d65bd04b205309f00df788b77cd0e4', 'size': '1306', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/us/codecraft/xsoup/xevaluator/CombiningDefaultXElements.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '108672'}]}
package es.tid.cosmos.infinity import scala.concurrent.duration._ import org.apache.hadoop.conf.Configuration import org.apache.hadoop.fs.permission.FsPermission import org.scalatest.FlatSpec import org.scalatest.matchers.MustMatchers import es.tid.cosmos.infinity.common.credentials.{UserCredentials, ClusterCredentials} class InfinityConfigurationTest extends FlatSpec with MustMatchers { "An infinity configuration" must "provide a default authority" in { val config = configurationWithProperties( "fs.infinity.defaultAuthority" -> "orion-infinity.hi.inet:8080") config.defaultAuthority must be (Some("orion-infinity.hi.inet:8080")) } it must "provide no default authority when not configured" in { defaultConfiguration().defaultAuthority must be ('empty) } it must "use SSL by default" in { defaultConfiguration().useSsl must be (true) } it must "not use SSL when explicitly configured not to" in { configurationWithProperties("fs.infinity.ssl.enabled" -> false).useSsl must be (false) } it must "have a default timeout duration" in { defaultConfiguration().shortOperationTimeout must be (3.seconds) } it must "provide the configured timeout duration" in { val config = configurationWithProperties( "fs.infinity.timeout.shortOperation.millis" -> 1000, "fs.infinity.timeout.longOperation.millis" -> 3000 ) config.shortOperationTimeout must be (1.second) config.longOperationTimeout must be (3.seconds) } it must "reject non-positive timeout durations" in { for (invalidMillis <- Seq(-1, 0)) { evaluating { configurationWithProperties( "fs.infinity.timeout.shortOperation.millis" -> invalidMillis).shortOperationTimeout } must produce [IllegalArgumentException] } } it must "provide configured cluster credentials" in { val config = configurationWithProperties("fs.infinity.clusterSecret" -> "secret") config.credentials must be (Some(ClusterCredentials("secret"))) } it must "provide configured user credentials" in { val config = configurationWithProperties( "fs.infinity.apiKey" -> "key", "fs.infinity.apiSecret" -> "secret" ) config.credentials must be (Some(UserCredentials("key", "secret"))) } it must "provide no credentials when not configured" in { defaultConfiguration().credentials must be ('empty) } it must "provide the default umask 022 when not configured" in { defaultConfiguration().umask must be (new FsPermission("022")) } it must "provide the configured umask" in { val config = configurationWithProperties("fs.permissions.umask-mode" -> "077") config.umask must be (new FsPermission("077")) } def defaultConfiguration() = configurationWithProperties() def configurationWithProperties(properties: (String, Any)*): InfinityConfiguration = { val hadoopConf = new Configuration(false) for ((key, value) <- properties) { hadoopConf.set(key, value.toString) } new InfinityConfiguration(hadoopConf) } }
{'content_hash': '5faeec6da6258fb5e4704cb1cd7ca1ff', 'timestamp': '', 'source': 'github', 'line_count': 91, 'max_line_length': 93, 'avg_line_length': 33.61538461538461, 'alnum_prop': 0.7257273618829683, 'repo_name': 'telefonicaid/fiware-cosmos-platform', 'id': 'b2e6cdaf009816f690b30914a1fbad9aede72f14', 'size': '3697', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'infinity/driver/src/test/scala/es/tid/cosmos/infinity/InfinityConfigurationTest.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '80797'}, {'name': 'JavaScript', 'bytes': '171664'}, {'name': 'Perl', 'bytes': '42219'}, {'name': 'Puppet', 'bytes': '221549'}, {'name': 'Python', 'bytes': '143190'}, {'name': 'Ruby', 'bytes': '482448'}, {'name': 'Scala', 'bytes': '1611974'}, {'name': 'Shell', 'bytes': '40777'}]}
package com.wt.studio.plugin.pagedesigner.gef.model; import org.eclipse.draw2d.geometry.Dimension; import com.wt.studio.plugin.modeldesigner.editor.model.Element; public class ConnectionBendpoint extends Element { /** * */ private static final long serialVersionUID = 6608511826633749834L; private float weight = 0.5f; private Dimension d1, d2; public ConnectionBendpoint() {} public Dimension getFirstRelativeDimension() { return d1; } public Dimension getSecondRelativeDimension() { return d2; } public float getWeight() { return weight; } public void setRelativeDimensions(Dimension dim1, Dimension dim2) { d1 = dim1; d2 = dim2; } public void setWeight(float w) { weight = w; } }
{'content_hash': 'ca7695a40a836a63714b9bfa1d655a2e', 'timestamp': '', 'source': 'github', 'line_count': 39, 'max_line_length': 68, 'avg_line_length': 18.615384615384617, 'alnum_prop': 0.7369146005509641, 'repo_name': 'winture/wt-studio', 'id': 'fa3d4be75daefc848f617aedb83f849b2b2e6a2d', 'size': '726', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'com.wt.studio.plugin.modeldesigner/src/com/wt/studio/plugin/pagedesigner/gef/model/ConnectionBendpoint.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '351784'}, {'name': 'Java', 'bytes': '2526799'}, {'name': 'JavaScript', 'bytes': '924879'}, {'name': 'Shell', 'bytes': '28562'}, {'name': 'XSLT', 'bytes': '7140'}]}
function [dS,f]=mtdspectrumc(data,phi,params) % Multi-taper frequency derivative of the spectrum - continuous process % % Usage: % % [dS,f]=mtdspectrumc(data,phi,params) % Input: % Note that all times can be in arbitrary units. But the units have to be % consistent. So, if E is in secs, win, t have to be in secs, and Fs has to % be Hz. If E is in samples, so are win and t, and Fs=1. In case of spike % times, the units have to be consistent with the units of data as well. % data (in form samples x channels/trials or a single vector) -- required % phi (angle for evaluation of derivative) -- required. % e.g. phi=[0,pi/2] gives the time and frequency derivatives % params: structure with fields tapers, pad, Fs, fpass, trialave % - optional % tapers : precalculated tapers from dpss or in the one of the following % forms: % (1) A numeric vector [TW K] where TW is the % time-bandwidth product and K is the number of % tapers to be used (less than or equal to % 2TW-1). % (2) A numeric vector [W T p] where W is the % bandwidth, T is the duration of the data and p % is an integer such that 2TW-p tapers are used. In % this form there is no default i.e. to specify % the bandwidth, you have to specify T and p as % well. Note that the units of W and T have to be % consistent: if W is in Hz, T must be in seconds % and vice versa. Note that these units must also % be consistent with the units of params.Fs: W can % be in Hz if and only if params.Fs is in Hz. % The default is to use form 1 with TW=3 and K=5 % % pad (padding factor for the FFT) - optional (can take values -1,0,1,2...). % -1 corresponds to no padding, 0 corresponds to padding % to the next highest power of 2 etc. % e.g. For N = 500, if PAD = -1, we do not pad; if PAD = 0, we pad the FFT % to 512 points, if pad=1, we pad to 1024 points etc. % Defaults to 0. % Fs (sampling frequency) - optional. Default 1. % fpass (frequency band to be used in the calculation in the form % [fmin fmax])- optional. % Default all frequencies between 0 and Fs/2 % trialave (average over trials/channels when 1, don't average when 0) - optional. Default 0 % Output: % dS (spectral derivative in form phi x frequency x channels/trials if trialave=0 or % in form phi x frequency if trialave=1) % f (frequencies) if nargin < 2; error('Need data and angle'); end; if nargin < 3; params=[]; end; [tapers,pad,Fs,fpass,err,trialave,params]=getparams(params); clear err params data=change_row_to_column(data); N=size(data,1); nfft=max(2^(nextpow2(N)+pad),N); [f,findx]=getfgrid(Fs,nfft,fpass); tapers=dpsschk(tapers,N,Fs); % check tapers K=size(tapers,2); J=mtfftc(data,tapers,nfft,Fs); J=J(findx,:,:); A=sqrt(1:K-1); A=repmat(A,[size(J,1) 1]); A=repmat(A,[1 1 size(J,3)]); S=squeeze(mean(J(:,1:K-1,:).*A.*conj(J(:,2:K,:)),2)); if trialave; S=squeeze(mean(S,2));end; nphi=length(phi); for p=1:nphi; dS(p,:,:)=real(exp(i*phi(p))*S); end; dS=squeeze(dS); dS=change_row_to_column(dS);
{'content_hash': '692648866435e74f2d4dbe1747727c2a', 'timestamp': '', 'source': 'github', 'line_count': 73, 'max_line_length': 102, 'avg_line_length': 50.136986301369866, 'alnum_prop': 0.5614754098360656, 'repo_name': 'sophie63/FlyLFM', 'id': 'ad2ee6238250f1c5fed57fc843cce526ee1592ca', 'size': '3660', 'binary': False, 'copies': '13', 'ref': 'refs/heads/master', 'path': 'MatlabFiles/Utils/chronux_2_12/chronux_2_12/spectral_analysis/continuous/mtdspectrumc.m', 'mode': '33261', 'license': 'bsd-2-clause', 'language': [{'name': 'C', 'bytes': '1662434'}, {'name': 'C++', 'bytes': '29242'}, {'name': 'HTML', 'bytes': '25263'}, {'name': 'Jupyter Notebook', 'bytes': '2841158885'}, {'name': 'Limbo', 'bytes': '108'}, {'name': 'M', 'bytes': '22084'}, {'name': 'MATLAB', 'bytes': '403956'}, {'name': 'Python', 'bytes': '652037'}, {'name': 'Shell', 'bytes': '3933'}]}
#ifndef __LIBSK_NETWORK_CLIENT_H__ #define __LIBSK_NETWORK_CLIENT_H__ #include "channels.h" #include "network.h" /* Client API */ int netdev_can_recv(netdev_p nd); int netdev_can_send(netdev_p nd); int netdev_recv(netdev_p nd, netmsg_p msg); int netdev_send(netdev_p nd, netmsg_p msg); int netdev_try_recv(netdev_p nd, netmsg_p msg); int netdev_try_send(netdev_p nd, netmsg_p msg); netdev_p netdev_setup(read_channel_p recv_chan, write_channel_p send_chan); #endif
{'content_hash': 'b7ee17035a595a69173032b6f6ae41ae', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 75, 'avg_line_length': 27.58823529411765, 'alnum_prop': 0.720682302771855, 'repo_name': 'GaloisInc/sk-dev-platform', 'id': 'ff2d4c4ec614704b78ec448168359322dd2e0f66', 'size': '469', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'user/libsk/network_client.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '1087302'}, {'name': 'C++', 'bytes': '8883'}, {'name': 'Haskell', 'bytes': '855936'}, {'name': 'Objective-C', 'bytes': '161'}, {'name': 'Python', 'bytes': '2570'}, {'name': 'Shell', 'bytes': '12401'}]}
package imj2.pixel3d; import java.awt.image.BufferedImage; import java.io.Serializable; /** * @author codistmonk (creation 2014-04-29) */ public interface Renderer extends Serializable { public abstract Renderer setCanvas(BufferedImage canvas); public abstract void clear(); public abstract Renderer addPixel(double x, double y, double z, int argb); public abstract void render(); }
{'content_hash': '66519bc2e340a652a782485f01ebf7e4', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 75, 'avg_line_length': 22.0, 'alnum_prop': 0.722488038277512, 'repo_name': 'codistmonk/IMJ', 'id': '99e4f908fc239995089aec0aa131fa82b68a8b5f', 'size': '418', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/imj2/pixel3d/Renderer.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '2187455'}]}
package com.amazonaws.services.ec2.model; import java.io.Serializable; /** * <p> * Describes telemetry for a VPN tunnel. * </p> */ public class VgwTelemetry implements Serializable, Cloneable { /** * <p> * The Internet-routable IP address of the virtual private gateway's outside * interface. * </p> */ private String outsideIpAddress; /** * <p> * The status of the VPN tunnel. * </p> */ private String status; /** * <p> * The date and time of the last change in status. * </p> */ private java.util.Date lastStatusChange; /** * <p> * If an error occurs, a description of the error. * </p> */ private String statusMessage; /** * <p> * The number of accepted routes. * </p> */ private Integer acceptedRouteCount; /** * <p> * The Internet-routable IP address of the virtual private gateway's outside * interface. * </p> * * @param outsideIpAddress * The Internet-routable IP address of the virtual private gateway's * outside interface. */ public void setOutsideIpAddress(String outsideIpAddress) { this.outsideIpAddress = outsideIpAddress; } /** * <p> * The Internet-routable IP address of the virtual private gateway's outside * interface. * </p> * * @return The Internet-routable IP address of the virtual private gateway's * outside interface. */ public String getOutsideIpAddress() { return this.outsideIpAddress; } /** * <p> * The Internet-routable IP address of the virtual private gateway's outside * interface. * </p> * * @param outsideIpAddress * The Internet-routable IP address of the virtual private gateway's * outside interface. * @return Returns a reference to this object so that method calls can be * chained together. */ public VgwTelemetry withOutsideIpAddress(String outsideIpAddress) { setOutsideIpAddress(outsideIpAddress); return this; } /** * <p> * The status of the VPN tunnel. * </p> * * @param status * The status of the VPN tunnel. * @see TelemetryStatus */ public void setStatus(String status) { this.status = status; } /** * <p> * The status of the VPN tunnel. * </p> * * @return The status of the VPN tunnel. * @see TelemetryStatus */ public String getStatus() { return this.status; } /** * <p> * The status of the VPN tunnel. * </p> * * @param status * The status of the VPN tunnel. * @return Returns a reference to this object so that method calls can be * chained together. * @see TelemetryStatus */ public VgwTelemetry withStatus(String status) { setStatus(status); return this; } /** * <p> * The status of the VPN tunnel. * </p> * * @param status * The status of the VPN tunnel. * @return Returns a reference to this object so that method calls can be * chained together. * @see TelemetryStatus */ public void setStatus(TelemetryStatus status) { this.status = status.toString(); } /** * <p> * The status of the VPN tunnel. * </p> * * @param status * The status of the VPN tunnel. * @return Returns a reference to this object so that method calls can be * chained together. * @see TelemetryStatus */ public VgwTelemetry withStatus(TelemetryStatus status) { setStatus(status); return this; } /** * <p> * The date and time of the last change in status. * </p> * * @param lastStatusChange * The date and time of the last change in status. */ public void setLastStatusChange(java.util.Date lastStatusChange) { this.lastStatusChange = lastStatusChange; } /** * <p> * The date and time of the last change in status. * </p> * * @return The date and time of the last change in status. */ public java.util.Date getLastStatusChange() { return this.lastStatusChange; } /** * <p> * The date and time of the last change in status. * </p> * * @param lastStatusChange * The date and time of the last change in status. * @return Returns a reference to this object so that method calls can be * chained together. */ public VgwTelemetry withLastStatusChange(java.util.Date lastStatusChange) { setLastStatusChange(lastStatusChange); return this; } /** * <p> * If an error occurs, a description of the error. * </p> * * @param statusMessage * If an error occurs, a description of the error. */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } /** * <p> * If an error occurs, a description of the error. * </p> * * @return If an error occurs, a description of the error. */ public String getStatusMessage() { return this.statusMessage; } /** * <p> * If an error occurs, a description of the error. * </p> * * @param statusMessage * If an error occurs, a description of the error. * @return Returns a reference to this object so that method calls can be * chained together. */ public VgwTelemetry withStatusMessage(String statusMessage) { setStatusMessage(statusMessage); return this; } /** * <p> * The number of accepted routes. * </p> * * @param acceptedRouteCount * The number of accepted routes. */ public void setAcceptedRouteCount(Integer acceptedRouteCount) { this.acceptedRouteCount = acceptedRouteCount; } /** * <p> * The number of accepted routes. * </p> * * @return The number of accepted routes. */ public Integer getAcceptedRouteCount() { return this.acceptedRouteCount; } /** * <p> * The number of accepted routes. * </p> * * @param acceptedRouteCount * The number of accepted routes. * @return Returns a reference to this object so that method calls can be * chained together. */ public VgwTelemetry withAcceptedRouteCount(Integer acceptedRouteCount) { setAcceptedRouteCount(acceptedRouteCount); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getOutsideIpAddress() != null) sb.append("OutsideIpAddress: " + getOutsideIpAddress() + ","); if (getStatus() != null) sb.append("Status: " + getStatus() + ","); if (getLastStatusChange() != null) sb.append("LastStatusChange: " + getLastStatusChange() + ","); if (getStatusMessage() != null) sb.append("StatusMessage: " + getStatusMessage() + ","); if (getAcceptedRouteCount() != null) sb.append("AcceptedRouteCount: " + getAcceptedRouteCount()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof VgwTelemetry == false) return false; VgwTelemetry other = (VgwTelemetry) obj; if (other.getOutsideIpAddress() == null ^ this.getOutsideIpAddress() == null) return false; if (other.getOutsideIpAddress() != null && other.getOutsideIpAddress().equals( this.getOutsideIpAddress()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getLastStatusChange() == null ^ this.getLastStatusChange() == null) return false; if (other.getLastStatusChange() != null && other.getLastStatusChange().equals( this.getLastStatusChange()) == false) return false; if (other.getStatusMessage() == null ^ this.getStatusMessage() == null) return false; if (other.getStatusMessage() != null && other.getStatusMessage().equals(this.getStatusMessage()) == false) return false; if (other.getAcceptedRouteCount() == null ^ this.getAcceptedRouteCount() == null) return false; if (other.getAcceptedRouteCount() != null && other.getAcceptedRouteCount().equals( this.getAcceptedRouteCount()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOutsideIpAddress() == null) ? 0 : getOutsideIpAddress() .hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getLastStatusChange() == null) ? 0 : getLastStatusChange() .hashCode()); hashCode = prime * hashCode + ((getStatusMessage() == null) ? 0 : getStatusMessage() .hashCode()); hashCode = prime * hashCode + ((getAcceptedRouteCount() == null) ? 0 : getAcceptedRouteCount().hashCode()); return hashCode; } @Override public VgwTelemetry clone() { try { return (VgwTelemetry) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }
{'content_hash': 'de1a95a4e635223cc2bf3f79df4f3add', 'timestamp': '', 'source': 'github', 'line_count': 399, 'max_line_length': 85, 'avg_line_length': 27.127819548872182, 'alnum_prop': 0.5513673318551368, 'repo_name': 'dump247/aws-sdk-java', 'id': '2c73d03c00da43c1c6271e6c5dc86bde7bf1f90e', 'size': '11411', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/VgwTelemetry.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'FreeMarker', 'bytes': '117958'}, {'name': 'Java', 'bytes': '104374753'}, {'name': 'Scilab', 'bytes': '3375'}]}
using System.Collections; using UnityEngine; using Tienkio.Pools; namespace Tienkio.Tanks { [System.Serializable] public class GunStatsMultipliers { public float bulletSpeed = 1, bulletPenetration = 1, bulletDamage = 1, reload = 1; } public class Gun : MonoBehaviour { public float bulletOffset; public float bulletSize = 1; [Space] public float moveBackwardsOnShot; public int moveBackwardsSteps; bool isMovingBackwards; [Space] public GunStatsMultipliers statsMultipliers; public float bulletFlyTime, shootDelay, recoil, bulletKnockback, bulletSpread; public TankController tank; public Rigidbody tankRigidbody; bool isFiring; float nextFire; new Transform transform; void Awake() { transform = base.transform; } public void StopFiring() { isFiring = false; } void FixedUpdate() { if (isFiring) Fire(); } public void Fire() { float now = Time.time; if (isFiring) { if (now >= nextFire) { nextFire = now + (statsMultipliers.reload * tank.stats.reload.Value); SpawnBullet(); if (!isMovingBackwards) StartCoroutine(MoveBackwards()); tankRigidbody.AddForce(transform.rotation * Vector3.down * recoil, ForceMode.Impulse); } } else { if (now >= nextFire) nextFire = now + shootDelay * (statsMultipliers.reload * tank.stats.reload.Value); isFiring = true; } } void SpawnBullet() { Vector3 newBulletPosition = transform.position + transform.rotation * new Vector3(0, bulletOffset, 0); PoolObject newBullet = BulletPool.instance.GetFromPool(newBulletPosition, Quaternion.identity); Vector3 scale = transform.lossyScale; newBullet.transform.localScale = new Vector3(scale.x * bulletSize, scale.x * bulletSize, scale.z * bulletSize); var newBulletRenderer = newBullet.GetComponent<MeshRenderer>(); newBulletRenderer.material = tank.bodyMaterial; var newBulletController = newBullet.GetComponent<Bullet>(); var newBulletRigidbody = newBullet.GetComponent<Rigidbody>(); float halfBulletSpread = bulletSpread / 2; var newBulletRotation = transform.rotation * Quaternion.Euler( Random.Range(-halfBulletSpread, halfBulletSpread), 0, Random.Range(-halfBulletSpread, halfBulletSpread) ); float bulletSpeed = tank.stats.bulletSpeed.Value * statsMultipliers.bulletSpeed; var bulletVelocity = newBulletRotation * Vector3.up * bulletSpeed; newBulletController.normalVelocity = bulletVelocity; newBulletRigidbody.velocity = bulletVelocity + tankRigidbody.velocity; newBulletController.tank = tank; newBulletController.damage = statsMultipliers.bulletDamage * tank.stats.bulletDamage.Value; newBulletController.health = statsMultipliers.bulletPenetration * tank.stats.bulletPenetration.Value; newBulletController.knockback = bulletKnockback; newBulletController.flyTime = bulletFlyTime; } IEnumerator MoveBackwards() { isMovingBackwards = true; float step = 1f / moveBackwardsSteps; var startPosition = transform.localPosition; var endPosition = transform.localPosition - transform.localRotation * new Vector3(0, moveBackwardsOnShot, 0); for (float t = 0; t < 1; t += step) { transform.localPosition = Vector3.Lerp(startPosition, endPosition, t); yield return null; } for (float t = 0; t < 1; t += step) { transform.localPosition = Vector3.Lerp(endPosition, startPosition, t); yield return null; } transform.localPosition = startPosition; isMovingBackwards = false; } } }
{'content_hash': '876eba586899179b2155f9a2d7e30b6b', 'timestamp': '', 'source': 'github', 'line_count': 120, 'max_line_length': 123, 'avg_line_length': 35.3, 'alnum_prop': 0.6088290840415487, 'repo_name': 'fedofcoders/tienk.io', 'id': 'dd59751d63655e695048e1a34070bf335d7c203a', 'size': '4848', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Assets/Scripts/Tanks/Gun.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '86666'}]}
package org.zalando.riptide; import com.google.common.collect.ImmutableList; import lombok.AllArgsConstructor; import lombok.With; import org.organicdesign.fp.collections.ImList; import org.organicdesign.fp.collections.PersistentVector; import org.springframework.http.client.AsyncClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.web.client.RestTemplate; import org.zalando.riptide.Http.ConfigurationStage; import org.zalando.riptide.Http.ExecutorStage; import org.zalando.riptide.Http.FinalStage; import org.zalando.riptide.Http.RequestFactoryStage; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.net.URI; import java.util.ArrayList; import java.util.List; import java.util.ServiceLoader; import java.util.concurrent.Executor; import java.util.function.Supplier; import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.Preconditions.checkArgument; import static lombok.AccessLevel.PRIVATE; import static org.zalando.riptide.Plugin.composite; @With(PRIVATE) @AllArgsConstructor(access = PRIVATE) final class DefaultHttpBuilder implements ExecutorStage, RequestFactoryStage, ConfigurationStage, FinalStage { private static class Converters { private static final ImmutableList<HttpMessageConverter<?>> DEFAULT = ImmutableList.copyOf(new RestTemplate().getMessageConverters()); private Converters() { } } private static class Plugins { private static final ImmutableList<Plugin> DEFAULT = ImmutableList.copyOf(ServiceLoader.load(Plugin.class)); private Plugins() { } } private static final UrlResolution DEFAULT_RESOLUTION = UrlResolution.RFC; private final Executor executor; private final IO io; private final ImList<HttpMessageConverter<?>> converters; private final Supplier<URI> baseUrl; private final UrlResolution resolution; private final ImList<Plugin> plugins; DefaultHttpBuilder() { this(null, null, PersistentVector.empty(), () -> null, DEFAULT_RESOLUTION, PersistentVector.empty()); } @Override public RequestFactoryStage executor(final Executor executor) { return new DefaultHttpBuilder(executor, io, converters, baseUrl, resolution, plugins); } @Override public ConfigurationStage requestFactory(final ClientHttpRequestFactory factory) { return withIo(new BlockingIO(factory)); } @Override @SuppressWarnings("deprecation") public ConfigurationStage asyncRequestFactory(final AsyncClientHttpRequestFactory factory) { return withIo(new NonBlockingIO(factory)); } @Override public ConfigurationStage defaultConverters() { return converters(Converters.DEFAULT); } @Override public ConfigurationStage converters(@Nonnull final Iterable<HttpMessageConverter<?>> converters) { return withConverters(this.converters.concat(converters)); } @Override public ConfigurationStage converter(final HttpMessageConverter<?> converter) { return withConverters(converters.append(converter)); } @Override public ConfigurationStage baseUrl(@Nullable final String baseUrl) { return baseUrl(baseUrl == null ? null : URI.create(baseUrl)); } @Override public ConfigurationStage baseUrl(@Nullable final URI baseUrl) { checkAbsoluteBaseUrl(baseUrl); return withBaseUrl(() -> baseUrl); } @Override public ConfigurationStage baseUrl(final Supplier<URI> baseUrl) { return withBaseUrl(() -> checkAbsoluteBaseUrl(baseUrl.get())); } private URI checkAbsoluteBaseUrl(@Nullable final URI baseUrl) { checkArgument(baseUrl == null || baseUrl.isAbsolute(), "Base URL is not absolute"); return baseUrl; } @Override public ConfigurationStage urlResolution(@Nullable final UrlResolution resolution) { return withResolution(firstNonNull(resolution, DEFAULT_RESOLUTION)); } @Override public ConfigurationStage defaultPlugins() { return plugins(Plugins.DEFAULT); } @Override public ConfigurationStage plugins(final Iterable<Plugin> plugins) { return withPlugins(this.plugins.concat(plugins)); } @Override public ConfigurationStage plugin(final Plugin plugin) { return withPlugins(plugins.append(plugin)); } @Override public Http build() { final List<HttpMessageConverter<?>> converters = converters(); final List<Plugin> plugins = new ArrayList<>(); if (executor != null) { plugins.add(new AsyncPlugin(executor)); } plugins.add(new DispatchPlugin(new DefaultMessageReader(converters))); plugins.add(new SerializationPlugin(new DefaultMessageWriter(converters))); plugins.addAll(plugins()); return new DefaultHttp(io, baseUrl, resolution, composite(plugins)); } private List<HttpMessageConverter<?>> converters() { return converters.isEmpty() ? Converters.DEFAULT : converters; } private List<Plugin> plugins() { return plugins.isEmpty() ? Plugins.DEFAULT : plugins; } }
{'content_hash': '3f52ffb26db9c616289153c5c1170681', 'timestamp': '', 'source': 'github', 'line_count': 162, 'max_line_length': 110, 'avg_line_length': 32.95061728395062, 'alnum_prop': 0.7270513300861746, 'repo_name': 'zalando/riptide', 'id': '106baab647ce279e10e45cb294f7d87b5717aa17', 'size': '5338', 'binary': False, 'copies': '2', 'ref': 'refs/heads/main', 'path': 'riptide-core/src/main/java/org/zalando/riptide/DefaultHttpBuilder.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '993134'}, {'name': 'Shell', 'bytes': '1050'}]}
package org.apache.myfaces.trinidaddemo.composite; import java.io.IOException; import java.util.Calendar; import java.util.Date; import java.util.List; import javax.faces.application.FacesMessage; import javax.faces.component.NamingContainer; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.convert.NumberConverter; import javax.faces.event.ValueChangeEvent; import javax.faces.validator.LongRangeValidator; import org.apache.myfaces.trinidad.component.UIXEditableValue; import org.apache.myfaces.trinidad.component.core.output.CoreOutputText; import org.apache.myfaces.trinidad.component.core.input.CoreInputText; /** * An experiment in building a composite component. Some basic * principles: * <ul> * <li> We're a NamingContainer, so our children won't show up in * findComponent() calls. * <li> The child components get re-created on each pass through * the system; this means seeing if they exist in both Apply Request * Values (<code>processDecodes</code>) and Render Response * (<code>encodeBegin()</code>), and marking the components * transient so they don't get saved. * <li> The model is the tricky part: instead of using real * <code>ValueBindings</code> on the children, I let them * use local values, and then manully transfer over their local values * into an overall "local value" during validate(). Unfortunately, * using ValueBindings to automate the transfer wouldn't quite work, * since the transfer wouldn't happen 'til Update Model, which is * too late to preserve the semantics of an editable value component in JSF. * <li>Apply Request Values and Update Model don't need to do anything special * for the children; they just run as needed. * </ul> */ public class DateField extends UIXEditableValue implements NamingContainer { public DateField() { super(null); } @Override public void processDecodes(FacesContext context) { _addChildren(context); super.processDecodes(context); } @Override public void validate(FacesContext context) { if (!_month.isValid() || !_year.isValid() || !_day.isValid()) { setValid(false); return; } int year = ((Number) _year.getValue()).intValue(); // We'll be 1970 - 2069. Good enough for a demo. if (year < 70) year += 100; int month = ((Number) _month.getValue()).intValue() - 1; int day = ((Number) _day.getValue()).intValue(); Date oldValue = (Date) getValue(); Calendar calendar = Calendar.getInstance(); calendar.setLenient(true); calendar.setTime(oldValue); calendar.set(Calendar.YEAR, year); calendar.set(Calendar.MONTH, month); calendar.set(Calendar.DAY_OF_MONTH, day); //=-=AEW RUN VALIDATORS! // Invalid day given the month if (day != calendar.get(Calendar.DAY_OF_MONTH)) { int numberOfDaysInMonth = day - calendar.get(Calendar.DAY_OF_MONTH); FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Invalid date.", "This month only has " + numberOfDaysInMonth + " days!"); setValid(false); context.addMessage(getClientId(context), message); } // Looks good else { setValid(true); // And if the value actually changed, store it and send a value change // event. Date newValue = calendar.getTime(); if (!calendar.getTime().equals(oldValue)) { setValue(newValue); queueEvent(new ValueChangeEvent(this, oldValue, newValue)); } } } @Override public void encodeBegin(FacesContext context) throws IOException { _addChildren(context); super.encodeBegin(context); } @SuppressWarnings("unchecked") @Override public void encodeChildren(FacesContext context) throws IOException { for(UIComponent child : (List<UIComponent>)getChildren()) { assert(child.getChildCount() == 0); assert(child.getFacets().isEmpty()); child.encodeBegin(context); child.encodeChildren(context); child.encodeEnd(context); } } @Override public boolean getRendersChildren() { return true; } @SuppressWarnings("unchecked") private void _addChildren(FacesContext context) { if (_month != null) return; List<UIComponent> children = getChildren(); children.clear(); Date value = (Date) getValue(); Calendar calendar = null; if(value != null) { calendar = Calendar.getInstance(); calendar.setLenient(true); calendar.setTime(value); } // A proper implementation would add children in the correct // order for the current locale _month = _createTwoDigitInput(context); _month.setId("month"); _month.setShortDesc("Month"); LongRangeValidator monthRange = _createLongRangeValidator(context); monthRange.setMinimum(1); monthRange.setMaximum(12); _month.addValidator(monthRange); if (value != null) _month.setValue(new Integer(calendar.get(Calendar.MONTH) + 1)); _day = _createTwoDigitInput(context); _day.setId("day"); _day.setShortDesc("Day"); LongRangeValidator dayRange = _createLongRangeValidator(context); dayRange.setMinimum(1); dayRange.setMaximum(31); _day.addValidator(dayRange); if (value != null) _day.setValue(new Integer(calendar.get(Calendar.DAY_OF_MONTH))); _year = _createTwoDigitInput(context); _year.setId("year"); _year.setShortDesc("Year"); if (value != null) { int yearValue = calendar.get(Calendar.YEAR) - 1900; if (yearValue >= 100) yearValue -= 100; _year.setValue(new Integer(yearValue)); } children.add(_month); children.add(_createSeparator(context)); children.add(_day); children.add(_createSeparator(context)); children.add(_year); } private LongRangeValidator _createLongRangeValidator(FacesContext context) { return (LongRangeValidator) context.getApplication().createValidator(LongRangeValidator.VALIDATOR_ID); } private CoreInputText _createTwoDigitInput(FacesContext context) { CoreInputText input = new CoreInputText(); input.setColumns(2); input.setMaximumLength(2); input.setTransient(true); input.setRequired(true); input.setSimple(true); NumberConverter converter = (NumberConverter) context.getApplication().createConverter(NumberConverter.CONVERTER_ID); converter.setIntegerOnly(true); converter.setMaxIntegerDigits(2); converter.setMinIntegerDigits(2); input.setConverter(converter); return input; } // A proper implementation would create a separator appropriate // to the current locale private CoreOutputText _createSeparator(FacesContext context) { CoreOutputText output = new CoreOutputText(); output.setValue("/"); output.setTransient(true); return output; } private transient CoreInputText _month; private transient CoreInputText _year; private transient CoreInputText _day; }
{'content_hash': '23e210d6eeed5d4ec39ef77f6c9fda66', 'timestamp': '', 'source': 'github', 'line_count': 236, 'max_line_length': 80, 'avg_line_length': 30.02542372881356, 'alnum_prop': 0.6891052780129834, 'repo_name': 'adamrduffy/trinidad-1.0.x', 'id': '2f12450bd80bd99fbea8e3fdc75c6a02d2b6212d', 'size': '7907', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/composite/DateField.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '97216'}, {'name': 'HTML', 'bytes': '92'}, {'name': 'Java', 'bytes': '9255440'}, {'name': 'JavaScript', 'bytes': '671775'}]}
/** * Copyright 2013 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package rx.util.async.operators; import static org.junit.Assert.*; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.FutureTask; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.atomic.AtomicInteger; import org.junit.Test; import rx.Observable; import rx.functions.Action1; import rx.schedulers.Schedulers; import rx.util.async.Async; public class OperationForEachFutureTest { @Test public void testSimple() { final ExecutorService exec = Executors.newCachedThreadPool(); try { Observable<Integer> source = Observable.from(1, 2, 3) .subscribeOn(Schedulers.threadPoolForComputation()); final AtomicInteger sum = new AtomicInteger(); Action1<Integer> add = new Action1<Integer>() { @Override public void call(Integer t1) { sum.addAndGet(t1); } }; FutureTask<Void> task = Async.forEachFuture(source, add); exec.execute(task); try { Void value = task.get(1000, TimeUnit.MILLISECONDS); assertEquals(null, value); assertEquals(6, sum.get()); } catch (TimeoutException ex) { fail("Timed out: " + ex); } catch (ExecutionException ex) { fail("Exception: " + ex); } catch (InterruptedException ex) { fail("Exception: " + ex); } } finally { exec.shutdown(); } } private static final class CustomException extends RuntimeException { } @Test public void testSimpleThrowing() { final ExecutorService exec = Executors.newCachedThreadPool(); try { Observable<Integer> source = Observable.<Integer>error(new CustomException()) .subscribeOn(Schedulers.threadPoolForComputation()); final AtomicInteger sum = new AtomicInteger(); Action1<Integer> add = new Action1<Integer>() { @Override public void call(Integer t1) { sum.addAndGet(t1); } }; FutureTask<Void> task = Async.forEachFuture(source, add); exec.execute(task); try { task.get(1000, TimeUnit.MILLISECONDS); } catch (TimeoutException ex) { fail("Timed out: " + ex); } catch (ExecutionException ex) { if (!(ex.getCause() instanceof CustomException)) { fail("Got different exception: " + ex.getCause()); } } catch (InterruptedException ex) { fail("Exception: " + ex); } assertEquals(0, sum.get()); } finally { exec.shutdown(); } } @Test public void testSimpleScheduled() { Observable<Integer> source = Observable.from(1, 2, 3) .subscribeOn(Schedulers.threadPoolForComputation()); final AtomicInteger sum = new AtomicInteger(); Action1<Integer> add = new Action1<Integer>() { @Override public void call(Integer t1) { sum.addAndGet(t1); } }; FutureTask<Void> task = Async.forEachFuture(source, add, Schedulers.newThread()); try { Void value = task.get(1000, TimeUnit.MILLISECONDS); assertEquals(null, value); assertEquals(6, sum.get()); } catch (TimeoutException ex) { fail("Timed out: " + ex); } catch (ExecutionException ex) { fail("Exception: " + ex); } catch (InterruptedException ex) { fail("Exception: " + ex); } } @Test public void testSimpleScheduledThrowing() { Observable<Integer> source = Observable.<Integer>error(new CustomException()) .subscribeOn(Schedulers.threadPoolForComputation()); final AtomicInteger sum = new AtomicInteger(); Action1<Integer> add = new Action1<Integer>() { @Override public void call(Integer t1) { sum.addAndGet(t1); } }; FutureTask<Void> task = Async.forEachFuture(source, add, Schedulers.newThread()); try { task.get(1000, TimeUnit.MILLISECONDS); } catch (TimeoutException ex) { fail("Timed out: " + ex); } catch (ExecutionException ex) { if (!(ex.getCause() instanceof CustomException)) { fail("Got different exception: " + ex.getCause()); } } catch (InterruptedException ex) { fail("Exception: " + ex); } assertEquals(0, sum.get()); } }
{'content_hash': 'fe8512e6ef2665aeeec6e208c9c51957', 'timestamp': '', 'source': 'github', 'line_count': 173, 'max_line_length': 89, 'avg_line_length': 33.664739884393065, 'alnum_prop': 0.5496222527472527, 'repo_name': 'devisnik/RxJava', 'id': '8fd6e4c91ec8eb0d20cecedf6e53c9ee37560636', 'size': '6421', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'rxjava-contrib/rxjava-async-util/src/test/java/rx/util/async/operators/OperationForEachFutureTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '2171'}, {'name': 'Clojure', 'bytes': '118625'}, {'name': 'Groovy', 'bytes': '62285'}, {'name': 'Java', 'bytes': '2864731'}, {'name': 'Kotlin', 'bytes': '25477'}, {'name': 'Ruby', 'bytes': '12912'}, {'name': 'Scala', 'bytes': '242959'}, {'name': 'Shell', 'bytes': '7394'}]}
import os import json import mock import random import logging from subprocess import PIPE from tornado.testing import * from tornado.web import Application from arteria.web.app import AppService from delivery.app import routes as app_routes, compose_application from delivery.services.metadata_service import MetadataService from delivery.models.execution import Execution from tests.test_utils import samplesheet_file_from_runfolder log = logging.getLogger(__name__) class BaseIntegration(AsyncHTTPTestCase): def __init__(self, *args): super().__init__(*args) self.mock_delivery = True # Default duration of mock delivery self.mock_duration = 0.1 def _create_projects_dir_with_random_data(self, base_dir, proj_name='ABC_123'): tmp_proj_dir = os.path.join(base_dir, 'Projects', proj_name) os.makedirs(tmp_proj_dir) with open(os.path.join(tmp_proj_dir, 'test_file'), 'wb') as f: f.write(os.urandom(1024)) @staticmethod def _create_checksums_file(base_dir, checksums=None): checksum_file = os.path.join(base_dir, "MD5", "checksums.md5") os.mkdir(os.path.dirname(checksum_file)) MetadataService.write_checksum_file(checksum_file, checksums or {}) return checksum_file @staticmethod def _create_runfolder_structure_on_disk(runfolder): def _toggle(): state = True while True: yield state state = not state def _touch_file(file_path): os.makedirs(os.path.dirname(file_path), exist_ok=True) with open(file_path, 'wb') as f: f.write(os.urandom(1024)) os.makedirs(runfolder.path, exist_ok=True) for project in runfolder.projects: os.makedirs(project.path) for sample in project.samples: for sample_file in sample.sample_files: _touch_file(sample_file.file_path) for report_file in project.project_files: _touch_file(report_file.file_path) checksum_file = os.path.join(runfolder.path, "MD5", "checksums.md5") os.mkdir(os.path.dirname(checksum_file)) MetadataService.write_checksum_file(checksum_file, runfolder.checksums) samplesheet_file_from_runfolder(runfolder) API_BASE = "/api/1.0" def get_app(self): # Get an as similar app as possible, tough note that we don't use the # app service start method to start up the the application path_to_this_file = os.path.abspath( os.path.dirname(os.path.realpath(__file__))) app_svc = AppService.create( product_name="test_delivery_service", config_root="{}/../../config/".format(path_to_this_file), args=[]) config = app_svc.config_svc composed_application = compose_application(config) routes = app_routes(**composed_application) if self.mock_delivery: def mock_delivery(cmd): project_id = f"snpseq{random.randint(0, 10**10):010d}" log.debug(f"Mock is called with {cmd}") shell = False if cmd[0].endswith('dds'): new_cmd = ['sleep', str(self.mock_duration)] if 'project' in cmd: dds_output = f"""Current user: bio Project created with id: {project_id} User forskare was associated with Project {project_id} as Owner=True. An e-mail notification has not been sent. Invitation sent to [email protected]. The user should have a valid account to be added to a project""" new_cmd += ['&&', 'echo', f'"{dds_output}"'] new_cmd = " ".join(new_cmd) shell = True elif cmd[-2:] == ['ls', '--json']: new_cmd = ['sleep', str(0.01)] dds_output = json.dumps([{ "Access": True, "Last updated": "Fri, 01 Jul 2022 14:31:13 CEST", "PI": "[email protected]", "Project ID": "snpseq00025", "Size": 25856185058, "Status": "In Progress", "Title": "AB1234" }]) new_cmd += ['&&', 'echo', f"'{dds_output}'"] new_cmd = " ".join(new_cmd) shell = True elif 'put' in cmd: source_file = cmd[cmd.index("--source") + 1] auth_token = cmd[cmd.index("--token-path") + 1] new_cmd += ['&&', 'test', '-e', source_file] new_cmd += ['&&', 'test', '-e', auth_token] new_cmd = " ".join(new_cmd) shell = True else: new_cmd = cmd log.debug(f"Running mocked {new_cmd}") p = Subprocess(new_cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE, shell=shell) return Execution(pid=p.pid, process_obj=p) self.patcher = mock.patch( 'delivery.services.external_program_service' '.ExternalProgramService.run', wraps=mock_delivery) return Application(routes) def setUp(self): super().setUp() try: self.patcher.start() except AttributeError: pass def tearDown(self): try: self.patcher.stop() except AttributeError: pass super().tearDown()
{'content_hash': 'fd5cc934c73cc0154ad2df0fb913d69e', 'timestamp': '', 'source': 'github', 'line_count': 158, 'max_line_length': 119, 'avg_line_length': 37.72784810126582, 'alnum_prop': 0.5155175306156685, 'repo_name': 'arteria-project/arteria-delivery', 'id': 'afdccdc1a23ca140f166555acb7597f8bfcfd877', 'size': '5961', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/integration_tests/base.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Dockerfile', 'bytes': '202'}, {'name': 'Mako', 'bytes': '493'}, {'name': 'Python', 'bytes': '270451'}]}
import React, { PropTypes } from 'react'; import cn from 'classnames'; const Paragraph = ({ text, fontSize = '1em', color = 'rgba(220, 220, 220, 1.0)', backgroundColor = 'rgba(20, 20, 20, 1.0)', wrapperBackgroundColor = null, lineHeight = '170%', height = '', textAlign = 'center', verticalAlign = 'top', extraTextStyle = {}, extraWrapperStyle = {}, extraTextClass = [], extraWrapperClass = [], }) => { const wrapperStyle = { height, backgroundColor: (wrapperBackgroundColor === null) ? backgroundColor : wrapperBackgroundColor, ...extraWrapperStyle, }; const textStyle = { fontSize, color, backgroundColor, lineHeight, textAlign, verticalAlign, whiteSpace: 'pre-wrap', writingMode: 'vertical-rl', ...extraTextStyle, }; const wrapperFlexClass = cn( 'row', 'center-xs', 'center-sm', 'center-md', 'center-lg', 'middle-xs', 'middle-sm', 'middle-md', 'middle-lg', ...extraWrapperClass, ) const flexClasses = cn( 'col-xs-11', 'col-sm-8', 'col-md-6', 'col-lg-4', ...extraTextClass, ); return ( <div className={wrapperFlexClass} style={wrapperStyle}> <div className={flexClasses} style={textStyle}> {text} </div> </div> ); }; Paragraph.propTypes = { text: PropTypes.string.isRequired, fontSize: PropTypes.string, color: PropTypes.string, backgroundColor: PropTypes.string, lineHeight: PropTypes.string, height: PropTypes.string, textAlign: PropTypes.string, extraStyle: PropTypes.object, }; export default Paragraph;
{'content_hash': 'dab487780619eb335964b417e6447de9', 'timestamp': '', 'source': 'github', 'line_count': 74, 'max_line_length': 98, 'avg_line_length': 21.77027027027027, 'alnum_prop': 0.6256983240223464, 'repo_name': 'stegben/novel-example', 'id': '65311066620438af9ec772edd3fef7f377cbcc00', 'size': '1611', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/components/VerticalParagraph.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '241'}, {'name': 'HTML', 'bytes': '1245'}, {'name': 'JavaScript', 'bytes': '27988'}]}
namespace bookmarks { TestBookmarkClient::TestBookmarkClient() {} TestBookmarkClient::~TestBookmarkClient() {} // static std::unique_ptr<BookmarkModel> TestBookmarkClient::CreateModel() { return CreateModelWithClient(base::WrapUnique(new TestBookmarkClient)); } // static std::unique_ptr<BookmarkModel> TestBookmarkClient::CreateModelWithClient( std::unique_ptr<BookmarkClient> client) { std::unique_ptr<BookmarkModel> bookmark_model( new BookmarkModel(std::move(client))); std::unique_ptr<BookmarkLoadDetails> details = bookmark_model->CreateLoadDetails(); details->LoadExtraNodes(); bookmark_model->DoneLoading(std::move(details)); return bookmark_model; } void TestBookmarkClient::SetExtraNodesToLoad( BookmarkPermanentNodeList extra_nodes) { extra_nodes_ = std::move(extra_nodes); // Keep a copy of the nodes in |unowned_extra_nodes_| for the accessor // functions. for (const auto& node : extra_nodes_) unowned_extra_nodes_.push_back(node.get()); } bool TestBookmarkClient::IsExtraNodeRoot(const BookmarkNode* node) { return std::find(unowned_extra_nodes_.begin(), unowned_extra_nodes_.end(), node) != unowned_extra_nodes_.end(); } bool TestBookmarkClient::IsAnExtraNode(const BookmarkNode* node) { if (!node) return false; for (const auto* extra_node : unowned_extra_nodes_) { if (node->HasAncestor(extra_node)) return true; } return false; } bool TestBookmarkClient::IsPermanentNodeVisible( const BookmarkPermanentNode* node) { DCHECK(node->type() == BookmarkNode::BOOKMARK_BAR || node->type() == BookmarkNode::OTHER_NODE || node->type() == BookmarkNode::MOBILE || IsExtraNodeRoot(node)); return node->type() != BookmarkNode::MOBILE && !IsExtraNodeRoot(node); } void TestBookmarkClient::RecordAction(const base::UserMetricsAction& action) { } LoadExtraCallback TestBookmarkClient::GetLoadExtraNodesCallback() { return base::Bind(&TestBookmarkClient::LoadExtraNodes, base::Passed(&extra_nodes_)); } bool TestBookmarkClient::CanSetPermanentNodeTitle( const BookmarkNode* permanent_node) { return IsExtraNodeRoot(permanent_node); } bool TestBookmarkClient::CanSyncNode(const BookmarkNode* node) { return !IsAnExtraNode(node); } bool TestBookmarkClient::CanBeEditedByUser(const BookmarkNode* node) { return !IsAnExtraNode(node); } // static BookmarkPermanentNodeList TestBookmarkClient::LoadExtraNodes( BookmarkPermanentNodeList extra_nodes, int64_t* next_id) { return extra_nodes; } } // namespace bookmarks
{'content_hash': 'e1474fd0a8efce26e4c88d1ee1d2b57f', 'timestamp': '', 'source': 'github', 'line_count': 85, 'max_line_length': 78, 'avg_line_length': 30.49411764705882, 'alnum_prop': 0.7276234567901234, 'repo_name': 'Samsung/ChromiumGStreamerBackend', 'id': 'e6c485db3df85918a3ee006c926304df5da6c9dc', 'size': '3147', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'components/bookmarks/test/test_bookmark_client.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
title: activity-01 articlename: >- Individual Versus Team-Based Financial Incentives to Increase Physical Activity: A Randomized, Controlled Trial date: '2016-07-15' summary: >- Financial incentives rewarded for a combination of individual and team performance were most effective for increasing physical activity. authors: >- Mitesh S. Patel, David A. Asch, Roy Rosin, Dylan S. Small, Scarlett L. Bellamy, Kimberly Eberbach, Karen J. Walters, Nancy Haff, Samantha M. Lee, Lisa Wesby, Karen Hoffer, David Shuttleworth, Devon H. Taylor, Victoria Hilbert, Jingsan Zhu, Lin Yang, Xingmei Wang, Kevin G. Volpp source: 'https://link.springer.com/article/10.1007/s11606-016-3627-0' journal: JGIM ---
{'content_hash': '4c2ec20bf694c988e6a4d2ee60f6347b', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 280, 'avg_line_length': 63.54545454545455, 'alnum_prop': 0.7725321888412017, 'repo_name': 'mohan2020/w2hsite', 'id': 'ea1a16c475fa4fa6ac60dd9922e62a417506e15f', 'size': '703', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'site/content/publications/activity-01.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '523582'}, {'name': 'HTML', 'bytes': '113101'}, {'name': 'JavaScript', 'bytes': '107035'}]}
select (${single-query})
{'content_hash': '56f711c432018d940878681ff48d67b6', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 24, 'avg_line_length': 24.0, 'alnum_prop': 0.7083333333333334, 'repo_name': 'SpartaTech/sparta-spring-web-utils', 'id': '5e581b14c2c18f78f978f90463ad63de684f5244', 'size': '24', 'binary': False, 'copies': '1', 'ref': 'refs/heads/Java1.8', 'path': 'src/test/resources/file-query-loader/composed-query.sql', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '166644'}, {'name': 'Shell', 'bytes': '38'}]}
// Provides control sap.ui.ux3.ExactBrowser. sap.ui.define(['jquery.sap.global', 'sap/ui/commons/Button', 'sap/ui/commons/Menu', 'sap/ui/core/Control', './ExactAttribute', './ExactList', './library'], function(jQuery, Button, Menu, Control, ExactAttribute, ExactList, library) { "use strict"; /** * Constructor for a new ExactBrowser. * * @param {string} [sId] id for the new control, generated automatically if no id is given * @param {object} [mSettings] initial settings for the new control * * @class * Attribute browse area used within the Exact pattern. The main benefit of this control is the high flexibility when large data amounts shall be displayed * in the form of structured data sets with a high or low interdependency level. From lists - which can be nested according to the defined attributes - the user can choose * entries and thereby trigger the display of further information, depending on the chosen entry/entries (multiple selection supported). * @extends sap.ui.core.Control * * @author SAP SE * @version 1.44.46 * * @constructor * @public * @deprecated Since version 1.38. * @alias sap.ui.ux3.ExactBrowser * @ui5-metamodel This control/element also will be described in the UI5 (legacy) designtime metamodel */ var ExactBrowser = Control.extend("sap.ui.ux3.ExactBrowser", /** @lends sap.ui.ux3.ExactBrowser.prototype */ { metadata : { library : "sap.ui.ux3", properties : { /** * Title text in the list area of the Exact Browser. The title is not shown when the property showTopList is set to false. */ title : {type : "string", group : "Misc", defaultValue : null}, /** * Title text in the header of the Exact Browser. */ headerTitle : {type : "string", group : "Misc", defaultValue : null}, /** * The order how the sublists of the top level list should be displayed. * @since 1.7.1 */ topListOrder : {type : "sap.ui.ux3.ExactOrder", defaultValue : sap.ui.ux3.ExactOrder.Select}, /** * Enables the close icons of the displayed lists. */ enableListClose : {type : "boolean", group : "Misc", defaultValue : false}, /** * The height of the list area in px. */ listHeight : {type : "int", group : "Appearance", defaultValue : 290}, /** * Whether the header area of the ExactBrowser should be shown. */ showHeader : {type : "boolean", group : "Misc", defaultValue : false}, /** * Whether the top list of the ExactBrowser should be shown. When the property is set to false the * application must ensure to select top level attributes appropriately. * @since 1.7.0 */ showTopList : {type : "boolean", group : "Misc", defaultValue : true}, /** * Whether the reset functionality should be available in the header area. */ enableReset : {type : "boolean", group : "Misc", defaultValue : true}, /** * Whether the save button should be available in the header area. * @since 1.9.2 */ enableSave : {type : "boolean", group : "Misc", defaultValue : false}, /** * Specifies the width of the top list in pixels. The value must be between 70 and 500. * @since 1.7.0 */ topListWidth : {type : "int", group : "Misc", defaultValue : 168} }, defaultAggregation : "attributes", aggregations : { /** * The attributes which shall be available. */ attributes : {type : "sap.ui.ux3.ExactAttribute", multiple : true, singularName : "attribute"}, /** * Menu with options. The menu can not used when the property showTopList is set to false. */ optionsMenu : {type : "sap.ui.commons.Menu", multiple : false}, /** * Controls managed by this ExactBrowser */ controls : {type : "sap.ui.core.Control", multiple : true, singularName : "control", visibility : "hidden"}, /** * root attribute managed by this ExactBrowser */ rootAttribute : {type : "sap.ui.core.Element", multiple : false, visibility : "hidden"} }, associations : { /** * The successor control of the Exact Browser. The id of this control is used in the ARIA description of the control. */ followUpControl : {type : "sap.ui.core.Control", multiple : false} }, events : { /** * Event is fired when an attribute is selected or unselected. */ attributeSelected : { parameters : { /** * The attribute which was selected or unselected recently */ attribute : {type : "sap.ui.ux3.ExactAttribute"}, /** * Array of all selected ExactAttributes */ allAttributes : {type : "object"} } }, /** * Event is fired when an attribute is selected or unselected. */ save : {} } }}); (function() { /** * Does the setup when the ExactBrowser is created. * @private */ ExactBrowser.prototype.init = function(){ var that = this; this.data("sap-ui-fastnavgroup", "true", true); // Define group for F6 handling this._rb = sap.ui.getCore().getLibraryResourceBundle("sap.ui.ux3"); //Create a root node for the attributes tree this._attributeRoot = new ExactAttribute(); this.setAggregation("rootAttribute",this._attributeRoot); //Init the used subcontrols this._rootList = new ExactList(this.getId() + "-rootlist"); this._rootList.setData(this._attributeRoot); this.addAggregation("controls", this._rootList); this._resetButton = new Button(this.getId() + "-RstBtn", {text: this._rb.getText("EXACT_BRWSR_RESET"), lite: true}); this._resetButton.addStyleClass("sapUiUx3ExactBrwsrReset"); this.addAggregation("controls", this._resetButton); this._resetButton.attachPress(function(){ that.reset(); }); this._saveButton = new Button(this.getId() + "-SvBtn", {text: this._rb.getText("EXACT_BRWSR_SAVE"), lite: true}); this._saveButton.addStyleClass("sapUiUx3ExactBrwsrSave"); this.addAggregation("controls", this._saveButton); this._saveButton.attachPress(function(){ that.fireSave(); }); this._rootList.attachAttributeSelected(function(oEvent){ that.fireAttributeSelected({attribute: oEvent.getParameter("attribute"), allAttributes: oEvent.getParameter("allAttributes")}); }); this._rootList.attachEvent("_headerPress", function(oEvent){ var oMenu = that.getOptionsMenu(); if (oMenu) { var oDomRef = oEvent.getParameter("domRef"); oMenu.open(oEvent.getParameter("keyboard"), oDomRef, sap.ui.core.Popup.Dock.BeginTop, sap.ui.core.Popup.Dock.BeginBottom, oDomRef); } }); }; /** * Does all the cleanup when the ExactBrowser is to be destroyed. * Called from Element's destroy() method. * @private */ ExactBrowser.prototype.exit = function(){ this._rootList.destroy(); this._attributeRoot.destroy(); this._rootList = null; this._attributeRoot = null; this._resetButton = null; this._saveButton = null; this._saveDialog = null; this._saveTextField = null; this._rb = null; }; /** * Called when the theme is changed. * @private */ ExactBrowser.prototype.onThemeChanged = function(oEvent) { if (this.getDomRef()) { this.invalidate(); } }; //*** Overridden API functions *** ExactBrowser.prototype.getTitle = function() { return this._rootList.getTopTitle(); }; ExactBrowser.prototype.setTitle = function(sTitle) { this._rootList.setTopTitle(sTitle); return this; }; ExactBrowser.prototype.setTopListOrder = function(sListOrder) { this.setProperty("topListOrder", sListOrder, true); this._attributeRoot.setListOrder(sListOrder); return this; }; ExactBrowser.prototype.getTopListWidth = function() { return this._attributeRoot.getWidth(); }; ExactBrowser.prototype.setTopListWidth = function(iWidth) { this._attributeRoot.setWidth(iWidth); return this; }; ExactBrowser.prototype.getHeaderTitle = function() { var sTitle = this.getProperty("headerTitle"); return sTitle ? sTitle : this._rb.getText("EXACT_BRWSR_TITLE"); }; ExactBrowser.prototype.getEnableListClose = function() { return this._rootList.getShowClose(); }; ExactBrowser.prototype.setEnableListClose = function(bEnableListClose) { this._rootList.setShowClose(bEnableListClose); return this; }; ExactBrowser.prototype.getListHeight = function() { return this._rootList.getTopHeight(); }; ExactBrowser.prototype.setListHeight = function(iListHeight) { this._rootList.setTopHeight(iListHeight); return this; }; ExactBrowser.prototype.getAttributes = function() { return this._attributeRoot.getAttributesInternal(); }; ExactBrowser.prototype.insertAttribute = function(oAttribute, iIndex) { this._attributeRoot.insertAttribute(oAttribute, iIndex); return this; }; ExactBrowser.prototype.addAttribute = function(oAttribute) { this._attributeRoot.addAttribute(oAttribute); return this; }; ExactBrowser.prototype.removeAttribute = function(vElement) { return this._attributeRoot.removeAttribute(vElement); }; ExactBrowser.prototype.removeAllAttributes = function() { return this._attributeRoot.removeAllAttributes(); }; ExactBrowser.prototype.indexOfAttribute = function(oAttribute) { return this._attributeRoot.indexOfAttribute(oAttribute); }; ExactBrowser.prototype.destroyAttributes = function() { this._attributeRoot.destroyAttributes(); return this; }; /** * Deselects all currently selected attributes and closes all attribute lists. * * @type void * @public * @ui5-metamodel This method also will be described in the UI5 (legacy) designtime metamodel */ ExactBrowser.prototype.reset = function() { this._rootList._closeAll(); }; //*** Private helper functions *** ExactBrowser.prototype.hasOptionsMenu = function() { return !!this.getOptionsMenu(); }; /* //Closes the save dialog and triggers the save event function doSave(oExactBrowser, bSkip) { oExactBrowser._saveDialog.close(); if(!bSkip){ alert("Save: "+oExactBrowser._saveTextField.getValue()); } } //Opens the save dialog function openSaveDialog(oExactBrowser) { if(!oExactBrowser._saveDialog){ jQuery.sap.require("sap.ui.ux3.ToolPopup"); jQuery.sap.require("sap.ui.commons.TextField"); jQuery.sap.require("sap.ui.commons.Label"); oExactBrowser._saveTextField = new sap.ui.commons.TextField(oExactBrowser.getId()+"-SvDlgTf"); var label = new sap.ui.commons.Label({text: oExactBrowser._rb.getText("EXACT_BRWSR_DLG_LABEL")}).setLabelFor(oExactBrowser._saveTextField); oExactBrowser._saveDialog = new sap.ui.ux3.ToolPopup(oExactBrowser.getId()+"-SvDlg", { content:[label, oExactBrowser._saveTextField], buttons: [ new sap.ui.commons.Button(oExactBrowser.getId()+"-SvDlgSvBtn", { text: oExactBrowser._rb.getText("EXACT_BRWSR_DLG_SAVE"), press: function(){ doSave(oExactBrowser); } }), new sap.ui.commons.Button(oExactBrowser.getId()+"-SvDlgCnclBtn", { text: oExactBrowser._rb.getText("EXACT_BRWSR_DLG_CANCEL"), press: function(){ doSave(oExactBrowser, true); } }) ] }); oExactBrowser._saveDialog.addStyleClass("sapUiUx3ExactBrwsrSaveDlg"); oExactBrowser.addAggregation("controls", oExactBrowser._saveDialog); } oExactBrowser._saveDialog.setPosition(sap.ui.core.Popup.Dock.EndTop, sap.ui.core.Popup.Dock.EndBottom, oExactBrowser._saveButton.getDomRef(), "0 13", "none"); oExactBrowser._saveDialog.open(); } */ }()); return ExactBrowser; }, /* bExport= */ true);
{'content_hash': '6abca79d424e6d20c3bb9f0475329848', 'timestamp': '', 'source': 'github', 'line_count': 391, 'max_line_length': 172, 'avg_line_length': 29.690537084398976, 'alnum_prop': 0.6771470410888104, 'repo_name': 'openui5/packaged-sap.ui.ux3', 'id': 'a24a944628836b8f8f9451593492f8e03bf25e02', 'size': '11794', 'binary': False, 'copies': '1', 'ref': 'refs/heads/rel-1.44', 'path': 'resources/sap/ui/ux3/ExactBrowser.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '561621'}, {'name': 'HTML', 'bytes': '651581'}, {'name': 'JavaScript', 'bytes': '721623'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Form Example</title> </head> <body> <form action="" method="post"> <div><label for="firstname">First name: <input type="text" name="firstname" id="firstname"></label> </div> <div><label for="lastname">Last name: <input type="text" name="lastname" id="lastname"></label> </div> <div><input type="submit" value="GO"></div> </form> </body> </html>
{'content_hash': '4602a9267a6211c39aa75a82853ff2f1', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 67, 'avg_line_length': 26.944444444444443, 'alnum_prop': 0.5628865979381443, 'repo_name': 'dricardo1/Php-MySql-CMS', 'id': 'eae379aac73a90ac3e9fe94041034bad7562656e', 'size': '485', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'chapter3/welcome/form.html.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'JavaScript', 'bytes': '812'}, {'name': 'PHP', 'bytes': '135208'}, {'name': 'Shell', 'bytes': '35'}]}
/* * This file is available under and governed by the GNU General Public * License version 2 only, as published by the Free Software Foundation. * However, the following notice accompanied the original version of this * file: * * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at * http://creativecommons.org/publicdomain/zero/1.0/ */ /* * @test * @bug 4486658 5031862 * @compile -source 1.5 TimeoutLockLoops.java * @run main TimeoutLockLoops * @summary Checks for responsiveness of locks to timeouts. * Runs under the assumption that ITERS computations require more than * TIMEOUT msecs to complete, which seems to be a safe assumption for * another decade. */ import java.util.concurrent.*; import java.util.concurrent.locks.*; import java.util.*; public final class TimeoutLockLoops { static final ExecutorService pool = Executors.newCachedThreadPool(); static final LoopHelpers.SimpleRandom rng = new LoopHelpers.SimpleRandom(); static boolean print = false; static final int ITERS = Integer.MAX_VALUE; static final long TIMEOUT = 100; public static void main(String[] args) throws Exception { int maxThreads = 100; if (args.length > 0) maxThreads = Integer.parseInt(args[0]); print = true; for (int i = 1; i <= maxThreads; i += (i+1) >>> 1) { System.out.print("Threads: " + i); new ReentrantLockLoop(i).test(); Thread.sleep(10); } pool.shutdown(); if (! pool.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS)) throw new Error(); } static final class ReentrantLockLoop implements Runnable { private int v = rng.next(); private volatile boolean completed; private volatile int result = 17; private final ReentrantLock lock = new ReentrantLock(); private final LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer(); private final CyclicBarrier barrier; private final int nthreads; ReentrantLockLoop(int nthreads) { this.nthreads = nthreads; barrier = new CyclicBarrier(nthreads+1, timer); } final void test() throws Exception { for (int i = 0; i < nthreads; ++i) { lock.lock(); pool.execute(this); lock.unlock(); } barrier.await(); Thread.sleep(TIMEOUT); while (!lock.tryLock()); // Jam lock // lock.lock(); barrier.await(); if (print) { long time = timer.getTime(); double secs = (double)(time) / 1000000000.0; System.out.println("\t " + secs + "s run time"); } if (completed) throw new Error("Some thread completed instead of timing out"); int r = result; if (r == 0) // avoid overoptimization System.out.println("useless result: " + r); } public final void run() { try { barrier.await(); int sum = v; int x = 17; int n = ITERS; final ReentrantLock lock = this.lock; for (;;) { if (x != 0) { if (n-- <= 0) break; } if (!lock.tryLock(TIMEOUT, TimeUnit.MILLISECONDS)) break; try { v = x = LoopHelpers.compute1(v); } finally { lock.unlock(); } sum += LoopHelpers.compute2(x); } if (n <= 0) completed = true; barrier.await(); result += sum; } catch (Exception ex) { ex.printStackTrace(); return; } } } }
{'content_hash': '99e921e4aa731bedac66841b17296aef', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 86, 'avg_line_length': 32.84920634920635, 'alnum_prop': 0.5262140613674801, 'repo_name': 'rokn/Count_Words_2015', 'id': '303e11038a8b1bb5423a52cf96c96c53a06e47e0', 'size': '5115', 'binary': False, 'copies': '55', 'ref': 'refs/heads/master', 'path': 'testing/openjdk2/jdk/test/java/util/concurrent/locks/ReentrantLock/TimeoutLockLoops.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '61802'}, {'name': 'Ruby', 'bytes': '18888605'}]}
require "rspec" require "spork" require "mongoid" require "mongoid-graph" require "support/node" Spork.prefork do Mongoid.configure do |config| name = "mongoid-graph" config.master = Mongo::Connection.new.db(name) end RSpec.configure do |config| config.mock_with :rspec config.after :each do Mongoid.purge! end end end Spork.each_run do Mongoid.purge! end
{'content_hash': 'c767af3ba112beb7c29643fbadf33688', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 50, 'avg_line_length': 15.84, 'alnum_prop': 0.696969696969697, 'repo_name': 'bapplz/mongoid-graph', 'id': 'db59aaa41830754bd0093d9aa5bc016091686866', 'size': '396', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'spec/spec_helper.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '4928'}]}
id: apis/NetInfo title: NetInfo wip: true --- ```reason type options; [@bs.obj] external options: ( ~hour: int=?, ~minute: int=?, ~is24Hour: bool=?, ~mode: [@bs.string] [ | `clock | `spinner | `default ]=? unit ) => options = ""; type response = { . "action": string, "hour": int, "minute": int }; [@bs.module "react-native"] [@bs.scope "TimePickerAndroid"] external open_: options => Js.Promise.t(response) = "open"; [@bs.module "react-native"] [@bs.scope "TimePickerAndroid"] external timeSetAction: string = ""; [@bs.module "react-native"] [@bs.scope "TimePickerAndroid"] external dismissedAction: string = ""; ```
{'content_hash': '2298acb4cb9fe4d875542ad154267a18', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 60, 'avg_line_length': 17.42105263157895, 'alnum_prop': 0.6117824773413897, 'repo_name': 'reasonml-community/bs-react-native', 'id': '3b60ed27d7910e5723c3b52b495df77af2c22086', 'size': '666', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'reason-react-native/src/apis/TimePickerAndroid.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '12891'}, {'name': 'JavaScript', 'bytes': '253550'}, {'name': 'OCaml', 'bytes': '1229763'}, {'name': 'Shell', 'bytes': '2227'}]}
import { Url } from './url_parser'; /** * Parses a URL string using a given matcher DSL, and generates URLs from param maps */ export declare class PathRecognizer { path: string; private _segments; specificity: string; terminal: boolean; hash: string; constructor(path: string); recognize(beginningSegment: Url): { [key: string]: any; }; generate(params: { [key: string]: any; }): { [key: string]: any; }; }
{'content_hash': '3b71c7a1d502924ac469cb487bf189c5', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 84, 'avg_line_length': 24.9, 'alnum_prop': 0.5742971887550201, 'repo_name': 'thatknitter/GlobalGameJam2016', 'id': '185047146ffa7dc843213f047f1af9704ccfc57f', 'size': '498', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'node_modules/angular2/src/router/path_recognizer.d.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1024'}, {'name': 'HTML', 'bytes': '1502'}, {'name': 'JavaScript', 'bytes': '523'}, {'name': 'TypeScript', 'bytes': '562'}]}
package org.apache.gobblin.compaction.verify; import com.google.common.base.Splitter; import java.util.List; import java.util.regex.Pattern; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.gobblin.compaction.dataset.TimeBasedSubDirDatasetsFinder; import org.apache.gobblin.compaction.event.CompactionSlaEventHelper; import org.apache.gobblin.compaction.mapreduce.MRCompactor; import org.apache.gobblin.compaction.parser.CompactionPathParser; import org.apache.gobblin.compaction.source.CompactionSource; import org.apache.gobblin.configuration.State; import org.apache.gobblin.dataset.FileSystemDataset; import org.apache.hadoop.fs.Path; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.joda.time.Period; import org.joda.time.format.PeriodFormatter; import org.joda.time.format.PeriodFormatterBuilder; /** * A simple class which verify current dataset belongs to a specific time range. Will skip doing * compaction if dataset is not in a correct time range. */ @Slf4j @AllArgsConstructor public class CompactionTimeRangeVerifier implements CompactionVerifier<FileSystemDataset> { public final static String COMPACTION_VERIFIER_TIME_RANGE = COMPACTION_VERIFIER_PREFIX + "time-range"; protected State state; public Result verify(FileSystemDataset dataset) { final DateTime earliest; final DateTime latest; try { CompactionPathParser.CompactionParserResult result = new CompactionPathParser(state).parse(dataset); DateTime folderTime = result.getTime(); DateTimeZone timeZone = DateTimeZone.forID( this.state.getProp(MRCompactor.COMPACTION_TIMEZONE, MRCompactor.DEFAULT_COMPACTION_TIMEZONE)); DateTime compactionStartTime = new DateTime(this.state.getPropAsLong(CompactionSource.COMPACTION_INIT_TIME), timeZone); PeriodFormatter formatter = new PeriodFormatterBuilder().appendMonths() .appendSuffix("m") .appendDays() .appendSuffix("d") .appendHours() .appendSuffix("h") .toFormatter(); // Dataset name is like 'Identity/MemberAccount' or 'PageViewEvent' String datasetName = result.getDatasetName(); // get earliest time String maxTimeAgoStrList = this.state.getProp(TimeBasedSubDirDatasetsFinder.COMPACTION_TIMEBASED_MAX_TIME_AGO, TimeBasedSubDirDatasetsFinder.DEFAULT_COMPACTION_TIMEBASED_MAX_TIME_AGO); String maxTimeAgoStr = getMatchedLookbackTime(datasetName, maxTimeAgoStrList, TimeBasedSubDirDatasetsFinder.DEFAULT_COMPACTION_TIMEBASED_MAX_TIME_AGO); Period maxTimeAgo = formatter.parsePeriod(maxTimeAgoStr); earliest = compactionStartTime.minus(maxTimeAgo); // get latest time String minTimeAgoStrList = this.state.getProp(TimeBasedSubDirDatasetsFinder.COMPACTION_TIMEBASED_MIN_TIME_AGO, TimeBasedSubDirDatasetsFinder.DEFAULT_COMPACTION_TIMEBASED_MIN_TIME_AGO); String minTimeAgoStr = getMatchedLookbackTime(datasetName, minTimeAgoStrList, TimeBasedSubDirDatasetsFinder.DEFAULT_COMPACTION_TIMEBASED_MIN_TIME_AGO); Period minTimeAgo = formatter.parsePeriod(minTimeAgoStr); latest = compactionStartTime.minus(minTimeAgo); // get latest last run start time, we want to limit the duration between two compaction for the same dataset if (state.contains(TimeBasedSubDirDatasetsFinder.MIN_RECOMPACTION_DURATION)) { String minDurationStrList = this.state.getProp(TimeBasedSubDirDatasetsFinder.MIN_RECOMPACTION_DURATION); String minDurationStr = getMatchedLookbackTime(datasetName, minDurationStrList, TimeBasedSubDirDatasetsFinder.DEFAULT_MIN_RECOMPACTION_DURATION); Period minDurationTime = formatter.parsePeriod(minDurationStr); DateTime latestEligibleCompactTime = compactionStartTime.minus(minDurationTime); InputRecordCountHelper helper = new InputRecordCountHelper(state); State compactState = helper.loadState(new Path(result.getDstAbsoluteDir())); if (compactState.contains(CompactionSlaEventHelper.LAST_RUN_START_TIME) && compactState.getPropAsLong(CompactionSlaEventHelper.LAST_RUN_START_TIME) > latestEligibleCompactTime.getMillis()) { log.warn("Last compaction for {} is {}, which is not before latestEligibleCompactTime={}", dataset.datasetRoot(), new DateTime(compactState.getPropAsLong(CompactionSlaEventHelper.LAST_RUN_START_TIME), timeZone), latestEligibleCompactTime); return new Result(false, "Last compaction for " + dataset.datasetRoot() + " is not before" + latestEligibleCompactTime); } } if (earliest.isBefore(folderTime) && latest.isAfter(folderTime)) { log.debug("{} falls in the user defined time range", dataset.datasetRoot()); return new Result(true, ""); } } catch (Exception e) { log.error("{} cannot be verified because of {}", dataset.datasetRoot(), ExceptionUtils.getFullStackTrace(e)); return new Result(false, e.toString()); } return new Result(false, dataset.datasetRoot() + " is not in between " + earliest + " and " + latest); } public String getName() { return COMPACTION_VERIFIER_TIME_RANGE; } public boolean isRetriable() { return false; } /** * Find the correct lookback time for a given dataset. * * @param datasetsAndLookBacks Lookback string for multiple datasets. Datasets is represented by Regex pattern. * Multiple 'datasets and lookback' pairs were joined by semi-colon. A default * lookback time can be given without any Regex prefix. If nothing found, we will use * {@param sysDefaultLookback}. * * Example Format: [Regex1]:[T1];[Regex2]:[T2];[DEFAULT_T];[Regex3]:[T3] * Ex. Identity.*:1d2h;22h;BizProfile.BizCompany:3h (22h is default lookback time) * * @param sysDefaultLookback If user doesn't specify any lookback time for {@param datasetName}, also there is no default * lookback time inside {@param datasetsAndLookBacks}, this system default lookback time is return. * * @param datasetName A description of dataset without time partition information. Example 'Identity/MemberAccount' or 'PageViewEvent' * @return The lookback time matched with given dataset. */ public static String getMatchedLookbackTime(String datasetName, String datasetsAndLookBacks, String sysDefaultLookback) { String defaultLookback = sysDefaultLookback; for (String entry : Splitter.on(";").trimResults().omitEmptyStrings().splitToList(datasetsAndLookBacks)) { List<String> datasetAndLookbackTime = Splitter.on(":").trimResults().omitEmptyStrings().splitToList(entry); if (datasetAndLookbackTime.size() == 1) { defaultLookback = datasetAndLookbackTime.get(0); } else if (datasetAndLookbackTime.size() == 2) { String regex = datasetAndLookbackTime.get(0); if (Pattern.compile(regex).matcher(datasetName).find()) { return datasetAndLookbackTime.get(1); } } else { log.error("Invalid format in {}, {} cannot find its lookback time", datasetsAndLookBacks, datasetName); } } return defaultLookback; } }
{'content_hash': '41677374277543612a5d56ff03c09b3d', 'timestamp': '', 'source': 'github', 'line_count': 151, 'max_line_length': 136, 'avg_line_length': 49.65562913907285, 'alnum_prop': 0.7196585756201653, 'repo_name': 'arjun4084346/gobblin', 'id': '634eadf7fac064792f47d154c415b795af740773', 'size': '8298', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'gobblin-compaction/src/main/java/org/apache/gobblin/compaction/verify/CompactionTimeRangeVerifier.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '14641'}, {'name': 'Dockerfile', 'bytes': '1594'}, {'name': 'Groovy', 'bytes': '2273'}, {'name': 'HTML', 'bytes': '13792'}, {'name': 'Java', 'bytes': '17129071'}, {'name': 'JavaScript', 'bytes': '42618'}, {'name': 'Python', 'bytes': '51284'}, {'name': 'Roff', 'bytes': '202'}, {'name': 'Shell', 'bytes': '110403'}, {'name': 'XSLT', 'bytes': '7116'}]}
//----------------------------------------------------------------------------- // Copyright (c) 2013 GarageGames, LLC // // 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. //----------------------------------------------------------------------------- ConsoleMethodGroupBeginWithDocs(GuiCheckBoxCtrl, GuiControl) /*! Sets the state to on if true or off if false. @param isStateOn True if the control is on, false if off. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, setStateOn, ConsoleVoid, 3, 3, (isStateOn)) { object->setStateOn(dAtob(argv[2])); } /*! Gets the current state of the control. @return Returns True if on and false if off. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, getStateOn, ConsoleBool, 2, 2, ()) { return object->getStateOn(); } /*! Sets the amount the button is offset from the top left corner of the control. @param offset The amount to offset the button. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, setBoxOffset, ConsoleVoid, 3, 3, (offset)) { Point2I kPoint(dAtoi(argv[2]), dAtoi(argv[3])); object->setBoxOffset(kPoint); } /*! Sets the size of the button within the control proper. @param extent The size to render the button. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, setBoxExtent, ConsoleVoid, 3, 3, (extent)) { Point2I kPoint(dAtoi(argv[2]), dAtoi(argv[3])); object->setBoxExtent(kPoint); } /*! Sets the amount the text is offset from the top left corner of the control. @param offset The amount to offset the text. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, setTextOffset, ConsoleVoid, 3, 3, (offset)) { Point2I kPoint(dAtoi(argv[2]), dAtoi(argv[3])); object->setTextOffset(kPoint); } /*! Sets the size of the area the text will be rendered in within the control proper. @param extent The area available to render the text in. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, setTextExtent, ConsoleVoid, 3, 3, (extent)) { Point2I kPoint(dAtoi(argv[2]), dAtoi(argv[3])); object->setTextExtent(kPoint); } /*! Get the offset that the button will be rendered from the top left corner of the control. @return The offset as a string with space-separated integers. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, getBoxOffset, ConsoleString, 2, 2, (...)) { char *retBuffer = Con::getReturnBuffer(64); const Point2I &ext = object->getBoxOffset(); dSprintf(retBuffer, 64, "%d %d", ext.x, ext.y); return retBuffer; } /*! Get the area that the button will be rendered to within the control. @return The width and height of the button as a string with space-separated integers. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, getBoxExtent, ConsoleString, 2, 2, (...)) { char *retBuffer = Con::getReturnBuffer(64); const Point2I &ext = object->getBoxExtent(); dSprintf(retBuffer, 64, "%d %d", ext.x, ext.y); return retBuffer; } /*! Get the offset that the text area will be from the top left corner of the control. @return The offset of the text area as a string with space-separated integers. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, getTextOffset, ConsoleString, 2, 2, (...)) { char *retBuffer = Con::getReturnBuffer(64); const Point2I &ext = object->getTextOffset(); dSprintf(retBuffer, 64, "%d %d", ext.x, ext.y); return retBuffer; } /*! Get the area that the text will be rendered to within the control. @return The width and height of the text area as a string with space-separated integers. */ ConsoleMethodWithDocs(GuiCheckBoxCtrl, getTextExtent, ConsoleString, 2, 2, (...)) { char *retBuffer = Con::getReturnBuffer(64); const Point2I &ext = object->getTextExtent(); dSprintf(retBuffer, 64, "%d %d", ext.x, ext.y); return retBuffer; }
{'content_hash': '8477139544a4c47726ca90445ef79901', 'timestamp': '', 'source': 'github', 'line_count': 119, 'max_line_length': 92, 'avg_line_length': 38.67226890756302, 'alnum_prop': 0.7177314211212517, 'repo_name': 'dottools/Torque2D', 'id': 'f2be02072b8cca77b6eca916a846ace3bed9875e', 'size': '4602', 'binary': False, 'copies': '1', 'ref': 'refs/heads/development', 'path': 'engine/source/gui/buttons/guiCheckBoxCtrl_ScriptBinding.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '57714'}, {'name': 'Awk', 'bytes': '3962'}, {'name': 'Batchfile', 'bytes': '1094'}, {'name': 'C', 'bytes': '16851020'}, {'name': 'C#', 'bytes': '827731'}, {'name': 'C++', 'bytes': '12918212'}, {'name': 'CMake', 'bytes': '62542'}, {'name': 'CSS', 'bytes': '2384'}, {'name': 'Dockerfile', 'bytes': '721'}, {'name': 'HTML', 'bytes': '1437330'}, {'name': 'Java', 'bytes': '27472'}, {'name': 'JavaScript', 'bytes': '2047'}, {'name': 'Lex', 'bytes': '15855'}, {'name': 'M4', 'bytes': '52007'}, {'name': 'Makefile', 'bytes': '289124'}, {'name': 'Module Management System', 'bytes': '13471'}, {'name': 'Objective-C', 'bytes': '62666'}, {'name': 'Objective-C++', 'bytes': '611615'}, {'name': 'Perl', 'bytes': '4051'}, {'name': 'Python', 'bytes': '355429'}, {'name': 'Roff', 'bytes': '31697'}, {'name': 'Ruby', 'bytes': '2275'}, {'name': 'SAS', 'bytes': '14051'}, {'name': 'Shell', 'bytes': '1095144'}, {'name': 'Smalltalk', 'bytes': '6351'}, {'name': 'StringTemplate', 'bytes': '4399'}, {'name': 'WebAssembly', 'bytes': '13831'}, {'name': 'Yacc', 'bytes': '16053'}, {'name': 'sed', 'bytes': '236'}]}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>jsf</groupId> <artifactId>JSF_02_Tablas</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <dependencies> <dependency> <groupId>com.sun.faces</groupId> <artifactId>jsf-api</artifactId> <version>2.1.7</version> </dependency> </dependencies> </project>
{'content_hash': 'bff411fb2ead80adf9de409fa6602a4b', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 204, 'avg_line_length': 29.42105263157895, 'alnum_prop': 0.6976744186046512, 'repo_name': 'CarlosIribarren/Ejemplos-Examples', 'id': '62c10c184d01df83b4d5db9527f6a440d596270d', 'size': '559', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Java/Java EE/04 JSF/JSF_02_Tablas/pom.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '110405'}, {'name': 'C', 'bytes': '48796'}, {'name': 'CSS', 'bytes': '93962'}, {'name': 'HTML', 'bytes': '85221'}, {'name': 'Java', 'bytes': '971790'}, {'name': 'JavaScript', 'bytes': '118893'}, {'name': 'PHP', 'bytes': '175996'}, {'name': 'PLSQL', 'bytes': '4877'}, {'name': 'Shell', 'bytes': '20208'}, {'name': 'Visual Basic', 'bytes': '155712'}, {'name': 'XSLT', 'bytes': '3471'}]}
#define TTTCalendarUnitYear NSCalendarUnitYear #define TTTCalendarUnitMonth NSCalendarUnitMonth #define TTTCalendarUnitWeek NSCalendarUnitWeekOfYear #define TTTCalendarUnitDay NSCalendarUnitDay #define TTTCalendarUnitHour NSCalendarUnitHour #define TTTCalendarUnitMinute NSCalendarUnitMinute #define TTTCalendarUnitSecond NSCalendarUnitSecond #define TTTDateComponentUndefined NSDateComponentUndefined #else #define TTTCalendarUnitYear NSYearCalendarUnit #define TTTCalendarUnitMonth NSMonthCalendarUnit #define TTTCalendarUnitWeek NSWeekOfYearCalendarUnit #define TTTCalendarUnitDay NSDayCalendarUnit #define TTTCalendarUnitHour NSHourCalendarUnit #define TTTCalendarUnitMinute NSMinuteCalendarUnit #define TTTCalendarUnitSecond NSSecondCalendarUnit #define TTTDateComponentUndefined NSUndefinedDateComponent #endif static inline NSCalendarUnit NSCalendarUnitFromString(NSString *string) { if ([string isEqualToString:@"year"]) { return TTTCalendarUnitYear; } else if ([string isEqualToString:@"month"]) { return TTTCalendarUnitMonth; } else if ([string isEqualToString:@"weekOfYear"]) { return TTTCalendarUnitWeek; } else if ([string isEqualToString:@"day"]) { return TTTCalendarUnitDay; } else if ([string isEqualToString:@"hour"]) { return TTTCalendarUnitHour; } else if ([string isEqualToString:@"minute"]) { return TTTCalendarUnitMinute; } else if ([string isEqualToString:@"second"]) { return TTTCalendarUnitSecond; } return TTTDateComponentUndefined; } static inline NSComparisonResult NSCalendarUnitCompareSignificance(NSCalendarUnit a, NSCalendarUnit b) { if ((a == TTTCalendarUnitWeek) ^ (b == TTTCalendarUnitWeek)) { if (b == TTTCalendarUnitWeek) { switch (a) { case TTTCalendarUnitYear: case TTTCalendarUnitMonth: return NSOrderedDescending; default: return NSOrderedAscending; } } else { switch (b) { case TTTCalendarUnitYear: case TTTCalendarUnitMonth: return NSOrderedAscending; default: return NSOrderedDescending; } } } else { if (a > b) { return NSOrderedAscending; } else if (a < b) { return NSOrderedDescending; } else { return NSOrderedSame; } } } @implementation TTTTimeIntervalFormatter @synthesize locale = _locale; @synthesize calendar = _calendar; @synthesize pastDeicticExpression = _pastDeicticExpression; @synthesize presentDeicticExpression = _presentDeicticExpression; @synthesize futureDeicticExpression = _futureDeicticExpression; @synthesize pastDeicticExpressionFormat = _pastDeicticExpressionFormat; @synthesize futureDeicticExpressionFormat = _futureDeicticExpressionFormat; @synthesize suffixExpressionFormat = _suffixExpressionFormat; @synthesize approximateQualifierFormat = _approximateQualifierFormat; @synthesize presentTimeIntervalMargin = _presentTimeIntervalMargin; @synthesize usesAbbreviatedCalendarUnits = _usesAbbreviatedCalendarUnits; @synthesize usesApproximateQualifier = _usesApproximateQualifier; @synthesize usesIdiomaticDeicticExpressions = _usesIdiomaticDeicticExpressions; @synthesize numberOfSignificantUnits = _numberOfSignificantUnits; @synthesize leastSignificantUnit = _leastSignificantUnit; @synthesize significantUnits = _significantUnits; - (id)init { self = [super init]; if (!self) { return nil; } self.locale = [NSLocale currentLocale]; self.calendar = [NSCalendar currentCalendar]; self.pastDeicticExpression = NSLocalizedStringFromTableInBundle(@"ago", @"FormatterKit", [NSBundle formatterKitBundle], @"Past Deictic Expression"); self.presentDeicticExpression = NSLocalizedStringFromTableInBundle(@"just now", @"FormatterKit", [NSBundle formatterKitBundle], @"Present Deictic Expression"); self.futureDeicticExpression = NSLocalizedStringFromTableInBundle(@"from now", @"FormatterKit", [NSBundle formatterKitBundle], @"Future Deictic Expression"); self.pastDeicticExpressionFormat = NSLocalizedStringWithDefaultValue(@"Past Deictic Expression Format String", @"FormatterKit", [NSBundle formatterKitBundle], @"%@ %@", @"Past Deictic Expression Format (#{Time} #{Ago/From Now}"); self.futureDeicticExpressionFormat = NSLocalizedStringWithDefaultValue(@"Future Deictic Expression Format String", @"FormatterKit", [NSBundle formatterKitBundle], @"%@ %@", @"Future Deictic Expression Format (#{In} #{Time}"); self.approximateQualifierFormat = NSLocalizedStringFromTableInBundle(@"about %@", @"FormatterKit", [NSBundle formatterKitBundle], @"Approximate Qualifier Format"); self.suffixExpressionFormat = NSLocalizedStringWithDefaultValue(@"Suffix Expression Format String", @"FormatterKit", [NSBundle formatterKitBundle], @"%@ %@", @"Suffix Expression Format (#{Time} #{Unit})"); self.presentTimeIntervalMargin = 1; self.significantUnits = TTTCalendarUnitYear | TTTCalendarUnitMonth | TTTCalendarUnitWeek | TTTCalendarUnitDay | TTTCalendarUnitHour | TTTCalendarUnitMinute | TTTCalendarUnitSecond; self.numberOfSignificantUnits = 1; self.leastSignificantUnit = TTTCalendarUnitSecond; return self; } - (BOOL)shouldUseUnit:(NSCalendarUnit)unit { return (self.significantUnits & unit) && NSCalendarUnitCompareSignificance(self.leastSignificantUnit, unit) != NSOrderedDescending; } - (NSDateComponents *)componentsWithoutTime:(NSDate *)date { NSCalendarUnit units = TTTCalendarUnitYear | TTTCalendarUnitMonth | TTTCalendarUnitWeek | TTTCalendarUnitDay; return [self.calendar components:units fromDate:date]; } - (NSInteger)numberOfDaysFrom:(NSDate *)fromDate to:(NSDate *)toDate { NSDateComponents *fromComponents = [self componentsWithoutTime:fromDate]; NSDateComponents *toComponents = [self componentsWithoutTime:toDate]; fromDate = [self.calendar dateFromComponents:fromComponents]; toDate = [self.calendar dateFromComponents:toComponents]; return [self.calendar components:TTTCalendarUnitDay fromDate:fromDate toDate:toDate options:0].day; } - (NSString *)stringForTimeInterval:(NSTimeInterval)seconds { NSDate *date = [NSDate date]; return [self stringForTimeIntervalFromDate:date toDate:[NSDate dateWithTimeInterval:seconds sinceDate:date]]; } - (NSString *)stringForTimeIntervalFromDate:(NSDate *)startingDate toDate:(NSDate *)endingDate { NSTimeInterval seconds = [startingDate timeIntervalSinceDate:endingDate]; if (fabs(seconds) < self.presentTimeIntervalMargin) { return self.presentDeicticExpression; } if (self.usesIdiomaticDeicticExpressions) { NSString *idiomaticDeicticExpression = [self idiomaticDeicticExpressionForStartingDate:startingDate endingDate:endingDate]; if (idiomaticDeicticExpression) { return idiomaticDeicticExpression; } } NSDateComponents *components = [self.calendar components:self.significantUnits fromDate:startingDate toDate:endingDate options:0]; NSString *string = nil; BOOL isApproximate = NO; NSUInteger numberOfUnits = 0; for (NSString *unitName in @[@"year", @"month", @"weekOfYear", @"day", @"hour", @"minute", @"second"]) { NSCalendarUnit unit = NSCalendarUnitFromString(unitName); if ([self shouldUseUnit:unit]) { BOOL reportOnlyDays = unit == TTTCalendarUnitDay && self.numberOfSignificantUnits == 1; NSInteger value = reportOnlyDays ? [self numberOfDaysFrom:startingDate to:endingDate] : [[components valueForKey:unitName] integerValue]; if (value) { NSNumber *number = @(abs((int)value)); NSString *suffix = [NSString stringWithFormat:self.suffixExpressionFormat, number, [self localizedStringForNumber:[number unsignedIntegerValue] ofCalendarUnit:unit]]; if (!string) { string = suffix; } else if (self.numberOfSignificantUnits == 0 || numberOfUnits < self.numberOfSignificantUnits) { string = [string stringByAppendingFormat:@" %@", suffix]; } else { isApproximate = YES; } numberOfUnits++; } } } if (string) { if (seconds > 0) { if ([self.pastDeicticExpression length]) { string = [NSString stringWithFormat:self.pastDeicticExpressionFormat, string, self.pastDeicticExpression]; } } else { if ([self.futureDeicticExpression length]) { string = [NSString stringWithFormat:self.futureDeicticExpressionFormat, string, self.futureDeicticExpression]; } } if (isApproximate && self.usesApproximateQualifier) { string = [NSString stringWithFormat:self.approximateQualifierFormat, string]; } } else { string = self.presentDeicticExpression; } return string; } - (NSString *)localizedStringForNumber:(NSUInteger)number ofCalendarUnit:(NSCalendarUnit)unit { BOOL singular = (number == 1); if (self.usesAbbreviatedCalendarUnits) { switch (unit) { case TTTCalendarUnitYear: return singular ? NSLocalizedStringFromTableInBundle(@"yr", @"FormatterKit", [NSBundle formatterKitBundle], @"Year Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"yrs", @"FormatterKit", [NSBundle formatterKitBundle], @"Year Unit (Plural, Abbreviated)"); case TTTCalendarUnitMonth: return singular ? NSLocalizedStringFromTableInBundle(@"mo", @"FormatterKit", [NSBundle formatterKitBundle], @"Month Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"mos", @"FormatterKit", [NSBundle formatterKitBundle], @"Month Unit (Plural, Abbreviated)"); case TTTCalendarUnitWeek: return singular ? NSLocalizedStringFromTableInBundle(@"wk", @"FormatterKit", [NSBundle formatterKitBundle], @"Week Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"wks", @"FormatterKit", [NSBundle formatterKitBundle], @"Week Unit (Plural, Abbreviated)"); case TTTCalendarUnitDay: return singular ? NSLocalizedStringFromTableInBundle(@"d", @"FormatterKit", [NSBundle formatterKitBundle], @"Day Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"ds", @"FormatterKit", [NSBundle formatterKitBundle], @"Day Unit (Plural, Abbreviated)"); case TTTCalendarUnitHour: return singular ? NSLocalizedStringFromTableInBundle(@"hr", @"FormatterKit", [NSBundle formatterKitBundle], @"Hour Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"hrs", @"FormatterKit", [NSBundle formatterKitBundle], @"Hour Unit (Plural, Abbreviated)"); case TTTCalendarUnitMinute: return singular ? NSLocalizedStringFromTableInBundle(@"min", @"FormatterKit", [NSBundle formatterKitBundle], @"Minute Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"mins", @"FormatterKit", [NSBundle formatterKitBundle], @"Minute Unit (Plural, Abbreviated)"); case TTTCalendarUnitSecond: return singular ? NSLocalizedStringFromTableInBundle(@"s", @"FormatterKit", [NSBundle formatterKitBundle], @"Second Unit (Singular, Abbreviated)") : NSLocalizedStringFromTableInBundle(@"s", @"FormatterKit", [NSBundle formatterKitBundle], @"Second Unit (Plural, Abbreviated)"); default: return nil; } } else { switch (unit) { case TTTCalendarUnitYear: return singular ? NSLocalizedStringFromTableInBundle(@"year", @"FormatterKit", [NSBundle formatterKitBundle], @"Year Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"years", @"FormatterKit", [NSBundle formatterKitBundle], @"Year Unit (Plural)"); case TTTCalendarUnitMonth: return singular ? NSLocalizedStringFromTableInBundle(@"month", @"FormatterKit", [NSBundle formatterKitBundle], @"Month Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"months", @"FormatterKit", [NSBundle formatterKitBundle], @"Month Unit (Plural)"); case TTTCalendarUnitWeek: return singular ? NSLocalizedStringFromTableInBundle(@"week", @"FormatterKit", [NSBundle formatterKitBundle], @"Week Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"weeks", @"FormatterKit", [NSBundle formatterKitBundle], @"Week Unit (Plural)"); case TTTCalendarUnitDay: return singular ? NSLocalizedStringFromTableInBundle(@"day", @"FormatterKit", [NSBundle formatterKitBundle], @"Day Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"days", @"FormatterKit", [NSBundle formatterKitBundle], @"Day Unit (Plural)"); case TTTCalendarUnitHour: return singular ? NSLocalizedStringFromTableInBundle(@"hour", @"FormatterKit", [NSBundle formatterKitBundle], @"Hour Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"hours", @"FormatterKit", [NSBundle formatterKitBundle], @"Hour Unit (Plural)"); case TTTCalendarUnitMinute: return singular ? NSLocalizedStringFromTableInBundle(@"minute", @"FormatterKit", [NSBundle formatterKitBundle], @"Minute Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"minutes", @"FormatterKit", [NSBundle formatterKitBundle], @"Minute Unit (Plural)"); case TTTCalendarUnitSecond: return singular ? NSLocalizedStringFromTableInBundle(@"second", @"FormatterKit", [NSBundle formatterKitBundle], @"Second Unit (Singular)") : NSLocalizedStringFromTableInBundle(@"seconds", @"FormatterKit", [NSBundle formatterKitBundle], @"Second Unit (Plural)"); default: return nil; } } } #pragma mark - - (NSString *)idiomaticDeicticExpressionForStartingDate:(NSDate *)startingDate endingDate:(NSDate *)endingDate { NSDateComponents *startingComponents = [self componentsWithoutTime:startingDate]; NSDateComponents *endingComponents = [self componentsWithoutTime:endingDate]; NSInteger dayDifference = [self numberOfDaysFrom:startingDate to:endingDate]; if ([self shouldUseUnit:TTTCalendarUnitDay] && dayDifference == -1) { return NSLocalizedStringFromTable(@"yesterday", @"FormatterKit", @"yesterday"); } if ([self shouldUseUnit:TTTCalendarUnitDay] && dayDifference == 1) { return NSLocalizedStringFromTable(@"tomorrow", @"FormatterKit", @"tomorrow"); } BOOL sameYear = startingComponents.year == endingComponents.year; BOOL previousYear = startingComponents.year - 1 == endingComponents.year; BOOL nextYear = startingComponents.year + 1 == endingComponents.year; BOOL sameMonth = sameYear && startingComponents.month == endingComponents.month; BOOL previousMonth = (sameYear && startingComponents.month - 1 == endingComponents.month) || (previousYear && startingComponents.month == 1 && endingComponents.month == 12); BOOL nextMonth = (sameYear && startingComponents.month + 1 == endingComponents.month) || (nextYear && startingComponents.month == 12 && endingComponents.month == 1); long numberOfWeeks = MAX(MAX(startingComponents.weekOfYear, endingComponents.weekOfYear), 52); BOOL precedingWeekNumber = (endingComponents.weekOfYear % numberOfWeeks) + 1 == startingComponents.weekOfYear; BOOL succeedingWeekNumber = (startingComponents.weekOfYear % numberOfWeeks) + 1 == endingComponents.weekOfYear; BOOL previousWeek = precedingWeekNumber && (sameMonth || previousMonth); BOOL nextWeek = succeedingWeekNumber && (sameMonth || nextMonth); if ([self shouldUseUnit:TTTCalendarUnitWeek] && previousWeek) { return NSLocalizedStringFromTable(@"last week", @"FormatterKit", @"last week"); } if ([self shouldUseUnit:TTTCalendarUnitWeek] && nextWeek) { return NSLocalizedStringFromTable(@"next week", @"FormatterKit", @"next week"); } if ([self shouldUseUnit:TTTCalendarUnitMonth] && previousMonth) { return NSLocalizedStringFromTable(@"last month", @"FormatterKit", @"last month"); } if ([self shouldUseUnit:TTTCalendarUnitMonth] && nextMonth) { return NSLocalizedStringFromTable(@"next month", @"FormatterKit", @"next month"); } if ([self shouldUseUnit:TTTCalendarUnitYear] && previousYear) { return NSLocalizedStringFromTable(@"last year", @"FormatterKit", @"last year"); } if ([self shouldUseUnit:TTTCalendarUnitYear] && nextYear) { return NSLocalizedStringFromTable(@"next year", @"FormatterKit", @"next year"); } return nil; } - (NSString *)caRelativeDateStringForComponents:(NSDateComponents *)components { if ([components day] == -2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"abans d'ahir"; } if ([components day] == 2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"passat demà"; } return nil; } - (NSString *)heRelativeDateStringForComponents:(NSDateComponents *)components { if ([components year] == -2) { return @"לפני שנתיים"; } else if ([components month] == -2 && [components year] == 0) { return @"לפני חודשיים"; } else if ([components weekOfYear] == -2 && [components year] == 0 && [components month] == 0) { return @"לפני שבועיים"; } else if ([components day] == -2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"שלשום"; } if ([components year] == 2) { return @"בעוד שנתיים"; } else if ([components month] == 2 && [components year] == 0) { return @"בעוד חודשיים"; } else if ([components weekOfYear] == 2 && [components year] == 0 && [components month] == 0) { return @"בעוד שבועיים"; } else if ([components day] == 2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"מחרתיים"; } return nil; } - (NSString *)nlRelativeDateStringForComponents:(NSDateComponents *)components { if ([components day] == -2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"eergisteren"; } if ([components day] == 2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"overmorgen"; } return nil; } - (NSString *)plRelativeDateStringForComponents:(NSDateComponents *)components { if ([components day] == -2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"przedwczoraj"; } if ([components day] == 2 && [components year] == 0 && [components month] == 0 && [components weekOfYear] == 0) { return @"pojutrze"; } return nil; } - (NSString *)csRelativeDateStringForComponents:(NSDateComponents *)components { if ([components day] == -2 && [components weekOfYear] == 0 && [components month] == 0 && [components year] == 0) { return @"předevčírem"; } if ([components day] == 2 && [components weekOfYear] == 0 && [components month] == 0 && [components year] == 0) { return @"pozítří"; } return nil; } #pragma mark - NSFormatter - (NSString *)stringForObjectValue:(id)anObject { if (![anObject isKindOfClass:[NSNumber class]]) { return nil; } return [self stringForTimeInterval:[(NSNumber *)anObject doubleValue]]; } - (BOOL)getObjectValue:(out __unused __autoreleasing id *)obj forString:(__unused NSString *)string errorDescription:(out NSString *__autoreleasing *)error { *error = NSLocalizedStringFromTableInBundle(@"Method Not Implemented", @"FormatterKit", [NSBundle formatterKitBundle], nil); return NO; } #pragma mark - NSCopying - (id)copyWithZone:(NSZone *)zone { TTTTimeIntervalFormatter *formatter = [[[self class] allocWithZone:zone] init]; formatter.locale = [self.locale copyWithZone:zone]; formatter.pastDeicticExpression = [self.pastDeicticExpression copyWithZone:zone]; formatter.presentDeicticExpression = [self.presentDeicticExpression copyWithZone:zone]; formatter.futureDeicticExpression = [self.futureDeicticExpression copyWithZone:zone]; formatter.pastDeicticExpressionFormat = [self.pastDeicticExpressionFormat copyWithZone:zone]; formatter.futureDeicticExpressionFormat = [self.futureDeicticExpressionFormat copyWithZone:zone]; formatter.approximateQualifierFormat = [self.approximateQualifierFormat copyWithZone:zone]; formatter.presentTimeIntervalMargin = self.presentTimeIntervalMargin; formatter.usesAbbreviatedCalendarUnits = self.usesAbbreviatedCalendarUnits; formatter.usesApproximateQualifier = self.usesApproximateQualifier; formatter.usesIdiomaticDeicticExpressions = self.usesIdiomaticDeicticExpressions; return formatter; } #pragma mark - NSCoding - (id)initWithCoder:(NSCoder *)aDecoder { self = [super initWithCoder:aDecoder]; self.locale = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(locale))]; self.pastDeicticExpression = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(pastDeicticExpression))]; self.presentDeicticExpression = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(presentDeicticExpression))]; self.futureDeicticExpression = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(futureDeicticExpression))]; self.pastDeicticExpressionFormat = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(pastDeicticExpressionFormat))]; self.futureDeicticExpressionFormat = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(futureDeicticExpressionFormat))]; self.approximateQualifierFormat = [aDecoder decodeObjectForKey:NSStringFromSelector(@selector(approximateQualifierFormat))]; self.presentTimeIntervalMargin = [aDecoder decodeDoubleForKey:NSStringFromSelector(@selector(presentTimeIntervalMargin))]; self.usesAbbreviatedCalendarUnits = [aDecoder decodeBoolForKey:NSStringFromSelector(@selector(usesAbbreviatedCalendarUnits))]; self.usesApproximateQualifier = [aDecoder decodeBoolForKey:NSStringFromSelector(@selector(usesApproximateQualifier))]; self.usesIdiomaticDeicticExpressions = [aDecoder decodeBoolForKey:NSStringFromSelector(@selector(usesIdiomaticDeicticExpressions))]; return self; } - (void)encodeWithCoder:(NSCoder *)aCoder { [super encodeWithCoder:aCoder]; [aCoder encodeObject:self.locale forKey:NSStringFromSelector(@selector(locale))]; [aCoder encodeObject:self.pastDeicticExpression forKey:NSStringFromSelector(@selector(pastDeicticExpression))]; [aCoder encodeObject:self.presentDeicticExpression forKey:NSStringFromSelector(@selector(presentDeicticExpression))]; [aCoder encodeObject:self.futureDeicticExpression forKey:NSStringFromSelector(@selector(futureDeicticExpression))]; [aCoder encodeObject:self.pastDeicticExpressionFormat forKey:NSStringFromSelector(@selector(pastDeicticExpressionFormat))]; [aCoder encodeObject:self.futureDeicticExpressionFormat forKey:NSStringFromSelector(@selector(futureDeicticExpressionFormat))]; [aCoder encodeObject:self.approximateQualifierFormat forKey:NSStringFromSelector(@selector(approximateQualifierFormat))]; [aCoder encodeDouble:self.presentTimeIntervalMargin forKey:NSStringFromSelector(@selector(presentTimeIntervalMargin))]; [aCoder encodeBool:self.usesAbbreviatedCalendarUnits forKey:NSStringFromSelector(@selector(usesAbbreviatedCalendarUnits))]; [aCoder encodeBool:self.usesApproximateQualifier forKey:NSStringFromSelector(@selector(usesApproximateQualifier))]; [aCoder encodeBool:self.usesIdiomaticDeicticExpressions forKey:NSStringFromSelector(@selector(usesIdiomaticDeicticExpressions))]; } @end
{'content_hash': 'ffe607c7564262cf3810938094c2afe4', 'timestamp': '', 'source': 'github', 'line_count': 443, 'max_line_length': 297, 'avg_line_length': 54.56207674943567, 'alnum_prop': 0.7164370526664184, 'repo_name': 'mattt/FormatterKit', 'id': '469e956516cf702398d791baccd98d6e4fe2157d', 'size': '25665', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'FormatterKit/TTTTimeIntervalFormatter.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '222966'}, {'name': 'Ruby', 'bytes': '10729'}, {'name': 'Shell', 'bytes': '2058'}, {'name': 'Swift', 'bytes': '93825'}]}
ACCEPTED #### According to NUB Generator [autonym] #### Published in null #### Original name null ### Remarks null
{'content_hash': '6abc87e543d69eec797d2dbf9298b117', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 23, 'avg_line_length': 9.076923076923077, 'alnum_prop': 0.6779661016949152, 'repo_name': 'mdoering/backbone', 'id': '66fa110200fbd5f03ea74c6f0b46f45183e23165', 'size': '166', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Sapindales/Sapindaceae/Matayba/Matayba opaca/Matayba opaca opaca/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
package org.gradoop.flink.model.impl.operators.matching.common.query.predicates; import org.gradoop.gdl.model.comparables.ComparableExpression; import java.io.Serializable; /** * Factory for @link{QueryComparable}s in order to support integration of newer GDL versions * in gradoop-temporal */ public abstract class QueryComparableFactory implements Serializable { /** * Creates a {@link QueryComparable} from a GDL comparable expression * * @param comparable comparable to create wrapper for * @return QueryComparable */ public abstract QueryComparable createFrom(ComparableExpression comparable); }
{'content_hash': '0cf82afc7e15bbdd44f4448c09fb7258', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 92, 'avg_line_length': 31.35, 'alnum_prop': 0.7830940988835726, 'repo_name': 'galpha/gradoop', 'id': '1f5d320af4df448f1e98578ccea946a4488b9273', 'size': '1264', 'binary': False, 'copies': '2', 'ref': 'refs/heads/develop', 'path': 'gradoop-flink/src/main/java/org/gradoop/flink/model/impl/operators/matching/common/query/predicates/QueryComparableFactory.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '6550822'}, {'name': 'Shell', 'bytes': '2289'}]}
dir="$(dirname "$0")" || exit 1 cd "$dir" || exit 1 . "./resources/kube_config.sh" || exit 1 namespace="$1" if [ $# -ne 1 ]; then cat >&2 <<EOF ERROR: Wrong number of arguments Synopsis: $0 <namespace> EOF exit 1 fi release_regex="^sync-perf-test-server-" helm \ --kube-context "$kube_context" \ --tiller-namespace "$namespace" \ list "$release_regex" || exit 1
{'content_hash': 'e2c6fb1984673a6b5d2705afaf8b0566', 'timestamp': '', 'source': 'github', 'line_count': 21, 'max_line_length': 40, 'avg_line_length': 18.19047619047619, 'alnum_prop': 0.612565445026178, 'repo_name': 'realm/realm-core', 'id': 'd4e128e94c9ad487455330e62a262e6e6e7c53e8', 'size': '382', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/cloud_perf_test/server/list.sh', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '51507'}, {'name': 'C++', 'bytes': '14399555'}, {'name': 'CMake', 'bytes': '96603'}, {'name': 'Dockerfile', 'bytes': '3300'}, {'name': 'Emacs Lisp', 'bytes': '255'}, {'name': 'Gnuplot', 'bytes': '2206'}, {'name': 'JavaScript', 'bytes': '4499'}, {'name': 'Mustache', 'bytes': '2174'}, {'name': 'Objective-C', 'bytes': '2302'}, {'name': 'Objective-C++', 'bytes': '59824'}, {'name': 'Python', 'bytes': '47050'}, {'name': 'Ruby', 'bytes': '1170'}, {'name': 'Shell', 'bytes': '77303'}, {'name': 'Swift', 'bytes': '15287'}]}
package ru.stqa.pft.mantis.appmanager; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.remote.BrowserType; import org.openqa.selenium.safari.SafariDriver; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.util.Objects; import java.util.Properties; import java.util.concurrent.TimeUnit; public class ApplicationManager { private final Properties properties; private WebDriver wd; private String browser; private RegistrationHelper registrationHelper; private ChangeHelper changeHelper; private FtpHelper ftp; private MailHelper mailHelper; public ApplicationManager(String browser) { this.browser = browser; properties = new Properties(); } public void init() throws IOException { String target = System.getProperty("target", "local"); properties.load(new FileReader(new File(String.format("src/test/resources/%s.properties", target)))); } public void stop() { if (wd != null) { wd.quit(); } } public HttpSession newSession() { return new HttpSession(this); } public String getProperty(String key) { return properties.getProperty(key); } public RegistrationHelper registration() { if (registrationHelper == null) { registrationHelper = new RegistrationHelper(this); } return registrationHelper; } public ChangeHelper change() { if (changeHelper == null) { changeHelper = new ChangeHelper(this); } return changeHelper; } public FtpHelper ftp() { if (ftp == null) { ftp = new FtpHelper(this); } return ftp; } public WebDriver getDriver() { if (wd == null) { if (Objects.equals(browser, BrowserType.FIREFOX)) { wd = new FirefoxDriver(); } else if (Objects.equals(browser, BrowserType.CHROME)) { wd = new ChromeDriver(); } else if (Objects.equals(browser, BrowserType.SAFARI)) { wd = new SafariDriver(); } wd.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); wd.get(properties.getProperty("web.baseUrl")); } return wd; } public MailHelper mail() { if (mailHelper == null) mailHelper = new MailHelper(this); return mailHelper; } }
{'content_hash': 'dfca2239d8e8edeeef4ae0266bef6966', 'timestamp': '', 'source': 'github', 'line_count': 96, 'max_line_length': 105, 'avg_line_length': 24.395833333333332, 'alnum_prop': 0.6861656703672075, 'repo_name': 'vi-babaeva/java_pft', 'id': 'fa39332c1b68ee4663c895dee135f9e2d23d1e78', 'size': '2342', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'mantis-tests/src/test/java/ru/stqa/pft/mantis/appmanager/ApplicationManager.java', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '62713'}, {'name': 'PHP', 'bytes': '240'}]}
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.rbac.dao.FunctionDao"> <!--分页查询功能--> <select id="countFunction" resultType="int"> SELECT COUNT(*) FROM cx_function f JOIN cx_menu Menu ON Menu.mid = f.mid <where> <if test="mid!=0"> f.mid=#{mid} </if> </where> LIMIT 1 </select> <select id="pageQueryFunction" resultType="com.rbac.vo.formbean.FunctionFormBean"> SELECT f.fid, f.text, f.resources, f.mid, m.text AS belong FROM cx_function f LEFT JOIN cx_menu m ON m.mid = f.mid <where> <if test="mid!=0"> f.mid=#{mid} </if> </where> LIMIT #{offset}, #{limit} </select> <!--添加功能--> <insert id="addFunction" parameterType="com.rbac.vo.formbean.FunctionFormBean"> <selectKey resultType="int" keyProperty="fid"> SELECT last_insert_id() </selectKey> INSERT INTO `cx_function` (`text`, `resources`, `mid`) VALUES (#{text}, #{resources}, #{mid}) </insert> <!--更新功能--> <update id="updateFunction" parameterType="com.rbac.vo.formbean.FunctionFormBean"> UPDATE `cx_function` SET text = #{text}, resources = #{resources}, mid = #{mid} WHERE fid = #{fid} </update> <select id="findFunctionByFid" resultType="FunctionEntity"> SELECT * FROM `cx_function` WHERE fid = #{fid} LIMIT 1 </select> <!--获得用户授权访问的资源--> <select id="findResourcesByUid" resultType="String"> SELECT f.resources FROM cx_function f WHERE EXISTS( SELECT * FROM ( SELECT rr.fid FROM cx_role_right rr WHERE EXISTS( SELECT rid FROM cx_role_user AS ru WHERE ru.uid = #{uid} AND rr.rid = ru.rid ) AND rr.type = 1 ) ids WHERE ids.fid = f.fid ) </select> <!--删除功能时的级联操作--> <delete id="deleteFunctionByFid" parameterType="int"> DELETE FROM `cx_function` WHERE fid = #{fid} </delete> <delete id="deleteRoleRightByFid" parameterType="int"> DELETE FROM `cx_role_right` WHERE fid = #{fid} </delete> </mapper>
{'content_hash': 'adcd9247f4c6a60b090c4f3f8d1faa83', 'timestamp': '', 'source': 'github', 'line_count': 93, 'max_line_length': 86, 'avg_line_length': 32.13978494623656, 'alnum_prop': 0.437604550016728, 'repo_name': 'cx118118/ssm-rbac', 'id': 'f9c379e3bb9395504bae703446d4e7888e90f95d', 'size': '3059', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/resources/mapper/FunctionDao.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '12590'}, {'name': 'Java', 'bytes': '136595'}, {'name': 'JavaScript', 'bytes': '11900'}]}
package fun.ridepub; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
{'content_hash': '369222b7b397dbb36b14ad4498f0c265', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 46, 'avg_line_length': 16.81578947368421, 'alnum_prop': 0.5712050078247262, 'repo_name': 'pherris/IOT-Value-Cycling', 'id': '330756a59d434b3ddacc6170b3706728a1c5c58a', 'size': '639', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/test/java/fun/ridepub/AppTest.java', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '6552'}, {'name': 'JavaScript', 'bytes': '1022'}, {'name': 'Perl', 'bytes': '559'}]}
![Color](color.png) ##ColorIssuer Instantiate with a private key that will control the asset and issue tokens to any receiver Address with issueTokens() CAUTION: Be sure to use a ColoredReadOnlyAccount or ColoredAccount to observe or maintain the address you sent the colored token as regular Accounts will not respect the colors and likely burn them. ###Basic Use ``` // assuming there are funds for tokens on the address controlled by the key ColorIssuer colorIssuer = new ColorIssuer(key); Color color = colorIssuer.getColor(); PrivateKey receiverKey = PrivateKey.createNew(); // issue 100 units carried by 50000 satoshis Transaction issuing = colorIssuer.issueTokens(receiverKey.getAddress(), 100, 50000, BaseTransactionFactory.MINIMUM_FEE); api.sendTransaction(issuing); // now transfer 50 the new color with a ColoredAccount to next owner ColoredAccount coloredAccount = new ColoredBaseAccount(new KeyListChain(receiverKey)); PrivateKey nextOwner = PrivateKey.createNew(); Transaction transfer = coloredAccount.createTransactionFactory() .proposeColored(nextOwner.getAddress(), color, 50).sign(coloredAccount.getChain()); api.sendTransaction(transfer); ```
{'content_hash': '4d8ca942e98f222c0ee48898f3df01f8', 'timestamp': '', 'source': 'github', 'line_count': 22, 'max_line_length': 131, 'avg_line_length': 53.63636363636363, 'alnum_prop': 0.7966101694915254, 'repo_name': 'DigitalAssetCom/hlp-candidate', 'id': 'd79d1c02fe53f292568cb0e8ceca81103028cd8a', 'size': '1180', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/color.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1656659'}, {'name': 'Protocol Buffer', 'bytes': '3948'}, {'name': 'Scala', 'bytes': '363948'}, {'name': 'Shell', 'bytes': '9592'}]}
ACCEPTED #### According to Index Fungorum #### Published in Grevillea 19(no. 90): 48 (1890) #### Original name Rhytisma discoidea Cooke & Massee ### Remarks null
{'content_hash': '0dd94b80ec877b0c9da657c9022e9e9f', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 33, 'avg_line_length': 12.692307692307692, 'alnum_prop': 0.696969696969697, 'repo_name': 'mdoering/backbone', 'id': '97cc59b2a682c98e8b0f22c046569243796ee87a', 'size': '222', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Fungi/Ascomycota/Leotiomycetes/Rhytismatales/Rhytismataceae/Rhytisma/Rhytisma discoidea/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
// +build !providerless package aws import ( "context" "fmt" "io" "math/rand" "reflect" "sort" "strings" "testing" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/ec2" "github.com/aws/aws-sdk-go/service/elb" "github.com/aws/aws-sdk-go/service/elbv2" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/apimachinery/pkg/util/sets" "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes/fake" cloudvolume "k8s.io/cloud-provider/volume" ) const TestClusterID = "clusterid.test" const TestClusterName = "testCluster" type MockedFakeEC2 struct { *FakeEC2Impl mock.Mock } func (m *MockedFakeEC2) expectDescribeSecurityGroups(clusterID, groupName string) { tags := []*ec2.Tag{ {Key: aws.String(TagNameKubernetesClusterLegacy), Value: aws.String(clusterID)}, {Key: aws.String(fmt.Sprintf("%s%s", TagNameKubernetesClusterPrefix, clusterID)), Value: aws.String(ResourceLifecycleOwned)}, } m.On("DescribeSecurityGroups", &ec2.DescribeSecurityGroupsInput{Filters: []*ec2.Filter{ newEc2Filter("group-name", groupName), newEc2Filter("vpc-id", ""), }}).Return([]*ec2.SecurityGroup{{Tags: tags}}) } func (m *MockedFakeEC2) DescribeVolumes(request *ec2.DescribeVolumesInput) ([]*ec2.Volume, error) { args := m.Called(request) return args.Get(0).([]*ec2.Volume), nil } func (m *MockedFakeEC2) DescribeSecurityGroups(request *ec2.DescribeSecurityGroupsInput) ([]*ec2.SecurityGroup, error) { args := m.Called(request) return args.Get(0).([]*ec2.SecurityGroup), nil } func (m *MockedFakeEC2) CreateVolume(request *ec2.CreateVolumeInput) (*ec2.Volume, error) { // mock requires stable input, and in CreateDisk we invoke buildTags which uses // a map to create tags, which then get converted into an array. This leads to // unstable sorting order which confuses mock. Sorted tags are not needed in // regular code, but are a must in tests here: for i := 0; i < len(request.TagSpecifications); i++ { if request.TagSpecifications[i] == nil { continue } tags := request.TagSpecifications[i].Tags sort.Slice(tags, func(i, j int) bool { if tags[i] == nil && tags[j] != nil { return false } if tags[i] != nil && tags[j] == nil { return true } return *tags[i].Key < *tags[j].Key }) } args := m.Called(request) return args.Get(0).(*ec2.Volume), nil } type MockedFakeELB struct { *FakeELB mock.Mock } func (m *MockedFakeELB) DescribeLoadBalancers(input *elb.DescribeLoadBalancersInput) (*elb.DescribeLoadBalancersOutput, error) { args := m.Called(input) return args.Get(0).(*elb.DescribeLoadBalancersOutput), nil } func (m *MockedFakeELB) expectDescribeLoadBalancers(loadBalancerName string) { m.On("DescribeLoadBalancers", &elb.DescribeLoadBalancersInput{LoadBalancerNames: []*string{aws.String(loadBalancerName)}}).Return(&elb.DescribeLoadBalancersOutput{ LoadBalancerDescriptions: []*elb.LoadBalancerDescription{{}}, }) } func (m *MockedFakeELB) AddTags(input *elb.AddTagsInput) (*elb.AddTagsOutput, error) { args := m.Called(input) return args.Get(0).(*elb.AddTagsOutput), nil } func (m *MockedFakeELB) ConfigureHealthCheck(input *elb.ConfigureHealthCheckInput) (*elb.ConfigureHealthCheckOutput, error) { args := m.Called(input) if args.Get(0) == nil { return nil, args.Error(1) } return args.Get(0).(*elb.ConfigureHealthCheckOutput), args.Error(1) } func (m *MockedFakeELB) expectConfigureHealthCheck(loadBalancerName *string, expectedHC *elb.HealthCheck, returnErr error) { expected := &elb.ConfigureHealthCheckInput{HealthCheck: expectedHC, LoadBalancerName: loadBalancerName} call := m.On("ConfigureHealthCheck", expected) if returnErr != nil { call.Return(nil, returnErr) } else { call.Return(&elb.ConfigureHealthCheckOutput{}, nil) } } func TestReadAWSCloudConfig(t *testing.T) { tests := []struct { name string reader io.Reader aws Services expectError bool zone string }{ { "No config reader", nil, nil, true, "", }, { "Empty config, no metadata", strings.NewReader(""), nil, true, "", }, { "No zone in config, no metadata", strings.NewReader("[global]\n"), nil, true, "", }, { "Zone in config, no metadata", strings.NewReader("[global]\nzone = eu-west-1a"), nil, false, "eu-west-1a", }, { "No zone in config, metadata does not have zone", strings.NewReader("[global]\n"), newMockedFakeAWSServices(TestClusterID).WithAz(""), true, "", }, { "No zone in config, metadata has zone", strings.NewReader("[global]\n"), newMockedFakeAWSServices(TestClusterID), false, "us-east-1a", }, { "Zone in config should take precedence over metadata", strings.NewReader("[global]\nzone = eu-west-1a"), newMockedFakeAWSServices(TestClusterID), false, "eu-west-1a", }, } for _, test := range tests { t.Logf("Running test case %s", test.name) var metadata EC2Metadata if test.aws != nil { metadata, _ = test.aws.Metadata() } cfg, err := readAWSCloudConfig(test.reader) if err == nil { err = updateConfigZone(cfg, metadata) } if test.expectError { if err == nil { t.Errorf("Should error for case %s (cfg=%v)", test.name, cfg) } } else { if err != nil { t.Errorf("Should succeed for case: %s", test.name) } if cfg.Global.Zone != test.zone { t.Errorf("Incorrect zone value (%s vs %s) for case: %s", cfg.Global.Zone, test.zone, test.name) } } } } type ServiceDescriptor struct { name string region string signingRegion, signingMethod string signingName string } func TestOverridesActiveConfig(t *testing.T) { tests := []struct { name string reader io.Reader aws Services expectError bool active bool servicesOverridden []ServiceDescriptor }{ { "No overrides", strings.NewReader(` [global] `), nil, false, false, []ServiceDescriptor{}, }, { "Missing Service Name", strings.NewReader(` [global] [ServiceOverride "1"] Region=sregion URL=https://s3.foo.bar SigningRegion=sregion SigningMethod = sign `), nil, true, false, []ServiceDescriptor{}, }, { "Missing Service Region", strings.NewReader(` [global] [ServiceOverride "1"] Service=s3 URL=https://s3.foo.bar SigningRegion=sregion SigningMethod = sign `), nil, true, false, []ServiceDescriptor{}, }, { "Missing URL", strings.NewReader(` [global] [ServiceOverride "1"] Service="s3" Region=sregion SigningRegion=sregion SigningMethod = sign `), nil, true, false, []ServiceDescriptor{}, }, { "Missing Signing Region", strings.NewReader(` [global] [ServiceOverride "1"] Service=s3 Region=sregion URL=https://s3.foo.bar SigningMethod = sign `), nil, true, false, []ServiceDescriptor{}, }, { "Active Overrides", strings.NewReader(` [Global] [ServiceOverride "1"] Service = "s3 " Region = sregion URL = https://s3.foo.bar SigningRegion = sregion SigningMethod = v4 `), nil, false, true, []ServiceDescriptor{{name: "s3", region: "sregion", signingRegion: "sregion", signingMethod: "v4"}}, }, { "Multiple Overridden Services", strings.NewReader(` [Global] vpc = vpc-abc1234567 [ServiceOverride "1"] Service=s3 Region=sregion1 URL=https://s3.foo.bar SigningRegion=sregion1 SigningMethod = v4 [ServiceOverride "2"] Service=ec2 Region=sregion2 URL=https://ec2.foo.bar SigningRegion=sregion2 SigningMethod = v4`), nil, false, true, []ServiceDescriptor{{name: "s3", region: "sregion1", signingRegion: "sregion1", signingMethod: "v4"}, {name: "ec2", region: "sregion2", signingRegion: "sregion2", signingMethod: "v4"}}, }, { "Duplicate Services", strings.NewReader(` [Global] vpc = vpc-abc1234567 [ServiceOverride "1"] Service=s3 Region=sregion1 URL=https://s3.foo.bar SigningRegion=sregion SigningMethod = sign [ServiceOverride "2"] Service=s3 Region=sregion1 URL=https://s3.foo.bar SigningRegion=sregion SigningMethod = sign`), nil, true, false, []ServiceDescriptor{}, }, { "Multiple Overridden Services in Multiple regions", strings.NewReader(` [global] [ServiceOverride "1"] Service=s3 Region=region1 URL=https://s3.foo.bar SigningRegion=sregion1 [ServiceOverride "2"] Service=ec2 Region=region2 URL=https://ec2.foo.bar SigningRegion=sregion SigningMethod = v4 `), nil, false, true, []ServiceDescriptor{{name: "s3", region: "region1", signingRegion: "sregion1", signingMethod: ""}, {name: "ec2", region: "region2", signingRegion: "sregion", signingMethod: "v4"}}, }, { "Multiple regions, Same Service", strings.NewReader(` [global] [ServiceOverride "1"] Service=s3 Region=region1 URL=https://s3.foo.bar SigningRegion=sregion1 SigningMethod = v3 [ServiceOverride "2"] Service=s3 Region=region2 URL=https://s3.foo.bar SigningRegion=sregion1 SigningMethod = v4 SigningName = "name" `), nil, false, true, []ServiceDescriptor{{name: "s3", region: "region1", signingRegion: "sregion1", signingMethod: "v3"}, {name: "s3", region: "region2", signingRegion: "sregion1", signingMethod: "v4", signingName: "name"}}, }, } for _, test := range tests { t.Logf("Running test case %s", test.name) cfg, err := readAWSCloudConfig(test.reader) if err == nil { err = cfg.validateOverrides() } if test.expectError { if err == nil { t.Errorf("Should error for case %s (cfg=%v)", test.name, cfg) } } else { if err != nil { t.Errorf("Should succeed for case: %s, got %v", test.name, err) } if len(cfg.ServiceOverride) != len(test.servicesOverridden) { t.Errorf("Expected %d overridden services, received %d for case %s", len(test.servicesOverridden), len(cfg.ServiceOverride), test.name) } else { for _, sd := range test.servicesOverridden { var found *struct { Service string Region string URL string SigningRegion string SigningMethod string SigningName string } for _, v := range cfg.ServiceOverride { if v.Service == sd.name && v.Region == sd.region { found = v break } } if found == nil { t.Errorf("Missing override for service %s in case %s", sd.name, test.name) } else { if found.SigningRegion != sd.signingRegion { t.Errorf("Expected signing region '%s', received '%s' for case %s", sd.signingRegion, found.SigningRegion, test.name) } if found.SigningMethod != sd.signingMethod { t.Errorf("Expected signing method '%s', received '%s' for case %s", sd.signingMethod, found.SigningRegion, test.name) } targetName := fmt.Sprintf("https://%s.foo.bar", sd.name) if found.URL != targetName { t.Errorf("Expected Endpoint '%s', received '%s' for case %s", targetName, found.URL, test.name) } if found.SigningName != sd.signingName { t.Errorf("Expected signing name '%s', received '%s' for case %s", sd.signingName, found.SigningName, test.name) } fn := cfg.getResolver() ep1, e := fn(sd.name, sd.region, nil) if e != nil { t.Errorf("Expected a valid endpoint for %s in case %s", sd.name, test.name) } else { targetName := fmt.Sprintf("https://%s.foo.bar", sd.name) if ep1.URL != targetName { t.Errorf("Expected endpoint url: %s, received %s in case %s", targetName, ep1.URL, test.name) } if ep1.SigningRegion != sd.signingRegion { t.Errorf("Expected signing region '%s', received '%s' in case %s", sd.signingRegion, ep1.SigningRegion, test.name) } if ep1.SigningMethod != sd.signingMethod { t.Errorf("Expected signing method '%s', received '%s' in case %s", sd.signingMethod, ep1.SigningRegion, test.name) } } } } } } } } func TestNewAWSCloud(t *testing.T) { tests := []struct { name string reader io.Reader awsServices Services expectError bool region string }{ { "No config reader", nil, newMockedFakeAWSServices(TestClusterID).WithAz(""), true, "", }, { "Config specifies valid zone", strings.NewReader("[global]\nzone = eu-west-1a"), newMockedFakeAWSServices(TestClusterID), false, "eu-west-1", }, { "Gets zone from metadata when not in config", strings.NewReader("[global]\n"), newMockedFakeAWSServices(TestClusterID), false, "us-east-1", }, { "No zone in config or metadata", strings.NewReader("[global]\n"), newMockedFakeAWSServices(TestClusterID).WithAz(""), true, "", }, } for _, test := range tests { t.Logf("Running test case %s", test.name) cfg, err := readAWSCloudConfig(test.reader) var c *Cloud if err == nil { c, err = newAWSCloud(*cfg, test.awsServices) } if test.expectError { if err == nil { t.Errorf("Should error for case %s", test.name) } } else { if err != nil { t.Errorf("Should succeed for case: %s, got %v", test.name, err) } else if c.region != test.region { t.Errorf("Incorrect region value (%s vs %s) for case: %s", c.region, test.region, test.name) } } } } func mockInstancesResp(selfInstance *ec2.Instance, instances []*ec2.Instance) (*Cloud, *FakeAWSServices) { awsServices := newMockedFakeAWSServices(TestClusterID) awsServices.instances = instances awsServices.selfInstance = selfInstance awsCloud, err := newAWSCloud(CloudConfig{}, awsServices) if err != nil { panic(err) } awsCloud.kubeClient = fake.NewSimpleClientset() return awsCloud, awsServices } func mockAvailabilityZone(availabilityZone string) *Cloud { awsServices := newMockedFakeAWSServices(TestClusterID).WithAz(availabilityZone) awsCloud, err := newAWSCloud(CloudConfig{}, awsServices) if err != nil { panic(err) } awsCloud.kubeClient = fake.NewSimpleClientset() return awsCloud } func testHasNodeAddress(t *testing.T, addrs []v1.NodeAddress, addressType v1.NodeAddressType, address string) { for _, addr := range addrs { if addr.Type == addressType && addr.Address == address { return } } t.Errorf("Did not find expected address: %s:%s in %v", addressType, address, addrs) } func makeInstance(num int, privateIP, publicIP, privateDNSName, publicDNSName string, setNetInterface bool) ec2.Instance { var tag ec2.Tag tag.Key = aws.String(TagNameKubernetesClusterLegacy) tag.Value = aws.String(TestClusterID) tags := []*ec2.Tag{&tag} instance := ec2.Instance{ InstanceId: aws.String(fmt.Sprintf("i-%d", num)), PrivateDnsName: aws.String(privateDNSName), PrivateIpAddress: aws.String(privateIP), PublicDnsName: aws.String(publicDNSName), PublicIpAddress: aws.String(publicIP), InstanceType: aws.String("c3.large"), Tags: tags, Placement: &ec2.Placement{AvailabilityZone: aws.String("us-east-1a")}, State: &ec2.InstanceState{ Name: aws.String("running"), }, } if setNetInterface == true { instance.NetworkInterfaces = []*ec2.InstanceNetworkInterface{ { Status: aws.String(ec2.NetworkInterfaceStatusInUse), PrivateIpAddresses: []*ec2.InstancePrivateIpAddress{ { PrivateIpAddress: aws.String(privateIP), }, }, }, } } return instance } func TestNodeAddresses(t *testing.T) { // Note instance0 and instance1 have the same name // (we test that this produces an error) instance0 := makeInstance(0, "192.168.0.1", "1.2.3.4", "instance-same.ec2.internal", "instance-same.ec2.external", true) instance1 := makeInstance(1, "192.168.0.2", "", "instance-same.ec2.internal", "", false) instance2 := makeInstance(2, "192.168.0.1", "1.2.3.4", "instance-other.ec2.internal", "", false) instances := []*ec2.Instance{&instance0, &instance1, &instance2} aws1, _ := mockInstancesResp(&instance0, []*ec2.Instance{&instance0}) _, err1 := aws1.NodeAddresses(context.TODO(), "instance-mismatch.ec2.internal") if err1 == nil { t.Errorf("Should error when no instance found") } aws2, _ := mockInstancesResp(&instance2, instances) _, err2 := aws2.NodeAddresses(context.TODO(), "instance-same.ec2.internal") if err2 == nil { t.Errorf("Should error when multiple instances found") } aws3, _ := mockInstancesResp(&instance0, instances[0:1]) // change node name so it uses the instance instead of metadata aws3.selfAWSInstance.nodeName = "foo" addrs3, err3 := aws3.NodeAddresses(context.TODO(), "instance-same.ec2.internal") if err3 != nil { t.Errorf("Should not error when instance found") } if len(addrs3) != 5 { t.Errorf("Should return exactly 5 NodeAddresses") } testHasNodeAddress(t, addrs3, v1.NodeInternalIP, "192.168.0.1") testHasNodeAddress(t, addrs3, v1.NodeExternalIP, "1.2.3.4") testHasNodeAddress(t, addrs3, v1.NodeExternalDNS, "instance-same.ec2.external") testHasNodeAddress(t, addrs3, v1.NodeInternalDNS, "instance-same.ec2.internal") testHasNodeAddress(t, addrs3, v1.NodeHostName, "instance-same.ec2.internal") } func TestNodeAddressesWithMetadata(t *testing.T) { instance := makeInstance(0, "", "2.3.4.5", "instance.ec2.internal", "", false) instances := []*ec2.Instance{&instance} awsCloud, awsServices := mockInstancesResp(&instance, instances) awsServices.networkInterfacesMacs = []string{"0a:77:89:f3:9c:f6", "0a:26:64:c4:6a:48"} awsServices.networkInterfacesPrivateIPs = [][]string{{"192.168.0.1"}, {"192.168.0.2"}} addrs, err := awsCloud.NodeAddresses(context.TODO(), "") if err != nil { t.Errorf("unexpected error: %v", err) } testHasNodeAddress(t, addrs, v1.NodeInternalIP, "192.168.0.1") testHasNodeAddress(t, addrs, v1.NodeInternalIP, "192.168.0.2") testHasNodeAddress(t, addrs, v1.NodeExternalIP, "2.3.4.5") var index1, index2 int for i, addr := range addrs { if addr.Type == v1.NodeInternalIP && addr.Address == "192.168.0.1" { index1 = i } else if addr.Type == v1.NodeInternalIP && addr.Address == "192.168.0.2" { index2 = i } } if index1 > index2 { t.Errorf("Addresses in incorrect order: %v", addrs) } } func TestParseMetadataLocalHostname(t *testing.T) { tests := []struct { name string metadata string hostname string internalDNS []string }{ { "single hostname", "ip-172-31-16-168.us-west-2.compute.internal", "ip-172-31-16-168.us-west-2.compute.internal", []string{"ip-172-31-16-168.us-west-2.compute.internal"}, }, { "dhcp options set with three additional domain names", "ip-172-31-16-168.us-west-2.compute.internal example.com example.ca example.org", "ip-172-31-16-168.us-west-2.compute.internal", []string{"ip-172-31-16-168.us-west-2.compute.internal", "ip-172-31-16-168.example.com", "ip-172-31-16-168.example.ca", "ip-172-31-16-168.example.org"}, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { hostname, internalDNS := parseMetadataLocalHostname(test.metadata) if hostname != test.hostname { t.Errorf("got hostname %v, expected %v", hostname, test.hostname) } for i, v := range internalDNS { if v != test.internalDNS[i] { t.Errorf("got an internalDNS %v, expected %v", v, test.internalDNS[i]) } } }) } } func TestGetRegion(t *testing.T) { aws := mockAvailabilityZone("us-west-2e") zones, ok := aws.Zones() if !ok { t.Fatalf("Unexpected missing zones impl") } zone, err := zones.GetZone(context.TODO()) if err != nil { t.Fatalf("unexpected error %v", err) } if zone.Region != "us-west-2" { t.Errorf("Unexpected region: %s", zone.Region) } if zone.FailureDomain != "us-west-2e" { t.Errorf("Unexpected FailureDomain: %s", zone.FailureDomain) } } func TestFindVPCID(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) if err != nil { t.Errorf("Error building aws cloud: %v", err) return } vpcID, err := c.findVPCID() if err != nil { t.Errorf("Unexpected error: %v", err) } if vpcID != "vpc-mac0" { t.Errorf("Unexpected vpcID: %s", vpcID) } } func constructSubnets(subnetsIn map[int]map[string]string) (subnetsOut []*ec2.Subnet) { for i := range subnetsIn { subnetsOut = append( subnetsOut, constructSubnet( subnetsIn[i]["id"], subnetsIn[i]["az"], ), ) } return } func constructSubnet(id string, az string) *ec2.Subnet { return &ec2.Subnet{ SubnetId: &id, AvailabilityZone: &az, } } func constructRouteTables(routeTablesIn map[string]bool) (routeTablesOut []*ec2.RouteTable) { routeTablesOut = append(routeTablesOut, &ec2.RouteTable{ Associations: []*ec2.RouteTableAssociation{{Main: aws.Bool(true)}}, Routes: []*ec2.Route{{ DestinationCidrBlock: aws.String("0.0.0.0/0"), GatewayId: aws.String("igw-main"), }}, }) for subnetID := range routeTablesIn { routeTablesOut = append( routeTablesOut, constructRouteTable( subnetID, routeTablesIn[subnetID], ), ) } return } func constructRouteTable(subnetID string, public bool) *ec2.RouteTable { var gatewayID string if public { gatewayID = "igw-" + subnetID[len(subnetID)-8:8] } else { gatewayID = "vgw-" + subnetID[len(subnetID)-8:8] } return &ec2.RouteTable{ Associations: []*ec2.RouteTableAssociation{{SubnetId: aws.String(subnetID)}}, Routes: []*ec2.Route{{ DestinationCidrBlock: aws.String("0.0.0.0/0"), GatewayId: aws.String(gatewayID), }}, } } func TestSubnetIDsinVPC(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) if err != nil { t.Errorf("Error building aws cloud: %v", err) return } // test with 3 subnets from 3 different AZs subnets := make(map[int]map[string]string) subnets[0] = make(map[string]string) subnets[0]["id"] = "subnet-a0000001" subnets[0]["az"] = "af-south-1a" subnets[1] = make(map[string]string) subnets[1]["id"] = "subnet-b0000001" subnets[1]["az"] = "af-south-1b" subnets[2] = make(map[string]string) subnets[2]["id"] = "subnet-c0000001" subnets[2]["az"] = "af-south-1c" constructedSubnets := constructSubnets(subnets) awsServices.ec2.RemoveSubnets() for _, subnet := range constructedSubnets { awsServices.ec2.CreateSubnet(subnet) } routeTables := map[string]bool{ "subnet-a0000001": true, "subnet-b0000001": true, "subnet-c0000001": true, } constructedRouteTables := constructRouteTables(routeTables) awsServices.ec2.RemoveRouteTables() for _, rt := range constructedRouteTables { awsServices.ec2.CreateRouteTable(rt) } result, err := c.findELBSubnets(false) if err != nil { t.Errorf("Error listing subnets: %v", err) return } if len(result) != 3 { t.Errorf("Expected 3 subnets but got %d", len(result)) return } resultSet := make(map[string]bool) for _, v := range result { resultSet[v] = true } for i := range subnets { if !resultSet[subnets[i]["id"]] { t.Errorf("Expected subnet%d '%s' in result: %v", i, subnets[i]["id"], result) return } } // test implicit routing table - when subnets are not explicitly linked to a table they should use main constructedRouteTables = constructRouteTables(map[string]bool{}) awsServices.ec2.RemoveRouteTables() for _, rt := range constructedRouteTables { awsServices.ec2.CreateRouteTable(rt) } result, err = c.findELBSubnets(false) if err != nil { t.Errorf("Error listing subnets: %v", err) return } if len(result) != 3 { t.Errorf("Expected 3 subnets but got %d", len(result)) return } resultSet = make(map[string]bool) for _, v := range result { resultSet[v] = true } for i := range subnets { if !resultSet[subnets[i]["id"]] { t.Errorf("Expected subnet%d '%s' in result: %v", i, subnets[i]["id"], result) return } } // Test with 5 subnets from 3 different AZs. // Add 2 duplicate AZ subnets lexicographically chosen one is the middle element in array to // check that we both choose the correct entry when it comes after and before another element // in the same AZ. subnets[3] = make(map[string]string) subnets[3]["id"] = "subnet-c0000000" subnets[3]["az"] = "af-south-1c" subnets[4] = make(map[string]string) subnets[4]["id"] = "subnet-c0000002" subnets[4]["az"] = "af-south-1c" constructedSubnets = constructSubnets(subnets) awsServices.ec2.RemoveSubnets() for _, subnet := range constructedSubnets { awsServices.ec2.CreateSubnet(subnet) } routeTables["subnet-c0000000"] = true routeTables["subnet-c0000002"] = true constructedRouteTables = constructRouteTables(routeTables) awsServices.ec2.RemoveRouteTables() for _, rt := range constructedRouteTables { awsServices.ec2.CreateRouteTable(rt) } result, err = c.findELBSubnets(false) if err != nil { t.Errorf("Error listing subnets: %v", err) return } if len(result) != 3 { t.Errorf("Expected 3 subnets but got %d", len(result)) return } expected := []*string{aws.String("subnet-a0000001"), aws.String("subnet-b0000001"), aws.String("subnet-c0000000")} for _, s := range result { if !contains(expected, s) { t.Errorf("Unexpected subnet '%s' found", s) return } } delete(routeTables, "subnet-c0000002") // test with 6 subnets from 3 different AZs // with 3 private subnets subnets[4] = make(map[string]string) subnets[4]["id"] = "subnet-d0000001" subnets[4]["az"] = "af-south-1a" subnets[5] = make(map[string]string) subnets[5]["id"] = "subnet-d0000002" subnets[5]["az"] = "af-south-1b" constructedSubnets = constructSubnets(subnets) awsServices.ec2.RemoveSubnets() for _, subnet := range constructedSubnets { awsServices.ec2.CreateSubnet(subnet) } routeTables["subnet-a0000001"] = false routeTables["subnet-b0000001"] = false routeTables["subnet-c0000001"] = false routeTables["subnet-c0000000"] = true routeTables["subnet-d0000001"] = true routeTables["subnet-d0000002"] = true constructedRouteTables = constructRouteTables(routeTables) awsServices.ec2.RemoveRouteTables() for _, rt := range constructedRouteTables { awsServices.ec2.CreateRouteTable(rt) } result, err = c.findELBSubnets(false) if err != nil { t.Errorf("Error listing subnets: %v", err) return } if len(result) != 3 { t.Errorf("Expected 3 subnets but got %d", len(result)) return } expected = []*string{aws.String("subnet-c0000000"), aws.String("subnet-d0000001"), aws.String("subnet-d0000002")} for _, s := range result { if !contains(expected, s) { t.Errorf("Unexpected subnet '%s' found", s) return } } } func TestIpPermissionExistsHandlesMultipleGroupIds(t *testing.T) { oldIPPermission := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("firstGroupId")}, {GroupId: aws.String("secondGroupId")}, {GroupId: aws.String("thirdGroupId")}, }, } existingIPPermission := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("secondGroupId")}, }, } newIPPermission := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("fourthGroupId")}, }, } equals := ipPermissionExists(&existingIPPermission, &oldIPPermission, false) if !equals { t.Errorf("Should have been considered equal since first is in the second array of groups") } equals = ipPermissionExists(&newIPPermission, &oldIPPermission, false) if equals { t.Errorf("Should have not been considered equal since first is not in the second array of groups") } // The first pair matches, but the second does not newIPPermission2 := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("firstGroupId")}, {GroupId: aws.String("fourthGroupId")}, }, } equals = ipPermissionExists(&newIPPermission2, &oldIPPermission, false) if equals { t.Errorf("Should have not been considered equal since first is not in the second array of groups") } } func TestIpPermissionExistsHandlesRangeSubsets(t *testing.T) { // Two existing scenarios we'll test against emptyIPPermission := ec2.IpPermission{} oldIPPermission := ec2.IpPermission{ IpRanges: []*ec2.IpRange{ {CidrIp: aws.String("10.0.0.0/8")}, {CidrIp: aws.String("192.168.1.0/24")}, }, } // Two already existing ranges and a new one existingIPPermission := ec2.IpPermission{ IpRanges: []*ec2.IpRange{ {CidrIp: aws.String("10.0.0.0/8")}, }, } existingIPPermission2 := ec2.IpPermission{ IpRanges: []*ec2.IpRange{ {CidrIp: aws.String("192.168.1.0/24")}, }, } newIPPermission := ec2.IpPermission{ IpRanges: []*ec2.IpRange{ {CidrIp: aws.String("172.16.0.0/16")}, }, } exists := ipPermissionExists(&emptyIPPermission, &emptyIPPermission, false) if !exists { t.Errorf("Should have been considered existing since we're comparing a range array against itself") } exists = ipPermissionExists(&oldIPPermission, &oldIPPermission, false) if !exists { t.Errorf("Should have been considered existing since we're comparing a range array against itself") } exists = ipPermissionExists(&existingIPPermission, &oldIPPermission, false) if !exists { t.Errorf("Should have been considered existing since 10.* is in oldIPPermission's array of ranges") } exists = ipPermissionExists(&existingIPPermission2, &oldIPPermission, false) if !exists { t.Errorf("Should have been considered existing since 192.* is in oldIpPermission2's array of ranges") } exists = ipPermissionExists(&newIPPermission, &emptyIPPermission, false) if exists { t.Errorf("Should have not been considered existing since we compared against a missing array of ranges") } exists = ipPermissionExists(&newIPPermission, &oldIPPermission, false) if exists { t.Errorf("Should have not been considered existing since 172.* is not in oldIPPermission's array of ranges") } } func TestIpPermissionExistsHandlesMultipleGroupIdsWithUserIds(t *testing.T) { oldIPPermission := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("firstGroupId"), UserId: aws.String("firstUserId")}, {GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, {GroupId: aws.String("thirdGroupId"), UserId: aws.String("thirdUserId")}, }, } existingIPPermission := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("secondGroupId"), UserId: aws.String("secondUserId")}, }, } newIPPermission := ec2.IpPermission{ UserIdGroupPairs: []*ec2.UserIdGroupPair{ {GroupId: aws.String("secondGroupId"), UserId: aws.String("anotherUserId")}, }, } equals := ipPermissionExists(&existingIPPermission, &oldIPPermission, true) if !equals { t.Errorf("Should have been considered equal since first is in the second array of groups") } equals = ipPermissionExists(&newIPPermission, &oldIPPermission, true) if equals { t.Errorf("Should have not been considered equal since first is not in the second array of groups") } } func TestFindInstanceByNodeNameExcludesTerminatedInstances(t *testing.T) { awsStates := []struct { id int64 state string expected bool }{ {0, ec2.InstanceStateNamePending, true}, {16, ec2.InstanceStateNameRunning, true}, {32, ec2.InstanceStateNameShuttingDown, true}, {48, ec2.InstanceStateNameTerminated, false}, {64, ec2.InstanceStateNameStopping, true}, {80, ec2.InstanceStateNameStopped, true}, } awsServices := newMockedFakeAWSServices(TestClusterID) nodeName := types.NodeName("my-dns.internal") var tag ec2.Tag tag.Key = aws.String(TagNameKubernetesClusterLegacy) tag.Value = aws.String(TestClusterID) tags := []*ec2.Tag{&tag} var testInstance ec2.Instance testInstance.PrivateDnsName = aws.String(string(nodeName)) testInstance.Tags = tags awsDefaultInstances := awsServices.instances for _, awsState := range awsStates { id := "i-" + awsState.state testInstance.InstanceId = aws.String(id) testInstance.State = &ec2.InstanceState{Code: aws.Int64(awsState.id), Name: aws.String(awsState.state)} awsServices.instances = append(awsDefaultInstances, &testInstance) c, err := newAWSCloud(CloudConfig{}, awsServices) if err != nil { t.Errorf("Error building aws cloud: %v", err) return } resultInstance, err := c.findInstanceByNodeName(nodeName) if awsState.expected { if err != nil || resultInstance == nil { t.Errorf("Expected to find instance %v", *testInstance.InstanceId) return } if *resultInstance.InstanceId != *testInstance.InstanceId { t.Errorf("Wrong instance returned by findInstanceByNodeName() expected: %v, actual: %v", *testInstance.InstanceId, *resultInstance.InstanceId) return } } else { if err == nil && resultInstance != nil { t.Errorf("Did not expect to find instance %v", *resultInstance.InstanceId) return } } } } func TestGetInstanceByNodeNameBatching(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) var tag ec2.Tag tag.Key = aws.String(TagNameKubernetesClusterPrefix + TestClusterID) tag.Value = aws.String("") tags := []*ec2.Tag{&tag} nodeNames := []string{} for i := 0; i < 200; i++ { nodeName := fmt.Sprintf("ip-171-20-42-%d.ec2.internal", i) nodeNames = append(nodeNames, nodeName) ec2Instance := &ec2.Instance{} instanceID := fmt.Sprintf("i-abcedf%d", i) ec2Instance.InstanceId = aws.String(instanceID) ec2Instance.PrivateDnsName = aws.String(nodeName) ec2Instance.State = &ec2.InstanceState{Code: aws.Int64(48), Name: aws.String("running")} ec2Instance.Tags = tags awsServices.instances = append(awsServices.instances, ec2Instance) } instances, err := c.getInstancesByNodeNames(nodeNames) assert.Nil(t, err, "Error getting instances by nodeNames %v: %v", nodeNames, err) assert.NotEmpty(t, instances) assert.Equal(t, 200, len(instances), "Expected 200 but got less") } func TestGetVolumeLabels(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) volumeID := EBSVolumeID("vol-VolumeId") expectedVolumeRequest := &ec2.DescribeVolumesInput{VolumeIds: []*string{volumeID.awsString()}} awsServices.ec2.(*MockedFakeEC2).On("DescribeVolumes", expectedVolumeRequest).Return([]*ec2.Volume{ { VolumeId: volumeID.awsString(), AvailabilityZone: aws.String("us-east-1a"), }, }) labels, err := c.GetVolumeLabels(KubernetesVolumeID("aws:///" + string(volumeID))) assert.Nil(t, err, "Error creating Volume %v", err) assert.Equal(t, map[string]string{ v1.LabelFailureDomainBetaZone: "us-east-1a", v1.LabelFailureDomainBetaRegion: "us-east-1"}, labels) awsServices.ec2.(*MockedFakeEC2).AssertExpectations(t) } func TestGetLabelsForVolume(t *testing.T) { defaultVolume := EBSVolumeID("vol-VolumeId").awsString() tests := []struct { name string pv *v1.PersistentVolume expectedVolumeID *string expectedEC2Volumes []*ec2.Volume expectedLabels map[string]string expectedError error }{ { "not an EBS volume", &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{}, }, nil, nil, nil, nil, }, { "volume which is being provisioned", &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{ VolumeID: cloudvolume.ProvisionedVolumeName, }, }, }, }, nil, nil, nil, nil, }, { "no volumes found", &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{ VolumeID: "vol-VolumeId", }, }, }, }, defaultVolume, nil, nil, fmt.Errorf("no volumes found"), }, { "correct labels for volume", &v1.PersistentVolume{ Spec: v1.PersistentVolumeSpec{ PersistentVolumeSource: v1.PersistentVolumeSource{ AWSElasticBlockStore: &v1.AWSElasticBlockStoreVolumeSource{ VolumeID: "vol-VolumeId", }, }, }, }, defaultVolume, []*ec2.Volume{{ VolumeId: defaultVolume, AvailabilityZone: aws.String("us-east-1a"), }}, map[string]string{ v1.LabelFailureDomainBetaZone: "us-east-1a", v1.LabelFailureDomainBetaRegion: "us-east-1", }, nil, }, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) expectedVolumeRequest := &ec2.DescribeVolumesInput{VolumeIds: []*string{test.expectedVolumeID}} awsServices.ec2.(*MockedFakeEC2).On("DescribeVolumes", expectedVolumeRequest).Return(test.expectedEC2Volumes) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) l, err := c.GetLabelsForVolume(context.TODO(), test.pv) assert.Equal(t, test.expectedLabels, l) assert.Equal(t, test.expectedError, err) }) } } func TestDescribeLoadBalancerOnDelete(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) awsServices.elb.(*MockedFakeELB).expectDescribeLoadBalancers("aid") c.EnsureLoadBalancerDeleted(context.TODO(), TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}) } func TestDescribeLoadBalancerOnUpdate(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) awsServices.elb.(*MockedFakeELB).expectDescribeLoadBalancers("aid") c.UpdateLoadBalancer(context.TODO(), TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) } func TestDescribeLoadBalancerOnGet(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) awsServices.elb.(*MockedFakeELB).expectDescribeLoadBalancers("aid") c.GetLoadBalancer(context.TODO(), TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}) } func TestDescribeLoadBalancerOnEnsure(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) awsServices.elb.(*MockedFakeELB).expectDescribeLoadBalancers("aid") c.EnsureLoadBalancer(context.TODO(), TestClusterName, &v1.Service{ObjectMeta: metav1.ObjectMeta{Name: "myservice", UID: "id"}}, []*v1.Node{}) } func TestCheckProtocol(t *testing.T) { tests := []struct { name string annotations map[string]string port v1.ServicePort wantErr error }{ { name: "TCP with ELB", annotations: make(map[string]string), port: v1.ServicePort{Protocol: v1.ProtocolTCP, Port: int32(8080)}, wantErr: nil, }, { name: "TCP with NLB", annotations: map[string]string{ServiceAnnotationLoadBalancerType: "nlb"}, port: v1.ServicePort{Protocol: v1.ProtocolTCP, Port: int32(8080)}, wantErr: nil, }, { name: "UDP with ELB", annotations: make(map[string]string), port: v1.ServicePort{Protocol: v1.ProtocolUDP, Port: int32(8080)}, wantErr: fmt.Errorf("Protocol UDP not supported by load balancer"), }, { name: "UDP with NLB", annotations: map[string]string{ServiceAnnotationLoadBalancerType: "nlb"}, port: v1.ServicePort{Protocol: v1.ProtocolUDP, Port: int32(8080)}, wantErr: nil, }, } for _, test := range tests { tt := test t.Run(tt.name, func(t *testing.T) { t.Parallel() err := checkProtocol(tt.port, tt.annotations) if tt.wantErr != nil && err == nil { t.Errorf("Expected error: want=%s got =%s", tt.wantErr, err) } if tt.wantErr == nil && err != nil { t.Errorf("Unexpected error: want=%s got =%s", tt.wantErr, err) } }) } } func TestBuildListener(t *testing.T) { tests := []struct { name string lbPort int64 portName string instancePort int64 backendProtocolAnnotation string certAnnotation string sslPortAnnotation string expectError bool lbProtocol string instanceProtocol string certID string }{ { "No cert or BE protocol annotation, passthrough", 80, "", 7999, "", "", "", false, "tcp", "tcp", "", }, { "Cert annotation without BE protocol specified, SSL->TCP", 80, "", 8000, "", "cert", "", false, "ssl", "tcp", "cert", }, { "BE protocol without cert annotation, passthrough", 443, "", 8001, "https", "", "", false, "tcp", "tcp", "", }, { "Invalid cert annotation, bogus backend protocol", 443, "", 8002, "bacon", "foo", "", true, "tcp", "tcp", "", }, { "Invalid cert annotation, protocol followed by equal sign", 443, "", 8003, "http=", "=", "", true, "tcp", "tcp", "", }, { "HTTPS->HTTPS", 443, "", 8004, "https", "cert", "", false, "https", "https", "cert", }, { "HTTPS->HTTP", 443, "", 8005, "http", "cert", "", false, "https", "http", "cert", }, { "SSL->SSL", 443, "", 8006, "ssl", "cert", "", false, "ssl", "ssl", "cert", }, { "SSL->TCP", 443, "", 8007, "tcp", "cert", "", false, "ssl", "tcp", "cert", }, { "Port in whitelist", 1234, "", 8008, "tcp", "cert", "1234,5678", false, "ssl", "tcp", "cert", }, { "Port not in whitelist, passthrough", 443, "", 8009, "tcp", "cert", "1234,5678", false, "tcp", "tcp", "", }, { "Named port in whitelist", 1234, "bar", 8010, "tcp", "cert", "foo,bar", false, "ssl", "tcp", "cert", }, { "Named port not in whitelist, passthrough", 443, "", 8011, "tcp", "cert", "foo,bar", false, "tcp", "tcp", "", }, { "HTTP->HTTP", 80, "", 8012, "http", "", "", false, "http", "http", "", }, } for _, test := range tests { t.Logf("Running test case %s", test.name) annotations := make(map[string]string) if test.backendProtocolAnnotation != "" { annotations[ServiceAnnotationLoadBalancerBEProtocol] = test.backendProtocolAnnotation } if test.certAnnotation != "" { annotations[ServiceAnnotationLoadBalancerCertificate] = test.certAnnotation } ports := getPortSets(test.sslPortAnnotation) l, err := buildListener(v1.ServicePort{ NodePort: int32(test.instancePort), Port: int32(test.lbPort), Name: test.portName, Protocol: v1.Protocol("tcp"), }, annotations, ports) if test.expectError { if err == nil { t.Errorf("Should error for case %s", test.name) } } else { if err != nil { t.Errorf("Should succeed for case: %s, got %v", test.name, err) } else { var cert *string if test.certID != "" { cert = &test.certID } expected := &elb.Listener{ InstancePort: &test.instancePort, InstanceProtocol: &test.instanceProtocol, LoadBalancerPort: &test.lbPort, Protocol: &test.lbProtocol, SSLCertificateId: cert, } if !reflect.DeepEqual(l, expected) { t.Errorf("Incorrect listener (%v vs expected %v) for case: %s", l, expected, test.name) } } } } } func TestProxyProtocolEnabled(t *testing.T) { policies := sets.NewString(ProxyProtocolPolicyName, "FooBarFoo") fakeBackend := &elb.BackendServerDescription{ InstancePort: aws.Int64(80), PolicyNames: stringSetToPointers(policies), } result := proxyProtocolEnabled(fakeBackend) assert.True(t, result, "expected to find %s in %s", ProxyProtocolPolicyName, policies) policies = sets.NewString("FooBarFoo") fakeBackend = &elb.BackendServerDescription{ InstancePort: aws.Int64(80), PolicyNames: []*string{ aws.String("FooBarFoo"), }, } result = proxyProtocolEnabled(fakeBackend) assert.False(t, result, "did not expect to find %s in %s", ProxyProtocolPolicyName, policies) policies = sets.NewString() fakeBackend = &elb.BackendServerDescription{ InstancePort: aws.Int64(80), } result = proxyProtocolEnabled(fakeBackend) assert.False(t, result, "did not expect to find %s in %s", ProxyProtocolPolicyName, policies) } func TestGetKeyValuePropertiesFromAnnotation(t *testing.T) { tagTests := []struct { Annotations map[string]string Tags map[string]string }{ { Annotations: map[string]string{ ServiceAnnotationLoadBalancerAdditionalTags: "Key=Val", }, Tags: map[string]string{ "Key": "Val", }, }, { Annotations: map[string]string{ ServiceAnnotationLoadBalancerAdditionalTags: "Key1=Val1, Key2=Val2", }, Tags: map[string]string{ "Key1": "Val1", "Key2": "Val2", }, }, { Annotations: map[string]string{ ServiceAnnotationLoadBalancerAdditionalTags: "Key1=, Key2=Val2", "anotherKey": "anotherValue", }, Tags: map[string]string{ "Key1": "", "Key2": "Val2", }, }, { Annotations: map[string]string{ "Nothing": "Key1=, Key2=Val2, Key3", }, Tags: map[string]string{}, }, { Annotations: map[string]string{ ServiceAnnotationLoadBalancerAdditionalTags: "K=V K1=V2,Key1========, =====, ======Val, =Val, , 234,", }, Tags: map[string]string{ "K": "V K1", "Key1": "", "234": "", }, }, } for _, tagTest := range tagTests { result := getKeyValuePropertiesFromAnnotation(tagTest.Annotations, ServiceAnnotationLoadBalancerAdditionalTags) for k, v := range result { if len(result) != len(tagTest.Tags) { t.Errorf("incorrect expected length: %v != %v", result, tagTest.Tags) continue } if tagTest.Tags[k] != v { t.Errorf("%s != %s", tagTest.Tags[k], v) continue } } } } func TestLBExtraSecurityGroupsAnnotation(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) sg1 := map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: "sg-000001"} sg2 := map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: "sg-000002"} sg3 := map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: "sg-000001, sg-000002"} tests := []struct { name string annotations map[string]string expectedSGs []string }{ {"No extra SG annotation", map[string]string{}, []string{}}, {"Empty extra SGs specified", map[string]string{ServiceAnnotationLoadBalancerExtraSecurityGroups: ", ,,"}, []string{}}, {"SG specified", sg1, []string{sg1[ServiceAnnotationLoadBalancerExtraSecurityGroups]}}, {"Multiple SGs specified", sg3, []string{sg1[ServiceAnnotationLoadBalancerExtraSecurityGroups], sg2[ServiceAnnotationLoadBalancerExtraSecurityGroups]}}, } awsServices.ec2.(*MockedFakeEC2).expectDescribeSecurityGroups(TestClusterID, "k8s-elb-aid") for _, test := range tests { t.Run(test.name, func(t *testing.T) { serviceName := types.NamespacedName{Namespace: "default", Name: "myservice"} sgList, setupSg, err := c.buildELBSecurityGroupList(serviceName, "aid", test.annotations) assert.NoError(t, err, "buildELBSecurityGroupList failed") extraSGs := sgList[1:] assert.True(t, sets.NewString(test.expectedSGs...).Equal(sets.NewString(extraSGs...)), "Security Groups expected=%q , returned=%q", test.expectedSGs, extraSGs) assert.True(t, setupSg, "Security Groups Setup Permissions Flag expected=%t , returned=%t", true, setupSg) }) } } func TestLBSecurityGroupsAnnotation(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) sg1 := map[string]string{ServiceAnnotationLoadBalancerSecurityGroups: "sg-000001"} sg2 := map[string]string{ServiceAnnotationLoadBalancerSecurityGroups: "sg-000002"} sg3 := map[string]string{ServiceAnnotationLoadBalancerSecurityGroups: "sg-000001, sg-000002"} tests := []struct { name string annotations map[string]string expectedSGs []string }{ {"SG specified", sg1, []string{sg1[ServiceAnnotationLoadBalancerSecurityGroups]}}, {"Multiple SGs specified", sg3, []string{sg1[ServiceAnnotationLoadBalancerSecurityGroups], sg2[ServiceAnnotationLoadBalancerSecurityGroups]}}, } awsServices.ec2.(*MockedFakeEC2).expectDescribeSecurityGroups(TestClusterID, "k8s-elb-aid") for _, test := range tests { t.Run(test.name, func(t *testing.T) { serviceName := types.NamespacedName{Namespace: "default", Name: "myservice"} sgList, setupSg, err := c.buildELBSecurityGroupList(serviceName, "aid", test.annotations) assert.NoError(t, err, "buildELBSecurityGroupList failed") assert.True(t, sets.NewString(test.expectedSGs...).Equal(sets.NewString(sgList...)), "Security Groups expected=%q , returned=%q", test.expectedSGs, sgList) assert.False(t, setupSg, "Security Groups Setup Permissions Flag expected=%t , returned=%t", false, setupSg) }) } } // Test that we can add a load balancer tag func TestAddLoadBalancerTags(t *testing.T) { loadBalancerName := "test-elb" awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) want := make(map[string]string) want["tag1"] = "val1" expectedAddTagsRequest := &elb.AddTagsInput{ LoadBalancerNames: []*string{&loadBalancerName}, Tags: []*elb.Tag{ { Key: aws.String("tag1"), Value: aws.String("val1"), }, }, } awsServices.elb.(*MockedFakeELB).On("AddTags", expectedAddTagsRequest).Return(&elb.AddTagsOutput{}) err := c.addLoadBalancerTags(loadBalancerName, want) assert.Nil(t, err, "Error adding load balancer tags: %v", err) awsServices.elb.(*MockedFakeELB).AssertExpectations(t) } func TestEnsureLoadBalancerHealthCheck(t *testing.T) { tests := []struct { name string annotations map[string]string want elb.HealthCheck }{ { name: "falls back to HC defaults", annotations: map[string]string{}, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("TCP:8080"), }, }, { name: "healthy threshold override", annotations: map[string]string{ServiceAnnotationLoadBalancerHCHealthyThreshold: "7"}, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(7), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("TCP:8080"), }, }, { name: "unhealthy threshold override", annotations: map[string]string{ServiceAnnotationLoadBalancerHCUnhealthyThreshold: "7"}, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(7), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("TCP:8080"), }, }, { name: "timeout override", annotations: map[string]string{ServiceAnnotationLoadBalancerHCTimeout: "7"}, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(7), Interval: aws.Int64(10), Target: aws.String("TCP:8080"), }, }, { name: "interval override", annotations: map[string]string{ServiceAnnotationLoadBalancerHCInterval: "7"}, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(7), Target: aws.String("TCP:8080"), }, }, { name: "healthcheck port override", annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckPort: "2122", }, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("TCP:2122"), }, }, { name: "healthcheck protocol override", annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "HTTP", }, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("HTTP:8080/"), }, }, { name: "healthcheck protocol, port, path override", annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "HTTPS", ServiceAnnotationLoadBalancerHealthCheckPath: "/healthz", ServiceAnnotationLoadBalancerHealthCheckPort: "31224", }, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("HTTPS:31224/healthz"), }, }, { name: "healthcheck protocol SSL", annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "SSL", ServiceAnnotationLoadBalancerHealthCheckPath: "/healthz", ServiceAnnotationLoadBalancerHealthCheckPort: "3124", }, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("SSL:3124"), }, }, { name: "healthcheck port annotation traffic-port", annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "TCP", ServiceAnnotationLoadBalancerHealthCheckPort: "traffic-port", }, want: elb.HealthCheck{ HealthyThreshold: aws.Int64(2), UnhealthyThreshold: aws.Int64(6), Timeout: aws.Int64(5), Interval: aws.Int64(10), Target: aws.String("TCP:8080"), }, }, } lbName := "myLB" // this HC will always differ from the expected HC and thus it is expected an // API call will be made to update it currentHC := &elb.HealthCheck{} elbDesc := &elb.LoadBalancerDescription{LoadBalancerName: &lbName, HealthCheck: currentHC} defaultHealthyThreshold := int64(2) defaultUnhealthyThreshold := int64(6) defaultTimeout := int64(5) defaultInterval := int64(10) protocol, path, port := "TCP", "", int32(8080) target := "TCP:8080" defaultHC := &elb.HealthCheck{ HealthyThreshold: &defaultHealthyThreshold, UnhealthyThreshold: &defaultUnhealthyThreshold, Timeout: &defaultTimeout, Interval: &defaultInterval, Target: &target, } for _, test := range tests { t.Run(test.name, func(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) expectedHC := test.want awsServices.elb.(*MockedFakeELB).expectConfigureHealthCheck(&lbName, &expectedHC, nil) err = c.ensureLoadBalancerHealthCheck(elbDesc, protocol, port, path, test.annotations) require.NoError(t, err) awsServices.elb.(*MockedFakeELB).AssertExpectations(t) }) } t.Run("does not make an API call if the current health check is the same", func(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) expectedHC := *defaultHC timeout := int64(3) expectedHC.Timeout = &timeout annotations := map[string]string{ServiceAnnotationLoadBalancerHCTimeout: "3"} var currentHC elb.HealthCheck currentHC = expectedHC // NOTE no call expectations are set on the ELB mock // test default HC elbDesc := &elb.LoadBalancerDescription{LoadBalancerName: &lbName, HealthCheck: defaultHC} err = c.ensureLoadBalancerHealthCheck(elbDesc, protocol, port, path, map[string]string{}) assert.NoError(t, err) // test HC with override elbDesc = &elb.LoadBalancerDescription{LoadBalancerName: &lbName, HealthCheck: &currentHC} err = c.ensureLoadBalancerHealthCheck(elbDesc, protocol, port, path, annotations) assert.NoError(t, err) }) t.Run("validates resulting expected health check before making an API call", func(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) expectedHC := *defaultHC invalidThreshold := int64(1) expectedHC.HealthyThreshold = &invalidThreshold require.Error(t, expectedHC.Validate()) // confirm test precondition annotations := map[string]string{ServiceAnnotationLoadBalancerHCTimeout: "1"} // NOTE no call expectations are set on the ELB mock err = c.ensureLoadBalancerHealthCheck(elbDesc, protocol, port, path, annotations) require.Error(t, err) }) t.Run("handles invalid override values", func(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) annotations := map[string]string{ServiceAnnotationLoadBalancerHCTimeout: "3.3"} // NOTE no call expectations are set on the ELB mock err = c.ensureLoadBalancerHealthCheck(elbDesc, protocol, port, path, annotations) require.Error(t, err) }) t.Run("returns error when updating the health check fails", func(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, awsServices) assert.Nil(t, err, "Error building aws cloud: %v", err) returnErr := fmt.Errorf("throttling error") awsServices.elb.(*MockedFakeELB).expectConfigureHealthCheck(&lbName, defaultHC, returnErr) err = c.ensureLoadBalancerHealthCheck(elbDesc, protocol, port, path, map[string]string{}) require.Error(t, err) awsServices.elb.(*MockedFakeELB).AssertExpectations(t) }) } func TestFindSecurityGroupForInstance(t *testing.T) { groups := map[string]*ec2.SecurityGroup{"sg123": {GroupId: aws.String("sg123")}} id, err := findSecurityGroupForInstance(&ec2.Instance{SecurityGroups: []*ec2.GroupIdentifier{{GroupId: aws.String("sg123"), GroupName: aws.String("my_group")}}}, groups) if err != nil { t.Error() } assert.Equal(t, *id.GroupId, "sg123") assert.Equal(t, *id.GroupName, "my_group") } func TestFindSecurityGroupForInstanceMultipleTagged(t *testing.T) { groups := map[string]*ec2.SecurityGroup{"sg123": {GroupId: aws.String("sg123")}} _, err := findSecurityGroupForInstance(&ec2.Instance{ SecurityGroups: []*ec2.GroupIdentifier{ {GroupId: aws.String("sg123"), GroupName: aws.String("my_group")}, {GroupId: aws.String("sg123"), GroupName: aws.String("another_group")}, }, }, groups) require.Error(t, err) assert.Contains(t, err.Error(), "sg123(my_group)") assert.Contains(t, err.Error(), "sg123(another_group)") } func TestCreateDisk(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) c, _ := newAWSCloud(CloudConfig{}, awsServices) volumeOptions := &VolumeOptions{ AvailabilityZone: "us-east-1a", CapacityGB: 10, } request := &ec2.CreateVolumeInput{ AvailabilityZone: aws.String("us-east-1a"), Encrypted: aws.Bool(false), VolumeType: aws.String(DefaultVolumeType), Size: aws.Int64(10), TagSpecifications: []*ec2.TagSpecification{ {ResourceType: aws.String(ec2.ResourceTypeVolume), Tags: []*ec2.Tag{ // CreateVolume from MockedFakeEC2 expects sorted tags, so we need to // always have these tags sorted: {Key: aws.String(TagNameKubernetesClusterLegacy), Value: aws.String(TestClusterID)}, {Key: aws.String(fmt.Sprintf("%s%s", TagNameKubernetesClusterPrefix, TestClusterID)), Value: aws.String(ResourceLifecycleOwned)}, }}, }, } volume := &ec2.Volume{ AvailabilityZone: aws.String("us-east-1a"), VolumeId: aws.String("vol-volumeId0"), State: aws.String("available"), } awsServices.ec2.(*MockedFakeEC2).On("CreateVolume", request).Return(volume, nil) describeVolumesRequest := &ec2.DescribeVolumesInput{ VolumeIds: []*string{aws.String("vol-volumeId0")}, } awsServices.ec2.(*MockedFakeEC2).On("DescribeVolumes", describeVolumesRequest).Return([]*ec2.Volume{volume}, nil) volumeID, err := c.CreateDisk(volumeOptions) assert.Nil(t, err, "Error creating disk: %v", err) assert.Equal(t, volumeID, KubernetesVolumeID("aws://us-east-1a/vol-volumeId0")) awsServices.ec2.(*MockedFakeEC2).AssertExpectations(t) } func TestRegionIsValid(t *testing.T) { fake := newMockedFakeAWSServices("fakeCluster") fake.selfInstance.Placement = &ec2.Placement{ AvailabilityZone: aws.String("pl-fake-999a"), } // This is the legacy list that was removed, using this to ensure we avoid // region regressions if something goes wrong in the SDK regions := []string{ "ap-northeast-1", "ap-northeast-2", "ap-northeast-3", "ap-south-1", "ap-southeast-1", "ap-southeast-2", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-west-3", "sa-east-1", "us-east-1", "us-east-2", "us-west-1", "us-west-2", "cn-north-1", "cn-northwest-1", "us-gov-west-1", "ap-northeast-3", // Ensures that we always trust what the metadata service returns "pl-fake-999", } for _, region := range regions { assert.True(t, isRegionValid(region, fake.metadata), "expected region '%s' to be valid but it was not", region) } assert.False(t, isRegionValid("pl-fake-991a", fake.metadata), "expected region 'pl-fake-991' to be invalid but it was not") } func TestNodeNameToProviderID(t *testing.T) { testNodeName := types.NodeName("ip-10-0-0-1.ec2.internal") testProviderID := "aws:///us-east-1c/i-02bce90670bb0c7cd" fakeAWS := newMockedFakeAWSServices(TestClusterID) c, err := newAWSCloud(CloudConfig{}, fakeAWS) assert.NoError(t, err) fakeClient := &fake.Clientset{} fakeInformerFactory := informers.NewSharedInformerFactory(fakeClient, 0) c.SetInformers(fakeInformerFactory) // no node name _, err = c.nodeNameToProviderID("") assert.Error(t, err) // informer has not synced c.nodeInformerHasSynced = informerNotSynced _, err = c.nodeNameToProviderID(testNodeName) assert.Error(t, err) // informer has synced but node not found c.nodeInformerHasSynced = informerSynced _, err = c.nodeNameToProviderID(testNodeName) assert.Error(t, err) // we are able to find the node in cache err = c.nodeInformer.Informer().GetStore().Add(&v1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: string(testNodeName), }, Spec: v1.NodeSpec{ ProviderID: testProviderID, }, }) assert.NoError(t, err) _, err = c.nodeNameToProviderID(testNodeName) assert.NoError(t, err) } func informerSynced() bool { return true } func informerNotSynced() bool { return false } type MockedFakeELBV2 struct { LoadBalancers []*elbv2.LoadBalancer TargetGroups []*elbv2.TargetGroup Listeners []*elbv2.Listener // keys on all of these maps are ARNs LoadBalancerAttributes map[string]map[string]string Tags map[string][]elbv2.Tag RegisteredInstances map[string][]string // value is list of instance IDs } func (m *MockedFakeELBV2) AddTags(request *elbv2.AddTagsInput) (*elbv2.AddTagsOutput, error) { for _, arn := range request.ResourceArns { for _, tag := range request.Tags { m.Tags[aws.StringValue(arn)] = append(m.Tags[aws.StringValue(arn)], *tag) } } return &elbv2.AddTagsOutput{}, nil } func (m *MockedFakeELBV2) CreateLoadBalancer(request *elbv2.CreateLoadBalancerInput) (*elbv2.CreateLoadBalancerOutput, error) { accountID := 123456789 arn := fmt.Sprintf("arn:aws:elasticloadbalancing:us-east-1:%d:loadbalancer/net/%x/%x", accountID, rand.Uint64(), rand.Uint32()) newLB := &elbv2.LoadBalancer{ LoadBalancerArn: aws.String(arn), LoadBalancerName: request.Name, Type: aws.String(elbv2.LoadBalancerTypeEnumNetwork), VpcId: aws.String("vpc-abc123def456abc78"), } m.LoadBalancers = append(m.LoadBalancers, newLB) return &elbv2.CreateLoadBalancerOutput{ LoadBalancers: []*elbv2.LoadBalancer{newLB}, }, nil } func (m *MockedFakeELBV2) DescribeLoadBalancers(request *elbv2.DescribeLoadBalancersInput) (*elbv2.DescribeLoadBalancersOutput, error) { findMeNames := make(map[string]bool) for _, name := range request.Names { findMeNames[aws.StringValue(name)] = true } findMeARNs := make(map[string]bool) for _, arn := range request.LoadBalancerArns { findMeARNs[aws.StringValue(arn)] = true } result := []*elbv2.LoadBalancer{} for _, lb := range m.LoadBalancers { if _, present := findMeNames[aws.StringValue(lb.LoadBalancerName)]; present { result = append(result, lb) delete(findMeNames, aws.StringValue(lb.LoadBalancerName)) } else if _, present := findMeARNs[aws.StringValue(lb.LoadBalancerArn)]; present { result = append(result, lb) delete(findMeARNs, aws.StringValue(lb.LoadBalancerArn)) } } if len(findMeNames) > 0 || len(findMeARNs) > 0 { return nil, awserr.New(elbv2.ErrCodeLoadBalancerNotFoundException, "not found", nil) } return &elbv2.DescribeLoadBalancersOutput{ LoadBalancers: result, }, nil } func (m *MockedFakeELBV2) DeleteLoadBalancer(*elbv2.DeleteLoadBalancerInput) (*elbv2.DeleteLoadBalancerOutput, error) { panic("Not implemented") } func (m *MockedFakeELBV2) ModifyLoadBalancerAttributes(request *elbv2.ModifyLoadBalancerAttributesInput) (*elbv2.ModifyLoadBalancerAttributesOutput, error) { attrMap, present := m.LoadBalancerAttributes[aws.StringValue(request.LoadBalancerArn)] if !present { attrMap = make(map[string]string) m.LoadBalancerAttributes[aws.StringValue(request.LoadBalancerArn)] = attrMap } for _, attr := range request.Attributes { attrMap[aws.StringValue(attr.Key)] = aws.StringValue(attr.Value) } return &elbv2.ModifyLoadBalancerAttributesOutput{ Attributes: request.Attributes, }, nil } func (m *MockedFakeELBV2) DescribeLoadBalancerAttributes(request *elbv2.DescribeLoadBalancerAttributesInput) (*elbv2.DescribeLoadBalancerAttributesOutput, error) { attrs := []*elbv2.LoadBalancerAttribute{} if lbAttrs, present := m.LoadBalancerAttributes[aws.StringValue(request.LoadBalancerArn)]; present { for key, value := range lbAttrs { attrs = append(attrs, &elbv2.LoadBalancerAttribute{ Key: aws.String(key), Value: aws.String(value), }) } } return &elbv2.DescribeLoadBalancerAttributesOutput{ Attributes: attrs, }, nil } func (m *MockedFakeELBV2) CreateTargetGroup(request *elbv2.CreateTargetGroupInput) (*elbv2.CreateTargetGroupOutput, error) { accountID := 123456789 arn := fmt.Sprintf("arn:aws:elasticloadbalancing:us-east-1:%d:targetgroup/%x/%x", accountID, rand.Uint64(), rand.Uint32()) newTG := &elbv2.TargetGroup{ TargetGroupArn: aws.String(arn), TargetGroupName: request.Name, Port: request.Port, Protocol: request.Protocol, HealthCheckProtocol: request.HealthCheckProtocol, HealthCheckPath: request.HealthCheckPath, HealthCheckPort: request.HealthCheckPort, HealthCheckTimeoutSeconds: request.HealthCheckTimeoutSeconds, HealthCheckIntervalSeconds: request.HealthCheckIntervalSeconds, HealthyThresholdCount: request.HealthyThresholdCount, UnhealthyThresholdCount: request.UnhealthyThresholdCount, } m.TargetGroups = append(m.TargetGroups, newTG) return &elbv2.CreateTargetGroupOutput{ TargetGroups: []*elbv2.TargetGroup{newTG}, }, nil } func (m *MockedFakeELBV2) DescribeTargetGroups(request *elbv2.DescribeTargetGroupsInput) (*elbv2.DescribeTargetGroupsOutput, error) { var targetGroups []*elbv2.TargetGroup if request.LoadBalancerArn != nil { targetGroups = []*elbv2.TargetGroup{} for _, tg := range m.TargetGroups { for _, lbArn := range tg.LoadBalancerArns { if aws.StringValue(lbArn) == aws.StringValue(request.LoadBalancerArn) { targetGroups = append(targetGroups, tg) break } } } } else if len(request.Names) != 0 { targetGroups = []*elbv2.TargetGroup{} for _, tg := range m.TargetGroups { for _, name := range request.Names { if aws.StringValue(tg.TargetGroupName) == aws.StringValue(name) { targetGroups = append(targetGroups, tg) break } } } } else if len(request.TargetGroupArns) != 0 { targetGroups = []*elbv2.TargetGroup{} for _, tg := range m.TargetGroups { for _, arn := range request.TargetGroupArns { if aws.StringValue(tg.TargetGroupArn) == aws.StringValue(arn) { targetGroups = append(targetGroups, tg) break } } } } else { targetGroups = m.TargetGroups } return &elbv2.DescribeTargetGroupsOutput{ TargetGroups: targetGroups, }, nil } func (m *MockedFakeELBV2) ModifyTargetGroup(request *elbv2.ModifyTargetGroupInput) (*elbv2.ModifyTargetGroupOutput, error) { var matchingTargetGroup *elbv2.TargetGroup dirtyGroups := []*elbv2.TargetGroup{} for _, tg := range m.TargetGroups { if aws.StringValue(tg.TargetGroupArn) == aws.StringValue(request.TargetGroupArn) { matchingTargetGroup = tg break } } if matchingTargetGroup != nil { dirtyGroups = append(dirtyGroups, matchingTargetGroup) if request.HealthCheckEnabled != nil { matchingTargetGroup.HealthCheckEnabled = request.HealthCheckEnabled } if request.HealthCheckIntervalSeconds != nil { matchingTargetGroup.HealthCheckIntervalSeconds = request.HealthCheckIntervalSeconds } if request.HealthCheckPath != nil { matchingTargetGroup.HealthCheckPath = request.HealthCheckPath } if request.HealthCheckPort != nil { matchingTargetGroup.HealthCheckPort = request.HealthCheckPort } if request.HealthCheckProtocol != nil { matchingTargetGroup.HealthCheckProtocol = request.HealthCheckProtocol } if request.HealthCheckTimeoutSeconds != nil { matchingTargetGroup.HealthCheckTimeoutSeconds = request.HealthCheckTimeoutSeconds } if request.HealthyThresholdCount != nil { matchingTargetGroup.HealthyThresholdCount = request.HealthyThresholdCount } if request.Matcher != nil { matchingTargetGroup.Matcher = request.Matcher } if request.UnhealthyThresholdCount != nil { matchingTargetGroup.UnhealthyThresholdCount = request.UnhealthyThresholdCount } } return &elbv2.ModifyTargetGroupOutput{ TargetGroups: dirtyGroups, }, nil } func (m *MockedFakeELBV2) DeleteTargetGroup(request *elbv2.DeleteTargetGroupInput) (*elbv2.DeleteTargetGroupOutput, error) { newTargetGroups := []*elbv2.TargetGroup{} for _, tg := range m.TargetGroups { if aws.StringValue(tg.TargetGroupArn) != aws.StringValue(request.TargetGroupArn) { newTargetGroups = append(newTargetGroups, tg) } } m.TargetGroups = newTargetGroups delete(m.RegisteredInstances, aws.StringValue(request.TargetGroupArn)) return &elbv2.DeleteTargetGroupOutput{}, nil } func (m *MockedFakeELBV2) DescribeTargetHealth(request *elbv2.DescribeTargetHealthInput) (*elbv2.DescribeTargetHealthOutput, error) { healthDescriptions := []*elbv2.TargetHealthDescription{} var matchingTargetGroup *elbv2.TargetGroup for _, tg := range m.TargetGroups { if aws.StringValue(tg.TargetGroupArn) == aws.StringValue(request.TargetGroupArn) { matchingTargetGroup = tg break } } if registeredTargets, present := m.RegisteredInstances[aws.StringValue(request.TargetGroupArn)]; present { for _, target := range registeredTargets { healthDescriptions = append(healthDescriptions, &elbv2.TargetHealthDescription{ HealthCheckPort: matchingTargetGroup.HealthCheckPort, Target: &elbv2.TargetDescription{ Id: aws.String(target), Port: matchingTargetGroup.Port, }, TargetHealth: &elbv2.TargetHealth{ State: aws.String("healthy"), }, }) } } return &elbv2.DescribeTargetHealthOutput{ TargetHealthDescriptions: healthDescriptions, }, nil } func (m *MockedFakeELBV2) DescribeTargetGroupAttributes(*elbv2.DescribeTargetGroupAttributesInput) (*elbv2.DescribeTargetGroupAttributesOutput, error) { panic("Not implemented") } func (m *MockedFakeELBV2) ModifyTargetGroupAttributes(*elbv2.ModifyTargetGroupAttributesInput) (*elbv2.ModifyTargetGroupAttributesOutput, error) { panic("Not implemented") } func (m *MockedFakeELBV2) RegisterTargets(request *elbv2.RegisterTargetsInput) (*elbv2.RegisterTargetsOutput, error) { arn := aws.StringValue(request.TargetGroupArn) alreadyExists := make(map[string]bool) for _, targetID := range m.RegisteredInstances[arn] { alreadyExists[targetID] = true } for _, target := range request.Targets { if !alreadyExists[aws.StringValue(target.Id)] { m.RegisteredInstances[arn] = append(m.RegisteredInstances[arn], aws.StringValue(target.Id)) } } return &elbv2.RegisterTargetsOutput{}, nil } func (m *MockedFakeELBV2) DeregisterTargets(request *elbv2.DeregisterTargetsInput) (*elbv2.DeregisterTargetsOutput, error) { removeMe := make(map[string]bool) for _, target := range request.Targets { removeMe[aws.StringValue(target.Id)] = true } newRegisteredInstancesForArn := []string{} for _, targetID := range m.RegisteredInstances[aws.StringValue(request.TargetGroupArn)] { if !removeMe[targetID] { newRegisteredInstancesForArn = append(newRegisteredInstancesForArn, targetID) } } m.RegisteredInstances[aws.StringValue(request.TargetGroupArn)] = newRegisteredInstancesForArn return &elbv2.DeregisterTargetsOutput{}, nil } func (m *MockedFakeELBV2) CreateListener(request *elbv2.CreateListenerInput) (*elbv2.CreateListenerOutput, error) { accountID := 123456789 arn := fmt.Sprintf("arn:aws:elasticloadbalancing:us-east-1:%d:listener/net/%x/%x/%x", accountID, rand.Uint64(), rand.Uint32(), rand.Uint32()) newListener := &elbv2.Listener{ ListenerArn: aws.String(arn), Port: request.Port, Protocol: request.Protocol, DefaultActions: request.DefaultActions, LoadBalancerArn: request.LoadBalancerArn, } m.Listeners = append(m.Listeners, newListener) for _, tg := range m.TargetGroups { for _, action := range request.DefaultActions { if aws.StringValue(action.TargetGroupArn) == aws.StringValue(tg.TargetGroupArn) { tg.LoadBalancerArns = append(tg.LoadBalancerArns, request.LoadBalancerArn) break } } } return &elbv2.CreateListenerOutput{ Listeners: []*elbv2.Listener{newListener}, }, nil } func (m *MockedFakeELBV2) DescribeListeners(request *elbv2.DescribeListenersInput) (*elbv2.DescribeListenersOutput, error) { if len(request.ListenerArns) == 0 && request.LoadBalancerArn == nil { return &elbv2.DescribeListenersOutput{ Listeners: m.Listeners, }, nil } else if len(request.ListenerArns) == 0 { listeners := []*elbv2.Listener{} for _, lb := range m.Listeners { if aws.StringValue(lb.LoadBalancerArn) == aws.StringValue(request.LoadBalancerArn) { listeners = append(listeners, lb) } } return &elbv2.DescribeListenersOutput{ Listeners: listeners, }, nil } panic("Not implemented") } func (m *MockedFakeELBV2) DeleteListener(*elbv2.DeleteListenerInput) (*elbv2.DeleteListenerOutput, error) { panic("Not implemented") } func (m *MockedFakeELBV2) ModifyListener(request *elbv2.ModifyListenerInput) (*elbv2.ModifyListenerOutput, error) { modifiedListeners := []*elbv2.Listener{} for _, listener := range m.Listeners { if aws.StringValue(listener.ListenerArn) == aws.StringValue(request.ListenerArn) { if request.DefaultActions != nil { // for each old action, find the corresponding target group, and remove the listener's LB ARN from its list for _, action := range listener.DefaultActions { var targetGroupForAction *elbv2.TargetGroup for _, tg := range m.TargetGroups { if aws.StringValue(action.TargetGroupArn) == aws.StringValue(tg.TargetGroupArn) { targetGroupForAction = tg break } } if targetGroupForAction != nil { newLoadBalancerARNs := []*string{} for _, lbArn := range targetGroupForAction.LoadBalancerArns { if aws.StringValue(lbArn) != aws.StringValue(listener.LoadBalancerArn) { newLoadBalancerARNs = append(newLoadBalancerARNs, lbArn) } } targetGroupForAction.LoadBalancerArns = newLoadBalancerARNs } } listener.DefaultActions = request.DefaultActions // for each new action, add the listener's LB ARN to that action's target groups' lists for _, action := range request.DefaultActions { var targetGroupForAction *elbv2.TargetGroup for _, tg := range m.TargetGroups { if aws.StringValue(action.TargetGroupArn) == aws.StringValue(tg.TargetGroupArn) { targetGroupForAction = tg break } } if targetGroupForAction != nil { targetGroupForAction.LoadBalancerArns = append(targetGroupForAction.LoadBalancerArns, listener.LoadBalancerArn) } } } if request.Port != nil { listener.Port = request.Port } if request.Protocol != nil { listener.Protocol = request.Protocol } modifiedListeners = append(modifiedListeners, listener) } } return &elbv2.ModifyListenerOutput{ Listeners: modifiedListeners, }, nil } func (m *MockedFakeELBV2) WaitUntilLoadBalancersDeleted(*elbv2.DescribeLoadBalancersInput) error { panic("Not implemented") } func (m *MockedFakeEC2) maybeExpectDescribeSecurityGroups(clusterID, groupName string) { tags := []*ec2.Tag{ {Key: aws.String(TagNameKubernetesClusterLegacy), Value: aws.String(clusterID)}, {Key: aws.String(fmt.Sprintf("%s%s", TagNameKubernetesClusterPrefix, clusterID)), Value: aws.String(ResourceLifecycleOwned)}, } m.On("DescribeSecurityGroups", &ec2.DescribeSecurityGroupsInput{Filters: []*ec2.Filter{ newEc2Filter("group-name", groupName), newEc2Filter("vpc-id", ""), }}).Maybe().Return([]*ec2.SecurityGroup{{Tags: tags}}) m.On("DescribeSecurityGroups", &ec2.DescribeSecurityGroupsInput{}).Maybe().Return([]*ec2.SecurityGroup{{Tags: tags}}) } func TestNLBNodeRegistration(t *testing.T) { awsServices := newMockedFakeAWSServices(TestClusterID) awsServices.elbv2 = &MockedFakeELBV2{Tags: make(map[string][]elbv2.Tag), RegisteredInstances: make(map[string][]string), LoadBalancerAttributes: make(map[string]map[string]string)} c, _ := newAWSCloud(CloudConfig{}, awsServices) awsServices.ec2.(*MockedFakeEC2).Subnets = []*ec2.Subnet{ { AvailabilityZone: aws.String("us-west-2a"), SubnetId: aws.String("subnet-abc123de"), Tags: []*ec2.Tag{ { Key: aws.String(c.tagging.clusterTagKey()), Value: aws.String("owned"), }, }, }, } awsServices.ec2.(*MockedFakeEC2).RouteTables = []*ec2.RouteTable{ { Associations: []*ec2.RouteTableAssociation{ { Main: aws.Bool(true), RouteTableAssociationId: aws.String("rtbassoc-abc123def456abc78"), RouteTableId: aws.String("rtb-abc123def456abc78"), SubnetId: aws.String("subnet-abc123de"), }, }, RouteTableId: aws.String("rtb-abc123def456abc78"), Routes: []*ec2.Route{ { DestinationCidrBlock: aws.String("0.0.0.0/0"), GatewayId: aws.String("igw-abc123def456abc78"), State: aws.String("active"), }, }, }, } awsServices.ec2.(*MockedFakeEC2).maybeExpectDescribeSecurityGroups(TestClusterID, "k8s-elb-aid") nodes := []*v1.Node{makeNamedNode(awsServices, 0, "a"), makeNamedNode(awsServices, 1, "b"), makeNamedNode(awsServices, 2, "c")} fauxService := &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "myservice", UID: "id", Annotations: map[string]string{ "service.beta.kubernetes.io/aws-load-balancer-type": "nlb", }, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Port: 8080, NodePort: 31173, TargetPort: intstr.FromInt(31173), Protocol: v1.ProtocolTCP, }, }, SessionAffinity: v1.ServiceAffinityNone, }, } _, err := c.EnsureLoadBalancer(context.TODO(), TestClusterName, fauxService, nodes) if err != nil { t.Errorf("EnsureLoadBalancer returned an error: %v", err) } for _, instances := range awsServices.elbv2.(*MockedFakeELBV2).RegisteredInstances { if len(instances) != 3 { t.Errorf("Expected 3 nodes registered with target group, saw %d", len(instances)) } } _, err = c.EnsureLoadBalancer(context.TODO(), TestClusterName, fauxService, nodes[:2]) if err != nil { t.Errorf("EnsureLoadBalancer returned an error: %v", err) } for _, instances := range awsServices.elbv2.(*MockedFakeELBV2).RegisteredInstances { if len(instances) != 2 { t.Errorf("Expected 2 nodes registered with target group, saw %d", len(instances)) } } _, err = c.EnsureLoadBalancer(context.TODO(), TestClusterName, fauxService, nodes) if err != nil { t.Errorf("EnsureLoadBalancer returned an error: %v", err) } for _, instances := range awsServices.elbv2.(*MockedFakeELBV2).RegisteredInstances { if len(instances) != 3 { t.Errorf("Expected 3 nodes registered with target group, saw %d", len(instances)) } } fauxService.Annotations[ServiceAnnotationLoadBalancerHealthCheckProtocol] = "http" tgARN := aws.StringValue(awsServices.elbv2.(*MockedFakeELBV2).Listeners[0].DefaultActions[0].TargetGroupArn) _, err = c.EnsureLoadBalancer(context.TODO(), TestClusterName, fauxService, nodes) if err != nil { t.Errorf("EnsureLoadBalancer returned an error: %v", err) } assert.Equal(t, 1, len(awsServices.elbv2.(*MockedFakeELBV2).Listeners)) assert.NotEqual(t, tgARN, aws.StringValue(awsServices.elbv2.(*MockedFakeELBV2).Listeners[0].DefaultActions[0].TargetGroupArn)) } func makeNamedNode(s *FakeAWSServices, offset int, name string) *v1.Node { instanceID := fmt.Sprintf("i-%x", int64(0x02bce90670bb0c7cd)+int64(offset)) instance := &ec2.Instance{} instance.InstanceId = aws.String(instanceID) instance.Placement = &ec2.Placement{ AvailabilityZone: aws.String("us-east-1c"), } instance.PrivateDnsName = aws.String(fmt.Sprintf("ip-172-20-0-%d.ec2.internal", 101+offset)) instance.PrivateIpAddress = aws.String(fmt.Sprintf("192.168.0.%d", 1+offset)) var tag ec2.Tag tag.Key = aws.String(TagNameKubernetesClusterLegacy) tag.Value = aws.String(TestClusterID) instance.Tags = []*ec2.Tag{&tag} s.instances = append(s.instances, instance) testProviderID := "aws:///us-east-1c/" + instanceID return &v1.Node{ ObjectMeta: metav1.ObjectMeta{ Name: name, }, Spec: v1.NodeSpec{ ProviderID: testProviderID, }, } } func newMockedFakeAWSServices(id string) *FakeAWSServices { s := NewFakeAWSServices(id) s.ec2 = &MockedFakeEC2{FakeEC2Impl: s.ec2.(*FakeEC2Impl)} s.elb = &MockedFakeELB{FakeELB: s.elb.(*FakeELB)} return s } func TestAzToRegion(t *testing.T) { testCases := []struct { az string region string }{ {"us-west-2a", "us-west-2"}, {"us-west-2-lax-1a", "us-west-2"}, {"ap-northeast-2a", "ap-northeast-2"}, {"us-gov-east-1a", "us-gov-east-1"}, {"us-iso-east-1a", "us-iso-east-1"}, {"us-isob-east-1a", "us-isob-east-1"}, } for _, testCase := range testCases { result, err := azToRegion(testCase.az) assert.NoError(t, err) assert.Equal(t, testCase.region, result) } } func TestCloud_sortELBSecurityGroupList(t *testing.T) { type args struct { securityGroupIDs []string annotations map[string]string } tests := []struct { name string args args wantSecurityGroupIDs []string }{ { name: "with no annotation", args: args{ securityGroupIDs: []string{"sg-1"}, annotations: map[string]string{}, }, wantSecurityGroupIDs: []string{"sg-1"}, }, { name: "with service.beta.kubernetes.io/aws-load-balancer-security-groups", args: args{ securityGroupIDs: []string{"sg-2", "sg-1", "sg-3"}, annotations: map[string]string{ "service.beta.kubernetes.io/aws-load-balancer-security-groups": "sg-3,sg-2,sg-1", }, }, wantSecurityGroupIDs: []string{"sg-3", "sg-2", "sg-1"}, }, { name: "with service.beta.kubernetes.io/aws-load-balancer-extra-security-groups", args: args{ securityGroupIDs: []string{"sg-2", "sg-1", "sg-3", "sg-4"}, annotations: map[string]string{ "service.beta.kubernetes.io/aws-load-balancer-extra-security-groups": "sg-3,sg-2,sg-1", }, }, wantSecurityGroupIDs: []string{"sg-4", "sg-3", "sg-2", "sg-1"}, }, { name: "with both annotation", args: args{ securityGroupIDs: []string{"sg-2", "sg-1", "sg-3", "sg-4", "sg-5", "sg-6"}, annotations: map[string]string{ "service.beta.kubernetes.io/aws-load-balancer-security-groups": "sg-3,sg-2,sg-1", "service.beta.kubernetes.io/aws-load-balancer-extra-security-groups": "sg-6,sg-5", }, }, wantSecurityGroupIDs: []string{"sg-3", "sg-2", "sg-1", "sg-4", "sg-6", "sg-5"}, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { c := &Cloud{} c.sortELBSecurityGroupList(tt.args.securityGroupIDs, tt.args.annotations) assert.Equal(t, tt.wantSecurityGroupIDs, tt.args.securityGroupIDs) }) } } func TestCloud_buildNLBHealthCheckConfiguration(t *testing.T) { tests := []struct { name string annotations map[string]string service *v1.Service want healthCheckConfig wantError bool }{ { name: "default cluster", annotations: map[string]string{}, service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, }, }, want: healthCheckConfig{ Port: "traffic-port", Protocol: elbv2.ProtocolEnumTcp, Interval: 30, Timeout: 10, HealthyThreshold: 3, UnhealthyThreshold: 3, }, wantError: false, }, { name: "default local", annotations: map[string]string{}, service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", }, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeLoadBalancer, Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicyTypeLocal, HealthCheckNodePort: 32213, }, }, want: healthCheckConfig{ Port: "32213", Path: "/healthz", Protocol: elbv2.ProtocolEnumHttp, Interval: 10, Timeout: 10, HealthyThreshold: 2, UnhealthyThreshold: 2, }, wantError: false, }, { name: "with TCP healthcheck", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", Annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "TCP", ServiceAnnotationLoadBalancerHealthCheckPort: "8001", ServiceAnnotationLoadBalancerHealthCheckPath: "/healthz", ServiceAnnotationLoadBalancerHCHealthyThreshold: "4", ServiceAnnotationLoadBalancerHCUnhealthyThreshold: "4", ServiceAnnotationLoadBalancerHCInterval: "10", ServiceAnnotationLoadBalancerHCTimeout: "5", }, }, Spec: v1.ServiceSpec{ Type: v1.ServiceTypeLoadBalancer, Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, ExternalTrafficPolicy: v1.ServiceExternalTrafficPolicyTypeLocal, HealthCheckNodePort: 32213, }, }, want: healthCheckConfig{ Interval: 10, Timeout: 5, Protocol: "TCP", Port: "8001", HealthyThreshold: 4, UnhealthyThreshold: 4, }, wantError: false, }, { name: "with HTTP healthcheck", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", Annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "HTTP", ServiceAnnotationLoadBalancerHealthCheckPort: "41233", ServiceAnnotationLoadBalancerHealthCheckPath: "/healthz", ServiceAnnotationLoadBalancerHCHealthyThreshold: "5", ServiceAnnotationLoadBalancerHCUnhealthyThreshold: "5", ServiceAnnotationLoadBalancerHCInterval: "30", ServiceAnnotationLoadBalancerHCTimeout: "6", }, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, }, }, want: healthCheckConfig{ Interval: 30, Timeout: 6, Protocol: "HTTP", Port: "41233", Path: "/healthz", HealthyThreshold: 5, UnhealthyThreshold: 5, }, wantError: false, }, { name: "HTTP healthcheck default path", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", Annotations: map[string]string{ ServiceAnnotationLoadBalancerHealthCheckProtocol: "Http", }, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, }, }, want: healthCheckConfig{ Interval: 30, Timeout: 10, Protocol: "HTTP", Path: "/", Port: "traffic-port", HealthyThreshold: 3, UnhealthyThreshold: 3, }, wantError: false, }, { name: "invalid interval", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", Annotations: map[string]string{ ServiceAnnotationLoadBalancerHCInterval: "23", }, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, }, }, want: healthCheckConfig{}, wantError: true, }, { name: "invalid timeout", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", Annotations: map[string]string{ ServiceAnnotationLoadBalancerHCTimeout: "non-numeric", }, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, }, }, want: healthCheckConfig{}, wantError: true, }, { name: "mismatch healthy and unhealthy targets", service: &v1.Service{ ObjectMeta: metav1.ObjectMeta{ Name: "test-svc", UID: "UID", Annotations: map[string]string{ ServiceAnnotationLoadBalancerHCHealthyThreshold: "7", ServiceAnnotationLoadBalancerHCUnhealthyThreshold: "5", }, }, Spec: v1.ServiceSpec{ Ports: []v1.ServicePort{ { Name: "http", Protocol: v1.ProtocolTCP, Port: 8080, TargetPort: intstr.FromInt(8880), NodePort: 32205, }, }, }, }, want: healthCheckConfig{}, wantError: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { c := &Cloud{} hc, err := c.buildNLBHealthCheckConfiguration(tt.service) if !tt.wantError { assert.Equal(t, tt.want, hc) } else { assert.NotNil(t, err) } }) } }
{'content_hash': 'e2cf42dce98eb7637a441e960f4b2650', 'timestamp': '', 'source': 'github', 'line_count': 3038, 'max_line_length': 181, 'avg_line_length': 30.807768268597762, 'alnum_prop': 0.6693270936171122, 'repo_name': 'tcnghia/kubernetes', 'id': '1b04429d8e6dd73bb37615b968e34e451240cecb', 'size': '94163', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'staging/src/k8s.io/legacy-cloud-providers/aws/aws_test.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '2840'}, {'name': 'Go', 'bytes': '43146121'}, {'name': 'HTML', 'bytes': '1199467'}, {'name': 'Makefile', 'bytes': '75248'}, {'name': 'Python', 'bytes': '2872917'}, {'name': 'Ruby', 'bytes': '1780'}, {'name': 'Shell', 'bytes': '1452321'}, {'name': 'sed', 'bytes': '11576'}]}
<?php namespace PHPExiftool\Driver\Tag\Canon; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class CanonFileLength extends AbstractTag { protected $Id = 14; protected $Name = 'CanonFileLength'; protected $FullName = 'Canon::Main'; protected $GroupName = 'Canon'; protected $g0 = 'MakerNotes'; protected $g1 = 'Canon'; protected $g2 = 'Camera'; protected $Type = 'int32u'; protected $Writable = true; protected $Description = 'Canon File Length'; protected $local_g2 = 'Image'; protected $flag_Permanent = true; }
{'content_hash': '807bb7c1502bd2430c588f921641edf9', 'timestamp': '', 'source': 'github', 'line_count': 39, 'max_line_length': 49, 'avg_line_length': 16.641025641025642, 'alnum_prop': 0.6640986132511556, 'repo_name': 'romainneutron/PHPExiftool', 'id': 'ab78b75c55f06e72d1a5be4530ca03d2c75ca987', 'size': '871', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/PHPExiftool/Driver/Tag/Canon/CanonFileLength.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '22042446'}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_71) on Thu Sep 10 12:30:17 NZST 2015 --> <title>ResultChangedEvent</title> <meta name="date" content="2015-09-10"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><!-- if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ResultChangedEvent"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar_top"> <!-- --> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../weka/gui/sql/event/QueryExecuteListener.html" title="interface in weka.gui.sql.event"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../weka/gui/sql/event/ResultChangedListener.html" title="interface in weka.gui.sql.event"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?weka/gui/sql/event/ResultChangedEvent.html" target="_top">Frames</a></li> <li><a href="ResultChangedEvent.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">weka.gui.sql.event</div> <h2 title="Class ResultChangedEvent" class="title">Class ResultChangedEvent</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>java.util.EventObject</li> <li> <ul class="inheritance"> <li>weka.gui.sql.event.ResultChangedEvent</li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Serializable</dd> </dl> <hr> <br> <pre>public class <span class="strong">ResultChangedEvent</span> extends java.util.EventObject</pre> <div class="block">An event that is generated when a different Result is activated in the ResultPanel.</div> <dl><dt><span class="strong">Version:</span></dt> <dd>$Revision: 8034 $</dd> <dt><span class="strong">Author:</span></dt> <dd>FracPete (fracpete at waikato dot ac dot nz)</dd> <dt><span class="strong">See Also:</span></dt><dd><a href="../../../../weka/gui/sql/event/ResultChangedListener.html" title="interface in weka.gui.sql.event"><code>ResultChangedListener</code></a>, <a href="../../../../serialized-form.html#weka.gui.sql.event.ResultChangedEvent">Serialized Form</a></dd></dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><strong><a href="../../../../weka/gui/sql/event/ResultChangedEvent.html#ResultChangedEvent(java.lang.Object,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String)">ResultChangedEvent</a></strong>(java.lang.Object&nbsp;source, java.lang.String&nbsp;url, java.lang.String&nbsp;user, java.lang.String&nbsp;pw, java.lang.String&nbsp;query)</code> <div class="block">constructs the event</div> </td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method_summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../weka/gui/sql/event/ResultChangedEvent.html#getPassword()">getPassword</a></strong>()</code> <div class="block">returns the password that produced the table model</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../weka/gui/sql/event/ResultChangedEvent.html#getQuery()">getQuery</a></strong>()</code> <div class="block">returns the query that was executed</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../weka/gui/sql/event/ResultChangedEvent.html#getURL()">getURL</a></strong>()</code> <div class="block">returns the database URL that produced the table model</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../weka/gui/sql/event/ResultChangedEvent.html#getUser()">getUser</a></strong>()</code> <div class="block">returns the user that produced the table model</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>java.lang.String</code></td> <td class="colLast"><code><strong><a href="../../../../weka/gui/sql/event/ResultChangedEvent.html#toString()">toString</a></strong>()</code> <div class="block">returns the event in a string representation</div> </td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.util.EventObject"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.util.EventObject</h3> <code>getSource</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods_inherited_from_class_java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor_detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="ResultChangedEvent(java.lang.Object, java.lang.String, java.lang.String, java.lang.String, java.lang.String)"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>ResultChangedEvent</h4> <pre>public&nbsp;ResultChangedEvent(java.lang.Object&nbsp;source, java.lang.String&nbsp;url, java.lang.String&nbsp;user, java.lang.String&nbsp;pw, java.lang.String&nbsp;query)</pre> <div class="block">constructs the event</div> <dl><dt><span class="strong">Parameters:</span></dt><dd><code>source</code> - the source that generated this event</dd><dd><code>url</code> - the current database url</dd><dd><code>user</code> - the current user</dd><dd><code>pw</code> - the current password</dd><dd><code>query</code> - the current query</dd></dl> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method_detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="getURL()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getURL</h4> <pre>public&nbsp;java.lang.String&nbsp;getURL()</pre> <div class="block">returns the database URL that produced the table model</div> </li> </ul> <a name="getUser()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getUser</h4> <pre>public&nbsp;java.lang.String&nbsp;getUser()</pre> <div class="block">returns the user that produced the table model</div> </li> </ul> <a name="getPassword()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getPassword</h4> <pre>public&nbsp;java.lang.String&nbsp;getPassword()</pre> <div class="block">returns the password that produced the table model</div> </li> </ul> <a name="getQuery()"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>getQuery</h4> <pre>public&nbsp;java.lang.String&nbsp;getQuery()</pre> <div class="block">returns the query that was executed</div> </li> </ul> <a name="toString()"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>toString</h4> <pre>public&nbsp;java.lang.String&nbsp;toString()</pre> <div class="block">returns the event in a string representation</div> <dl> <dt><strong>Overrides:</strong></dt> <dd><code>toString</code>&nbsp;in class&nbsp;<code>java.util.EventObject</code></dd> <dt><span class="strong">Returns:</span></dt><dd>the event in a string representation</dd></dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../weka/gui/sql/event/QueryExecuteListener.html" title="interface in weka.gui.sql.event"><span class="strong">Prev Class</span></a></li> <li><a href="../../../../weka/gui/sql/event/ResultChangedListener.html" title="interface in weka.gui.sql.event"><span class="strong">Next Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?weka/gui/sql/event/ResultChangedEvent.html" target="_top">Frames</a></li> <li><a href="ResultChangedEvent.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method_detail">Method</a></li> </ul> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{'content_hash': '5b7d0cc5f30d01da40da87f4645cadf9', 'timestamp': '', 'source': 'github', 'line_count': 361, 'max_line_length': 315, 'avg_line_length': 35.12742382271468, 'alnum_prop': 0.6438766658780853, 'repo_name': 'rpgoncalves/sw-comprehension', 'id': '0c1a4fb3eb9f08c67ebf5d07bbf223219ec12da1', 'size': '12681', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'documents/assignment1/weka-3-7-13/doc/weka/gui/sql/event/ResultChangedEvent.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '11649'}, {'name': 'HTML', 'bytes': '46976575'}, {'name': 'Java', 'bytes': '18007490'}, {'name': 'Lex', 'bytes': '7335'}]}
ACCEPTED #### According to International Plant Names Index #### Published in null #### Original name null ### Remarks null
{'content_hash': 'b084d65809747f8ed20d5bf28b3001be', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 31, 'avg_line_length': 9.692307692307692, 'alnum_prop': 0.7063492063492064, 'repo_name': 'mdoering/backbone', 'id': '7e3a7d77b9659f950cf4773c8ba10168f63afa4e', 'size': '174', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Lamiaceae/Scutellaria/Scutellaria simplex/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
var _, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { if (typeof parent.__extend == 'function') return parent.__extend(child); for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; if (typeof parent.extended == 'function') parent.extended(child); return child; }; _ = Tower._; Tower.ModelRelationHasManyThrough = (function(_super) { var ModelRelationHasManyThrough; function ModelRelationHasManyThrough() { return ModelRelationHasManyThrough.__super__.constructor.apply(this, arguments); } ModelRelationHasManyThrough = __extends(ModelRelationHasManyThrough, _super); ModelRelationHasManyThrough.reopen({ isHasManyThrough: true, init: function(options) { var throughRelation; this._super.apply(this, arguments); if (this.through && !options.type) { this.throughRelation = throughRelation = this.owner.relation(this.through); return options.type || (options.type = throughRelation.targetType); } }, inverseThrough: function(relation) { var name, relations, type; relations = relation.targetKlass().relations(); if (relation.inverseOf) { return relations[relation.inverseOf]; } else { name = this.name; type = this.type; for (name in relations) { relation = relations[name]; if (relation.inverseOf === name) { return relation; } } for (name in relations) { relation = relations[name]; if (relation.targetType === type) { return relation; } } } } }); return ModelRelationHasManyThrough; })(Tower.ModelRelationHasMany); Tower.ModelRelationHasManyThroughCursorMixin = Ember.Mixin.create(Tower.ModelRelationHasManyCursorMixin, { isHasManyThrough: true, clonePrototype: function() { var clone; clone = this.concat(); clone.isCursor = true; Tower.ModelRelationCursorMixin.apply(clone); return Tower.ModelRelationHasManyThroughCursorMixin.apply(clone); }, make: function(options) { if (options == null) { options = {}; } this._super.apply(this, arguments); if (this.relation.through) { this.throughRelation = this.owner.constructor.relation(this.relation.through); return this.inverseRelation = this.relation.inverseThrough(this.throughRelation); } }, compile: function() { return this; }, insert: function(callback) { var _this = this; return this._runBeforeInsertCallbacksOnStore(function() { return _this._insert(function(error, record) { if (!error) { return _this._runAfterInsertCallbacksOnStore(function() { return _this.insertThroughRelation(record, function(error, throughRecord) { if (callback) { return callback.call(_this, error, record); } }); }); } else { if (callback) { return callback.call(_this, error, record); } } }); }); }, add: function(callback) { var _this = this; return this._build(function(error, record) { if (!error) { return _this.insertThroughRelation(record, function(error, throughRecord) { if (callback) { return callback.call(_this, error, record); } }); } else { if (callback) { return callback.call(_this, error, record); } } }); }, remove: function(callback) { var _this = this; return this.removeThroughRelation(function(error) { if (callback) { return callback.call(_this, error, _this.ids); } }); }, count: function(callback) { var _this = this; return this._runBeforeFindCallbacksOnStore(function() { return _this._count(function(error, record) { if (!error) { return _this._runAfterFindCallbacksOnStore(function() { if (callback) { return callback.call(_this, error, record); } }); } else { if (callback) { return callback.call(_this, error, record); } } }); }); }, exists: function(callback) { var _this = this; return this._runBeforeFindCallbacksOnStore(function() { return _this._exists(function(error, record) { if (!error) { return _this._runAfterFindCallbacksOnStore(function() { if (callback) { return callback.call(_this, error, record); } }); } else { if (callback) { return callback.call(_this, error, record); } } }); }); }, appendThroughConditions: function(callback) { var _this = this; return this.owner.get(this.relation.through).all(function(error, records) { var ids; ids = _this.store._mapKeys(_this.inverseRelation.foreignKey, records); _this.where({ 'id': { $in: ids } }); return callback(); }); }, removeThroughRelation: function(callback) { var ids, key, _this = this; ids = this.ids; key = this.inverseRelation.foreignKey; return this.owner.get(this.relation.through).anyIn(key, ids).destroy(function(error) { if (callback) { return callback.call(_this, error); } }); }, insertThroughRelation: function(records, callback) { var attributes, data, key, record, returnArray, _i, _len, _this = this; returnArray = _.isArray(records); records = _.castArray(records); data = []; key = this.inverseRelation.foreignKey; for (_i = 0, _len = records.length; _i < _len; _i++) { record = records[_i]; attributes = {}; attributes[key] = record.get('id'); data.push(attributes); } return this.owner.get(this.relation.through).insert(data, function(error, throughRecords) { if (!returnArray) { throughRecords = throughRecords[0]; } if (callback) { return callback.call(_this, error, throughRecords); } }); } }); Tower.ModelRelationHasManyThroughCursor = (function(_super) { var ModelRelationHasManyThroughCursor; function ModelRelationHasManyThroughCursor() { return ModelRelationHasManyThroughCursor.__super__.constructor.apply(this, arguments); } ModelRelationHasManyThroughCursor = __extends(ModelRelationHasManyThroughCursor, _super); ModelRelationHasManyThroughCursor.reopenClass({ makeOld: function() { var array; array = []; array.isCursor = true; Tower.ModelRelationCursorMixin.apply(array); return Tower.ModelRelationHasManyThroughCursorMixin.apply(array); } }); ModelRelationHasManyThroughCursor.include(Tower.ModelRelationHasManyThroughCursorMixin); return ModelRelationHasManyThroughCursor; })(Tower.ModelRelationCursor); module.exports = Tower.ModelRelationHasManyThrough;
{'content_hash': '90b6f5a9613f43bbfc54b6be3e02fc8a', 'timestamp': '', 'source': 'github', 'line_count': 238, 'max_line_length': 106, 'avg_line_length': 30.26050420168067, 'alnum_prop': 0.6117745070813663, 'repo_name': 'feilaoda/power', 'id': '8018901d98affb7ceef2771fe01668af3c5c49ac', 'size': '7202', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'node_modules/tower/lib/tower-model/shared/relation/hasManyThrough.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '5020'}, {'name': 'CoffeeScript', 'bytes': '71907'}, {'name': 'JavaScript', 'bytes': '99005'}]}
#ifndef HTMLDimension_h #define HTMLDimension_h #include "core/CoreExport.h" #include "wtf/Allocator.h" #include "wtf/Forward.h" #include "wtf/Vector.h" namespace blink { // This class corresponds to a dimension as described in HTML5 by the // "rules for parsing a list of dimensions" (section 2.4.4.6). class HTMLDimension { DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); public: enum HTMLDimensionType { Relative, Percentage, Absolute }; HTMLDimension() : m_type(Absolute), m_value(0) {} HTMLDimension(double value, HTMLDimensionType type) : m_type(type), m_value(value) {} HTMLDimensionType type() const { return m_type; } bool isRelative() const { return m_type == Relative; } bool isPercentage() const { return m_type == Percentage; } bool isAbsolute() const { return m_type == Absolute; } double value() const { return m_value; } bool operator==(const HTMLDimension& other) const { return m_type == other.m_type && m_value == other.m_value; } bool operator!=(const HTMLDimension& other) const { return !(*this == other); } private: HTMLDimensionType m_type; double m_value; }; CORE_EXPORT Vector<HTMLDimension> parseListOfDimensions(const String&); } // namespace blink #endif // HTMLDimension_h
{'content_hash': '4be5bcb4edb296002b7abd628f13f8df', 'timestamp': '', 'source': 'github', 'line_count': 50, 'max_line_length': 71, 'avg_line_length': 25.12, 'alnum_prop': 0.6990445859872612, 'repo_name': 'ssaroha/node-webrtc', 'id': 'aa2e7f1ff4d576d4a2f9270f8d930d3efc3d0434', 'size': '2818', 'binary': False, 'copies': '4', 'ref': 'refs/heads/develop', 'path': 'third_party/webrtc/include/chromium/src/third_party/WebKit/Source/core/html/HTMLDimension.h', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Batchfile', 'bytes': '6179'}, {'name': 'C', 'bytes': '2679'}, {'name': 'C++', 'bytes': '54327'}, {'name': 'HTML', 'bytes': '434'}, {'name': 'JavaScript', 'bytes': '42707'}, {'name': 'Python', 'bytes': '3835'}]}
#include <map> #include <string> #include <unordered_map> #include <vector> #include "tensorflow/core/graph/quantize_training.h" #include "tensorflow/core/common_runtime/device_factory.h" #include "tensorflow/core/common_runtime/device_mgr.h" #include "tensorflow/core/framework/node_def_util.h" #include "tensorflow/core/framework/tensor.h" #include "tensorflow/core/framework/tensor_shape.h" #include "tensorflow/core/framework/tensor_testutil.h" #include "tensorflow/core/framework/types.h" #include "tensorflow/core/graph/node_builder.h" #include "tensorflow/core/graph/testlib.h" #include "tensorflow/core/lib/core/status_test_util.h" #include "tensorflow/core/lib/core/threadpool.h" #include "tensorflow/core/lib/strings/strcat.h" #include "tensorflow/core/platform/test.h" #include "tensorflow/core/public/session_options.h" namespace tensorflow { namespace { class QuantizeTrainingTest : public ::testing::Test { protected: QuantizeTrainingTest() { Reset(); } void Reset() { g_.reset(new Graph(OpRegistry::Global())); } template <typename T> Node* Constant(gtl::ArraySlice<T> values, TensorShape shape) { return test::graph::Constant(g_.get(), test::AsTensor(values, shape)); } std::unique_ptr<Graph> g_; }; TEST_F(QuantizeTrainingTest, NormalGraph) { // Construct the following graph /* m1 m2 / \ / \ Relu Identity c | | a b */ Reset(); Graph* g = g_.get(); Node* a = Constant<float>({1.0, 2.0, 3.0, 4.0}, {2, 2}); Node* b = Constant<float>({1.0, 2.0, 3.0, 4.0}, {2, 2}); Node* c = Constant<float>({0.0, 1.0, 1.0, 0.0}, {2, 2}); g->AddControlEdge(g->source_node(), a); g->AddControlEdge(g->source_node(), b); g->AddControlEdge(g->source_node(), c); Node* relu = test::graph::Relu(g, a); Node* identity = test::graph::Identity(g, b); Node* m1 = test::graph::Matmul(g, relu, identity, false, false); Node* m2 = test::graph::Matmul(g, identity, c, false, false); g->AddControlEdge(m1, g->sink_node()); g->AddControlEdge(m2, g->sink_node()); // The graph after the rewriting should be: // "Q" is the quantize_and_dequantize op. // Note the Q in the middle is shared by both m1 and m2. /* m1 m2 / \ / \ Q Q Q | | | Relu Identity c | | a b */ int num_bits = 8; // 4 edges to modify TF_ASSERT_OK(DoQuantizeTraining(num_bits, g)); // There should be 12 nodes in total including the source and sink nodes. EXPECT_EQ(12, g->num_nodes()); // Nodes m1 and m2's inputs should be the quantize_and_dequantize op. std::vector<Node*> target_nodes{m1, m2}; for (Node* n : target_nodes) { for (Node* in : n->in_nodes()) { EXPECT_EQ("_QuantizeAndDequantize", in->type_string()); } } // relu, identity, c should now connect to the quantize_and_dequantize nodes. std::vector<Node*> target_inputs{relu, identity, c}; for (Node* n : target_inputs) { for (Node* out : n->out_nodes()) { EXPECT_EQ("_QuantizeAndDequantize", out->type_string()); } } // Quantize_and_dequantize node for identity should have signed_input==true. NodeDef identity_Q = identity->out_nodes().begin()->def(); ASSERT_EQ("true", SummarizeAttrValue(identity_Q.attr().find("signed_input")->second)); // Quantize_and_dequantize node for relu should have signed_input==false. NodeDef relu_Q = relu->out_nodes().begin()->def(); ASSERT_EQ("false", SummarizeAttrValue(relu_Q.attr().find("signed_input")->second)); } TEST_F(QuantizeTrainingTest, WithBackwardNodes) { // Construct the same graph plus another backward Matmul. Reset(); Graph* g = g_.get(); Node* a = Constant<float>({1.0, 2.0, 3.0, 4.0}, {2, 2}); Node* b = Constant<float>({1.0, 2.0, 3.0, 4.0}, {2, 2}); Node* c = Constant<float>({0.0, 1.0, 1.0, 0.0}, {2, 2}); g->AddControlEdge(g->source_node(), a); g->AddControlEdge(g->source_node(), b); g->AddControlEdge(g->source_node(), c); Node* relu = test::graph::Relu(g, a); Node* identity = test::graph::Identity(g, b); Node* m1 = test::graph::Matmul(g, relu, identity, false, false); Node* m2 = test::graph::Matmul(g, identity, c, false, false); g->AddControlEdge(m1, g->sink_node()); g->AddControlEdge(m2, g->sink_node()); // Add a Matmul node with name starting with "gradients". Node* backward_m; TF_ASSERT_OK(NodeBuilder(g->NewName("gradients/n"), "MatMul") .Input(m1) .Input(m2) .Attr("transpose_a", true) .Attr("transpose_b", false) .Finalize(g, &backward_m)); g->AddControlEdge(backward_m, g->sink_node()); int num_bits = 8; // Still 4 changes since the inputs of backward node will not be converted. TF_ASSERT_OK(DoQuantizeTraining(num_bits, g)); // Nodes m1 and m2's inputs should now be the quantize_and_dequantize op. EXPECT_EQ(13, g->num_nodes()); EXPECT_EQ(2, m2->num_inputs()); } #undef SIMPLE_GRAPH } // namespace } // namespace tensorflow
{'content_hash': '109b45f85d3e7d270859c041f99c60a0', 'timestamp': '', 'source': 'github', 'line_count': 148, 'max_line_length': 80, 'avg_line_length': 34.45945945945946, 'alnum_prop': 0.6292156862745099, 'repo_name': 'TakayukiSakai/tensorflow', 'id': 'd6663e0a508d5204145048df0f0dfef882ce3d28', 'size': '5756', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tensorflow/core/graph/quantize_training_test.cc', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '158225'}, {'name': 'C++', 'bytes': '9550557'}, {'name': 'CMake', 'bytes': '29372'}, {'name': 'CSS', 'bytes': '1297'}, {'name': 'HTML', 'bytes': '784478'}, {'name': 'Java', 'bytes': '39903'}, {'name': 'JavaScript', 'bytes': '10875'}, {'name': 'Jupyter Notebook', 'bytes': '1947495'}, {'name': 'Makefile', 'bytes': '12087'}, {'name': 'Objective-C', 'bytes': '5332'}, {'name': 'Objective-C++', 'bytes': '45585'}, {'name': 'Protocol Buffer', 'bytes': '114983'}, {'name': 'Python', 'bytes': '7174526'}, {'name': 'Shell', 'bytes': '200597'}, {'name': 'TypeScript', 'bytes': '414926'}]}
/* -*- mode:objc; coding:utf-8; tab-width:8; c-basic-offset:2; indent-tabs-mode:nil -*- */ /* Copyright (c) 2003-2005 MacUIM contributors, All rights reserved. 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. Neither the name of authors nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS 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 THE COPYRIGHT HOLDERS OR 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. */ #import "ModeTipsView.h" @implementation ModeTipsView - (id)initWithFrame:(NSRect)frameRect { if ((self = [super initWithFrame:frameRect]) != nil) { image = nil; } return self; } - (void)drawRect:(NSRect)rect { if (image) { [image compositeToPoint:NSMakePoint(0, 0) operation:NSCompositeSourceOver]; } } - (void)setImage:(NSImage *)aImage { if (image) [image release]; image = aImage; [image retain]; } @end
{'content_hash': 'd2e1015df66843b9bd3e95f3b1414dbb', 'timestamp': '', 'source': 'github', 'line_count': 60, 'max_line_length': 90, 'avg_line_length': 34.93333333333333, 'alnum_prop': 0.7447519083969466, 'repo_name': 'dongyuwei/macuim', 'id': 'd5e646a8c78d7e50bf36ea50eecd8d382dae3ec0', 'size': '2096', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'Sources/ModeTipsView.m', 'mode': '33188', 'license': 'bsd-2-clause', 'language': []}
'use strict'; moduloEmpleado.controller('EmpleadoRemoveController', ['$scope', '$routeParams', 'serverService', function ($scope, $routeParams, serverService) { $scope.result = ""; $scope.back = function () { window.history.back(); }; $scope.ob = 'empleado'; $scope.id = $routeParams.id; $scope.title = "Borrado de un empleado"; $scope.icon = "fa-users"; serverService.getDataFromPromise(serverService.promise_getOne($scope.ob, $scope.id)).then(function (data) { $scope.bean = data.message; }); $scope.remove = function () { serverService.getDataFromPromise(serverService.promise_removeOne($scope.ob, $scope.id)).then(function (data) { $scope.result = data; }); } ; }]);
{'content_hash': '3910f1b4df016a83e7bb5378d36cd4bc', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 127, 'avg_line_length': 34.48, 'alnum_prop': 0.5556844547563805, 'repo_name': 'ivangm4/openAusias-ted', 'id': 'ec17e6923b53f8295e08a060103abbc450a176d2', 'size': '2277', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/webapp/js/empleado/remove.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '150937'}, {'name': 'HTML', 'bytes': '443537'}, {'name': 'Java', 'bytes': '289510'}, {'name': 'JavaScript', 'bytes': '314987'}]}
'use strict'; const http = require('http'); const path = require('path'); const fs = require('fs'); const mus = require('../lib'); const regexp = /^\/([^\/]+)\/([^\/]+)/; const port = 8989; mus.configure({ baseDir: __dirname, noCache: true, }); http.createServer((req, res) => { const url = req.url; const matches = url.match(regexp); if (matches) { const fileUrl = path.join(__dirname, matches[1], 'index.js'); if (fs.existsSync(fileUrl)) { const handle = require(fileUrl); req.requestUrl = matches[2]; res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8', }); return handle(req, res); } } else if (url === '/') { const list = fs.readdirSync(__dirname); const dirList = list.filter(item => fs.lstatSync(path.join(__dirname, item)).isDirectory()); res.writeHead(200, { 'Content-Type': 'text/html;charset=utf-8', }); return res.end(mus.render('menu', { dirList })); } res.writeHead(404); res.end('404'); }).listen(port); console.log(`server listen ${port}`); console.log(`visit http://127.0.0.1:${port}/`);
{'content_hash': '35675a49ae1542c04b425efad17fb108', 'timestamp': '', 'source': 'github', 'line_count': 40, 'max_line_length': 96, 'avg_line_length': 27.825, 'alnum_prop': 0.5911949685534591, 'repo_name': 'whxaxes/mus', 'id': '8a50a68d181f7bdb14ccd53061d96c3f13dc0bd6', 'size': '1113', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'example/server.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '8093'}, {'name': 'JavaScript', 'bytes': '81339'}, {'name': 'Smarty', 'bytes': '7124'}]}
<?php use yii\helpers\Html; // contant values use app\models\general\GeneralLabel; /* @var $this yii\web\View */ /* @var $model app\models\PengurusanPenilaianPendidikanPenganjurIntructor */ //$this->title = GeneralLabel::updateTitle.' '.GeneralLabel::pengurusan_penilaian_pendidikan_penganjur_intructor.': ' . ' ' . $model->pengurusan_penilaian_pendidikan_penganjur_intructor_id; $this->title = GeneralLabel::updateTitle . ' ' . GeneralLabel::pengurusan_penilaian_pendidikan_penganjurintructor; $this->params['breadcrumbs'][] = ['label' => GeneralLabel::pengurusan_penilaian_pendidikan_penganjurintructor, 'url' => ['index']]; $this->params['breadcrumbs'][] = ['label' => GeneralLabel::viewTitle . ' ' . GeneralLabel::pengurusan_penilaian_pendidikan_penganjurintructor, 'url' => ['view', 'id' => $model->pengurusan_penilaian_pendidikan_penganjur_intructor_id]]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="pengurusan-penilaian-pendidikan-penganjur-intructor-update"> <h1><?= Html::encode($this->title) ?></h1> <?= $this->render('_form', [ 'model' => $model, 'searchModelPengurusanSoalanPenilaianPendidikan' => $searchModelPengurusanSoalanPenilaianPendidikan, 'dataProviderPengurusanSoalanPenilaianPendidikan' => $dataProviderPengurusanSoalanPenilaianPendidikan, 'readonly' => $readonly, ]) ?> </div>
{'content_hash': 'ab515f89a2ea7c99c005ee69d01456c1', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 234, 'avg_line_length': 48.892857142857146, 'alnum_prop': 0.7202337472607743, 'repo_name': 'hung101/kbs', 'id': '973709e4961edadc43ab1a2925a3a7ab54b48a7a', 'size': '1369', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'frontend/views/pengurusan-penilaian-pendidikan-penganjur-intructor/update.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'ApacheConf', 'bytes': '113'}, {'name': 'Batchfile', 'bytes': '1541'}, {'name': 'CSS', 'bytes': '4999813'}, {'name': 'HTML', 'bytes': '32884422'}, {'name': 'JavaScript', 'bytes': '38543640'}, {'name': 'PHP', 'bytes': '30558998'}, {'name': 'PowerShell', 'bytes': '936'}, {'name': 'Shell', 'bytes': '5561'}]}
package org.kie.dmn.xls2dmn.cli; import org.drools.core.util.Drools; import picocli.CommandLine.IVersionProvider; public class XLS2DMNVersionProvider implements IVersionProvider { @Override public String[] getVersion() throws Exception { return new String[]{Drools.getFullVersion()}; } }
{'content_hash': '4e986239d48a67705afc60a2d5f29e6e', 'timestamp': '', 'source': 'github', 'line_count': 16, 'max_line_length': 65, 'avg_line_length': 19.6875, 'alnum_prop': 0.7428571428571429, 'repo_name': 'manstis/drools', 'id': '7b8668072e0ee004e18e89df36e6322ffbd6854d', 'size': '936', 'binary': False, 'copies': '8', 'ref': 'refs/heads/main', 'path': 'kie-dmn/kie-dmn-xls2dmn-cli/src/main/java/org/kie/dmn/xls2dmn/cli/XLS2DMNVersionProvider.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '16697'}, {'name': 'Batchfile', 'bytes': '2554'}, {'name': 'CSS', 'bytes': '1412'}, {'name': 'GAP', 'bytes': '198078'}, {'name': 'HTML', 'bytes': '6163'}, {'name': 'Java', 'bytes': '36835383'}, {'name': 'Python', 'bytes': '4555'}, {'name': 'Ruby', 'bytes': '491'}, {'name': 'Shell', 'bytes': '1120'}, {'name': 'XSLT', 'bytes': '24302'}]}
'-------------------------------------------------------------------------------------------' ' Inicio del codigo '-------------------------------------------------------------------------------------------' '-------------------------------------------------------------------------------------------' ' Inicio de clase "CGS_rRecibo_Liquidacion" '-------------------------------------------------------------------------------------------' Partial Class CGS_rRecibo_Liquidacion Inherits vis2formularios.frmReporte Dim loObjetoReporte As CrystalDecisions.CrystalReports.Engine.ReportDocument Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try Dim lcParametro0Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(0)) Dim lcParametro1Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(1)) Dim lcParametro2Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(2)) Dim lcParametro3Desde As String = goServicios.mObtenerCampoFormatoSQL(cusAplicacion.goReportes.paParametrosIniciales(3)) Dim lcCodigoCampoSueldo As String = goServicios.mObtenerCampoFormatoSQL(CStr(goOpciones.mObtener("CAMSUEMEN", "C"))) Dim loConsulta As New StringBuilder() loConsulta.AppendLine("DECLARE @lcCod_Tra AS VARCHAR(10) = " & lcParametro0Desde) loConsulta.AppendLine("DECLARE @lnAnios AS INT = " & lcParametro1Desde) loConsulta.AppendLine("DECLARE @lnMeses AS INT = " & lcParametro2Desde) loConsulta.AppendLine("DECLARE @lnDias AS INT = " & lcParametro3Desde) loConsulta.AppendLine("DECLARE @lnCero AS DECIMAL(28,10) = 0") loConsulta.AppendLine("") loConsulta.AppendLine("SELECT Recibos.Documento AS Documento, ") loConsulta.AppendLine(" Recibos.Fecha AS Fecha, ") loConsulta.AppendLine(" Recibos.Cod_Tra AS Cod_Tra, ") loConsulta.AppendLine(" Trabajadores.Nom_Tra AS Nom_Tra, ") loConsulta.AppendLine(" Trabajadores.Cedula AS Cedula, ") loConsulta.AppendLine(" COALESCE(Renglones_Campos_Nomina.Val_Num,@lnCero) AS Sueldo_Mensual,") loConsulta.AppendLine(" Trabajadores.Fec_Ini AS Ingreso, ") loConsulta.AppendLine(" Cargos.Nom_Car AS Nom_Car, ") loConsulta.AppendLine(" Recibos.Fecha AS Fecha, ") loConsulta.AppendLine(" @lnAnios AS Año,") loConsulta.AppendLine(" @lnMeses AS Mes,") loConsulta.AppendLine(" @lnDias AS Dia,") loConsulta.AppendLine(" Recibos.Fec_Fin AS Fec_Fin, ") loConsulta.AppendLine(" DATEADD(DAY, 1, Recibos.Fec_Fin) AS Fec_Rei, ") loConsulta.AppendLine(" Recibos.Comentario AS Comentario, ") loConsulta.AppendLine(" Recibos.Mon_Net AS Mon_Net, ") loConsulta.AppendLine(" Renglones_Recibos.Cod_Con AS Cod_Con, ") loConsulta.AppendLine(" Renglones_Recibos.Nom_con AS Nom_con, ") loConsulta.AppendLine(" CASE When Renglones_Recibos.Tipo = 'Asignacion'") loConsulta.AppendLine(" THEN Renglones_Recibos.Mon_Net") loConsulta.AppendLine(" ELSE @lnCero") loConsulta.AppendLine(" END AS Mon_Asi,") loConsulta.AppendLine(" CASE Renglones_Recibos.Tipo ") loConsulta.AppendLine(" WHEN 'Retencion' THEN -Renglones_Recibos.Mon_Net") loConsulta.AppendLine(" WHEN 'Deduccion' THEN -Renglones_Recibos.Mon_Net") loConsulta.AppendLine(" ELSE @lnCero") loConsulta.AppendLine(" END AS Mon_Ded,") loConsulta.AppendLine(" Renglones_Recibos.Val_Car AS Val_Car,") loConsulta.AppendLine(" COALESCE(Liquidaciones.Tipo, '') AS Tipo_Liquidacion") loConsulta.AppendLine("FROM Recibos") loConsulta.AppendLine(" JOIN Renglones_Recibos ON Renglones_Recibos.documento = Recibos.Documento") loConsulta.AppendLine(" JOIN Trabajadores ON Trabajadores.Cod_Tra = Recibos.Cod_Tra ") loConsulta.AppendLine(" JOIN Cargos ON Cargos.Cod_Car = Trabajadores.Cod_Car") loConsulta.AppendLine(" LEFT JOIN Liquidaciones ON Liquidaciones.Documento = Renglones_Recibos.Doc_Ori") loConsulta.AppendLine(" AND Renglones_Recibos.Tip_Ori = 'Liquidaciones'") loConsulta.AppendLine(" LEFT JOIN Renglones_Campos_Nomina ON Renglones_Campos_Nomina.Cod_Tra = Trabajadores.Cod_Tra") loConsulta.AppendLine(" AND Renglones_Campos_Nomina.Cod_Cam = " & lcCodigoCampoSueldo) loConsulta.AppendLine("WHERE Recibos.Cod_Tra = @lcCod_Tra") loConsulta.AppendLine(" AND Renglones_Recibos.Tipo <> 'Otro' ") loConsulta.AppendLine(" AND Recibos.Cod_Con = '92' ") loConsulta.AppendLine("ORDER BY (CASE Renglones_Recibos.Tipo ") loConsulta.AppendLine(" WHEN 'Asignacion' THEN 0") loConsulta.AppendLine(" WHEN 'Retencion' THEN 2") loConsulta.AppendLine(" ELSE 3") loConsulta.AppendLine(" END) ASC, ") loConsulta.AppendLine(" Renglones_Recibos.renglon") loConsulta.AppendLine("") 'Me.mEscribirConsulta(loConsulta.ToString()) Dim loServicios As New cusDatos.goDatos Dim laDatosReporte As DataSet = loServicios.mObtenerTodosSinEsquema(loConsulta.ToString(), "curReportes") '--------------------------------------------------' ' Carga la imagen del logo en cusReportes ' '--------------------------------------------------' Me.mCargarLogoEmpresa(laDatosReporte.Tables(0), "LogoEmpresa") If (laDatosReporte.Tables(0).Rows.Count <= 0) Then Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Información", _ "No se Encontraron Registros para los Parámetros Especificados. ", _ vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Informacion, _ "350px", _ "200px") End If loObjetoReporte = cusAplicacion.goReportes.mCargarReporte("CGS_rRecibo_Liquidacion", laDatosReporte) Me.mTraducirReporte(loObjetoReporte) Me.mFormatearCamposReporte(loObjetoReporte) Me.crvCGS_rRecibo_Liquidacion.ReportSource = loObjetoReporte Catch loExcepcion As Exception Me.WbcAdministradorMensajeModal.mMostrarMensajeModal("Error", _ "No se pudo Completar el Proceso: " & loExcepcion.Message, _ vis3Controles.wbcAdministradorMensajeModal.enumTipoMensaje.KN_Error, _ "auto", _ "auto") End Try End Sub Protected Sub Page_Unload(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Unload Try loObjetoReporte.Close() Catch loExcepcion As Exception End Try End Sub End Class '-------------------------------------------------------------------------------------------' ' Fin del codigo ' '-------------------------------------------------------------------------------------------'
{'content_hash': '4e03491af0f48f5d5aabe8fdd39b55a7', 'timestamp': '', 'source': 'github', 'line_count': 132, 'max_line_length': 133, 'avg_line_length': 61.22727272727273, 'alnum_prop': 0.5459044790893344, 'repo_name': 'kodeitsolutions/ef-reports', 'id': 'd8051037cbce9a186e05daa12feddc4b08840b75', 'size': '8087', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'CGS_rRecibo_Liquidacion.aspx.vb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '6246816'}, {'name': 'Visual Basic', 'bytes': '25803337'}]}
package org.apache.shindig.gadgets.parse; import org.apache.shindig.gadgets.parse.nekohtml.NekoSimplifiedHtmlParser; import org.junit.Test; import org.w3c.dom.Document; import org.w3c.dom.Element; import javax.xml.parsers.DocumentBuilderFactory; import static org.junit.Assert.assertEquals; public class DefaultHtmlSerializerTest { @Test public void testComplicatedSerialize() throws Exception { String txt = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"" + " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n" + "<html xml:lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">" + "<head><title>Apache Shindig!</title></head>" + "<body class=\"composite\">\n" + " <div id=\"bodyColumn\">hello\n" + " <div id=\"contentBox\"></div> \n" + " <div class=\"clear\"><hr></div> \n" + " </div>\n" + "</body></html>"; NekoSimplifiedHtmlParser parser = new NekoSimplifiedHtmlParser( new ParseModule.DOMImplementationProvider().get()); Document doc = parser.parseDom(txt); DefaultHtmlSerializer serializer = new DefaultHtmlSerializer(); assertEquals("Serialized full document", txt, serializer.serialize(doc)); } @Test public void testComments() throws Exception { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); doc.appendChild(doc.createElement("ABC")); doc.appendChild(doc.createComment("XYZ")); DefaultHtmlSerializer serializer = new DefaultHtmlSerializer(); assertEquals("Comment is preserved", "<ABC></ABC><!--XYZ-->", serializer.serialize(doc)); } @Test public void testEntities() throws Exception { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element element = doc.createElement("abc"); element.setAttribute("a", "\\x3e\">"); doc.appendChild(element); DefaultHtmlSerializer serializer = new DefaultHtmlSerializer(); assertEquals("Entities escaped", "<abc a=\"\\x3e&#34;&gt;\"></abc>", serializer.serialize(doc)); } @Test public void testHrefEntities() throws Exception { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element element = doc.createElement("a"); element.setAttribute("href", "http://apache.org/?a=0&query=2+3"); doc.appendChild(element); DefaultHtmlSerializer serializer = new DefaultHtmlSerializer(); assertEquals("href entities escaped", "<a href=\"http://apache.org/?a=0&amp;query=2+3\"></a>", serializer.serialize(doc)); } @Test public void testDataTemplateTags() throws Exception { Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument(); Element element = doc.createElement("osdata"); element.setAttribute("xmlns:foo", "#foo"); doc.appendChild(element); DefaultHtmlSerializer serializer = new DefaultHtmlSerializer(); assertEquals("OSData normalized", "<script type=\"text/os-data\" xmlns:foo=\"#foo\"></script>", serializer.serialize(doc)); } }
{'content_hash': '4e8078bf8e685e6182c08a7e28ed619a', 'timestamp': '', 'source': 'github', 'line_count': 88, 'max_line_length': 91, 'avg_line_length': 36.28409090909091, 'alnum_prop': 0.6711556529909176, 'repo_name': 'apache/shindig', 'id': '626a7080e3ee92f39fb247ea433074167b8df2aa', 'size': '4000', 'binary': False, 'copies': '2', 'ref': 'refs/heads/trunk', 'path': 'java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/DefaultHtmlSerializerTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ApacheConf', 'bytes': '304'}, {'name': 'CSS', 'bytes': '4122'}, {'name': 'HTML', 'bytes': '90546'}, {'name': 'Java', 'bytes': '2457552'}, {'name': 'JavaScript', 'bytes': '635975'}, {'name': 'PHP', 'bytes': '753133'}, {'name': 'Shell', 'bytes': '8468'}, {'name': 'XSLT', 'bytes': '4291'}]}
package CH.ifa.draw.framework; import java.awt.Rectangle; import java.util.EventObject; /** * The event passed to DrawingChangeListeners. * * @version <$CURRENT_VERSION$> */ public class DrawingChangeEvent extends EventObject { private Rectangle myRectangle; /** * Constructs a drawing change event. */ public DrawingChangeEvent(Drawing newSource, Rectangle newRect) { super(newSource); myRectangle = newRect; } /** * Gets the changed drawing */ public Drawing getDrawing() { return (Drawing)getSource(); } /** * Gets the changed rectangle */ public Rectangle getInvalidatedRectangle() { return myRectangle; } }
{'content_hash': 'ee5fc8ddae2c5620207b05d3a97987b3', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 66, 'avg_line_length': 17.289473684210527, 'alnum_prop': 0.7092846270928462, 'repo_name': 'mmohan01/ReFactory', 'id': 'd9a68d02080c2dcaf61306ab94c64f3b0df5b9f0', 'size': '996', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'data/jhotdraw/jhotdraw-5.4b2/CH/ifa/draw/framework/DrawingChangeEvent.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '95'}, {'name': 'HTML', 'bytes': '18697'}, {'name': 'Java', 'bytes': '83306379'}]}
{{<govuk_template}} {{$pageTitle}} Summary of title {{/pageTitle}} {{$head}} {{>includes/head}} <link href="/public/vendor/leaflet/leaflet.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/public/stylesheets/alphagov-static.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/public/stylesheets/land-registry-elements.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/public/stylesheets/title-summary.css" media="screen" rel="stylesheet" type="text/css" /> <link href="/public/stylesheets/search-results.css" media="screen" rel="stylesheet" type="text/css" /> {{/head}} {{$content}} <main id="content" role="main"> {{>digital-register/includes/banner}} <div class="grid-row"> <div class="global-breadcrumb column-two-thirds"> <nav role="navigation"> <ol> <li><a href="search-page">Find a title</a></li> <li><a href="search-results">Search results</a></li> <li><strong>Summary of title</strong></li> </ol> </nav> </div><!-- global-breadcrumb --> <div class="column-third"> {{>digital-register/includes/login}} </div><!-- column-third --> </div><!-- grid-row --> <section> <h1 class="heading-xlarge">Summary of title</h1> <div class="grid-row"> <div class="column-half"> <div class="title-address lede" itemscope itemtype="http://schema.org/PostalAddress"> <span itemprop="streetAddress"> 3a Mandela Way<br> </span> <span itemprop="addressLocality">Southampton</span><br> <span itemprop="postalCode">SO15 5RZ</span> </div> <dl class="definition-tabular--b"> <dt>Title number</dt> <dd>HP725748</dd> <dt>Tenure type</dt> <dd>Leasehold</dd> <dt>Price paid</dt> <dd>&pound;188,000 on 3 October 2012</dd> <dt>Owner</dt> <dd>Darcy Bloggs</dd> </dl> <p class="footnote expand-bottom">This title was last changed on <b>15 October 2012</b> at <b>11:21:18</b></p> </div> <figure class="column-half"> <div class="title-plan" id="map-location" style="width: 465px; height: 265px;"> <img src="http://placehold.it/465x265" alt="Map showing location of title address"> </div> </figure> </div> </section> <section> <h2 class="heading-large collapse-top">Available documents</h2> <form class="form text document-selection" action="purchase-documents" method="get"> <label for="box-1" class="bold-medium"> <input type="checkbox" id="box-1"> Title register <span>&pound;3</span> </label> <p> Details about the property or land, including any rights of way.<br> </p> <label for="box-2" class="bold-medium"> <input type="checkbox" id="box-2"> Title plan <span>&pound;3</span> </label> <p> The property’s location and general boundaries, prepared on the latest Ordnance Survey map available at the time of registration.<br> </p> <label for="box-3" class="bold-medium"> <input type="checkbox" id="box-3"> Flood risk indicator <span>&pound;10.80</span> </label> <p> Gives information on how likely the land or property is to flood.<br> </p> <button class="button">Buy selected documents</button> <div class="panel-indent footnote text"> <p>If you require a <b>full legal copy</b> of the title register, admissible in evidence in a court, <a href="#">you can order one here</a>.</p> </div> </form> </section> <section class="grid-row"> <div class="column-two-thirds"> <div class="legal-division--top"> <h2 class="heading-medium collapse-top">Related titles</h2> <div class="panel-indent footnote text"> <p>For example, a related title could be the freehold building which contains several leasehold flats.</p> </div> <ol> <li> <h2 class="heading-small collapse-bottom"> <a href="#">3 Mandela Way, Southampton, SO15 5RZ</a> </h2> <div class="font-xsmall"> Title number HP725747<br> <b>Freehold</b> terraced house </div> </li> </ol> </div> </div> </section> </main> {{/content}} {{$footerSupportLinks}} {{>property-page/prototype-v1/includes/footer-support-links}} {{/footerSupportLinks}} {{$bodyEnd}} {{>includes/scripts}} <script type="text/javascript" src="/public/vendor/leaflet/leaflet.js"></script> <script type="text/javascript"> // initialise map var map = L.map('map-location', { scrollWheelZoom: false }).setView([50.908876, -1.4153305], 19); L.tileLayer('http://{s}.tiles.mapbox.com/v3/demotive.la5i4jpb/{z}/{x}/{y}.png', { attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery &copy; <a href="http://mapbox.com">Mapbox</a>', maxZoom: 22 }).addTo(map); var polygon = L.polygon( [ [50.908898, -1.41543], [50.908915, -1.4153305], [50.908855, -1.415305], [50.908837, -1.415402], [50.908876, -1.415423] ], { color: '#fff', weight: 3, opacity: 1, fillColor: '#ffbf47', fillOpacity: 1, clickable: false } ).addTo(map); </script> {{/bodyEnd}} {{/govuk_template}}
{'content_hash': '5ff82ed088466ac2e66d4920409d6005', 'timestamp': '', 'source': 'github', 'line_count': 184, 'max_line_length': 220, 'avg_line_length': 30.543478260869566, 'alnum_prop': 0.5848754448398576, 'repo_name': 'LandRegistry/property-page-html-prototypes', 'id': '277e9cf77b920c59dda8c498eb4993058c2f9e31', 'size': '5622', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/views/digital-register/journeys/v5/title-summary.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '53727'}, {'name': 'HTML', 'bytes': '619633'}, {'name': 'JavaScript', 'bytes': '37128'}]}
using NUnit.Framework; using CurrencyCloud.Tests.Mock.Data; using CurrencyCloud.Entity.Pagination; using CurrencyCloud.Tests.Mock.Http; using CurrencyCloud.Environment; using System.Threading.Tasks; using CurrencyCloud.Entity; namespace CurrencyCloud.Tests { [TestFixture] public class ReportRequestsTest { Client client = new Client(); Player player = new Player("/../../Mock/Http/Recordings/ReportRequests.json"); [OneTimeSetUpAttribute] public void SetUp() { player.Start(ApiServer.Mock.Url); player.Play("SetUp"); var credentials = Authentication.Credentials; client.InitializeAsync(Authentication.ApiServer, credentials.LoginId, credentials.ApiKey).Wait(); } [OneTimeTearDownAttribute] public void TearDown() { player.Play("TearDown"); client.CloseAsync().Wait(); player.Close(); } /// <summary> /// Successfully creates a conversion report. /// </summary> [Test] public async Task CreateConversionReport() { player.Play("CreateConversionReport"); var report = ReportRequests.Report3; ReportRequest gotten = await client.CreateConversionReportAsync(new ReportParameters { Description = "New Conversion test report", UniqueRequestId = "1b3687dc-c779-4fe7-9515-00a6509632c4" } ); Assert.IsNotNull(gotten); Assert.AreEqual(report.Status, gotten.Status); Assert.AreEqual(report.Description, gotten.Description); Assert.AreEqual(report.Id, gotten.Id); Assert.AreEqual(report.AccountId, gotten.AccountId); Assert.AreEqual(report.ContactId, gotten.ContactId); Assert.AreEqual(report.CreatedAt, gotten.CreatedAt); Assert.AreEqual(report.ExpirationDate, gotten.ExpirationDate); Assert.AreEqual(report.FailureReason, gotten.FailureReason); Assert.AreEqual(report.ReportType, gotten.ReportType); Assert.AreEqual(report.ReportUrl, gotten.ReportUrl); Assert.AreEqual(report.SearchParams.Description, gotten.SearchParams.Description); Assert.AreEqual(report.SearchParams.Scope, gotten.SearchParams.Scope); Assert.AreEqual(report.ShortReference, gotten.ShortReference); Assert.AreEqual(report.UpdatedAt, gotten.UpdatedAt); } /// <summary> /// Successfully gets a conversion report. /// </summary> [Test] public async Task GetConversionReport() { player.Play("GetConversionReport"); var report = ReportRequests.Report1; ReportRequest gotten = await client.GetReportRequestAsync(report.Id); Assert.IsNotNull(gotten); Assert.AreEqual(report.Status, gotten.Status); Assert.AreEqual(report.Description, gotten.Description); Assert.AreEqual(report.Id, gotten.Id); Assert.AreEqual(report.AccountId, gotten.AccountId); Assert.AreEqual(report.ContactId, gotten.ContactId); Assert.AreEqual(report.CreatedAt, gotten.CreatedAt); Assert.AreEqual(report.ExpirationDate, gotten.ExpirationDate); Assert.AreEqual(report.FailureReason, gotten.FailureReason); Assert.AreEqual(report.ReportType, gotten.ReportType); Assert.AreEqual(report.ReportUrl, gotten.ReportUrl); Assert.AreEqual(report.SearchParams, gotten.SearchParams); Assert.AreEqual(report.ShortReference, gotten.ShortReference); Assert.AreEqual(report.UpdatedAt, gotten.UpdatedAt); } /// <summary> /// Successfully creates a payment report. /// </summary> [Test] public async Task CreatePaymentReport() { player.Play("CreatePaymentReport"); var report = ReportRequests.Report4; ReportRequest gotten = await client.CreatePaymentReportAsync(new ReportParameters { Description = "New Payment test report", UniqueRequestId = "2422a1ee-b376-4358-a4f2-560aa953c461" } ); Assert.IsNotNull(gotten); Assert.AreEqual(report.Status, gotten.Status); Assert.AreEqual(report.Description, gotten.Description); Assert.AreEqual(report.Id, gotten.Id); Assert.AreEqual(report.AccountId, gotten.AccountId); Assert.AreEqual(report.ContactId, gotten.ContactId); Assert.AreEqual(report.CreatedAt, gotten.CreatedAt); Assert.AreEqual(report.ExpirationDate, gotten.ExpirationDate); Assert.AreEqual(report.FailureReason, gotten.FailureReason); Assert.AreEqual(report.ReportType, gotten.ReportType); Assert.AreEqual(report.ReportUrl, gotten.ReportUrl); Assert.AreEqual(report.SearchParams.Description, gotten.SearchParams.Description); Assert.AreEqual(report.SearchParams.Scope, gotten.SearchParams.Scope); Assert.AreEqual(report.ShortReference, gotten.ShortReference); Assert.AreEqual(report.UpdatedAt, gotten.UpdatedAt); } /// <summary> /// Successfully gets a payment report. /// </summary> [Test] public async Task GetPaymentReport() { player.Play("GetPaymentReport"); var report = ReportRequests.Report2; ReportRequest gotten = await client.GetReportRequestAsync(report.Id); Assert.IsNotNull(gotten); Assert.AreEqual(report.Status, gotten.Status); Assert.AreEqual(report.Description, gotten.Description); Assert.AreEqual(report.Id, gotten.Id); Assert.AreEqual(report.AccountId, gotten.AccountId); Assert.AreEqual(report.ContactId, gotten.ContactId); Assert.AreEqual(report.CreatedAt, gotten.CreatedAt); Assert.AreEqual(report.ExpirationDate, gotten.ExpirationDate); Assert.AreEqual(report.FailureReason, gotten.FailureReason); Assert.AreEqual(report.ReportType, gotten.ReportType); Assert.AreEqual(report.ReportUrl, gotten.ReportUrl); Assert.AreEqual(report.SearchParams, gotten.SearchParams); Assert.AreEqual(report.ShortReference, gotten.ShortReference); Assert.AreEqual(report.UpdatedAt, gotten.UpdatedAt); } /// <summary> /// Successfully finds report requests without search parameters. /// </summary> [Test] public async Task FindNoParams() { player.Play("FindNoParams"); var report1 = ReportRequests.Report1; var report2 = ReportRequests.Report2; PaginatedReportRequests found = await client.FindReportRequestsAsync(); Assert.IsNotEmpty(found.ReportRequests); Assert.AreEqual(found.ReportRequests.Count, found.Pagination.TotalEntries); Assert.AreEqual(report1.Status, found.ReportRequests[0].Status); Assert.AreEqual(report1.Description, found.ReportRequests[0].Description); Assert.AreEqual(report1.Id, found.ReportRequests[0].Id); Assert.AreEqual(report1.AccountId, found.ReportRequests[0].AccountId); Assert.AreEqual(report1.ContactId, found.ReportRequests[0].ContactId); Assert.AreEqual(report1.CreatedAt, found.ReportRequests[0].CreatedAt); Assert.AreEqual(report1.ExpirationDate, found.ReportRequests[0].ExpirationDate); Assert.AreEqual(report1.FailureReason, found.ReportRequests[0].FailureReason); Assert.AreEqual(report1.ReportType, found.ReportRequests[0].ReportType); Assert.AreEqual(report1.ReportUrl, found.ReportRequests[0].ReportUrl); Assert.AreEqual(report1.SearchParams, found.ReportRequests[0].SearchParams); Assert.AreEqual(report1.ShortReference, found.ReportRequests[0].ShortReference); Assert.AreEqual(report1.UpdatedAt, found.ReportRequests[0].UpdatedAt); Assert.AreEqual(report2.Status, found.ReportRequests[1].Status); Assert.AreEqual(report2.Description, found.ReportRequests[1].Description); Assert.AreEqual(report2.Id, found.ReportRequests[1].Id); Assert.AreEqual(report2.AccountId, found.ReportRequests[1].AccountId); Assert.AreEqual(report2.ContactId, found.ReportRequests[1].ContactId); Assert.AreEqual(report2.CreatedAt, found.ReportRequests[1].CreatedAt); Assert.AreEqual(report2.ExpirationDate, found.ReportRequests[1].ExpirationDate); Assert.AreEqual(report2.FailureReason, found.ReportRequests[1].FailureReason); Assert.AreEqual(report2.ReportType, found.ReportRequests[1].ReportType); Assert.AreEqual(report2.ReportUrl, found.ReportRequests[1].ReportUrl); Assert.AreEqual(report2.SearchParams, found.ReportRequests[1].SearchParams); Assert.AreEqual(report2.ShortReference, found.ReportRequests[1].ShortReference); Assert.AreEqual(report2.UpdatedAt, found.ReportRequests[1].UpdatedAt); } /// <summary> /// Successfully finds report requests with search parameters. /// </summary> [Test] public async Task FindWithParams() { player.Play("FindWithParams"); var report1 = ReportRequests.Report1; PaginatedReportRequests found = await client.FindReportRequestsAsync( new ReportRequestFindParameters { ReportType = "conversion"} ); Assert.IsNotEmpty(found.ReportRequests); Assert.AreEqual(found.ReportRequests.Count, found.Pagination.TotalEntries); Assert.AreEqual(report1.Status, found.ReportRequests[0].Status); Assert.AreEqual(report1.Description, found.ReportRequests[0].Description); Assert.AreEqual(report1.Id, found.ReportRequests[0].Id); Assert.AreEqual(report1.AccountId, found.ReportRequests[0].AccountId); Assert.AreEqual(report1.ContactId, found.ReportRequests[0].ContactId); Assert.AreEqual(report1.CreatedAt, found.ReportRequests[0].CreatedAt); Assert.AreEqual(report1.ExpirationDate, found.ReportRequests[0].ExpirationDate); Assert.AreEqual(report1.FailureReason, found.ReportRequests[0].FailureReason); Assert.AreEqual(report1.ReportType, found.ReportRequests[0].ReportType); Assert.AreEqual(report1.ReportUrl, found.ReportRequests[0].ReportUrl); Assert.AreEqual(report1.SearchParams, found.ReportRequests[0].SearchParams); Assert.AreEqual(report1.ShortReference, found.ReportRequests[0].ShortReference); Assert.AreEqual(report1.UpdatedAt, found.ReportRequests[0].UpdatedAt); } } }
{'content_hash': '769973f552399fc2ae36781af38e2387', 'timestamp': '', 'source': 'github', 'line_count': 237, 'max_line_length': 109, 'avg_line_length': 46.970464135021096, 'alnum_prop': 0.6573841178584262, 'repo_name': 'CurrencyCloud/currencycloud-net', 'id': '589bc7e0dc53365adddce663b471a6841bacc710', 'size': '11132', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Source/CurrencyCloud.Tests/ReportRequestsTest.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '416760'}]}
<!-- Views --> <div ng-controller="FALMHousekeepingEditController" ng-include="" src="'/App_Plugins/FALM/backoffice/housekeeping/view/logs-tlmanager.html'"></div>
{'content_hash': '4bd11972af7d84685dd9910965136d6f', 'timestamp': '', 'source': 'github', 'line_count': 2, 'max_line_length': 147, 'avg_line_length': 81.5, 'alnum_prop': 0.7484662576687117, 'repo_name': 'FALM-Umbraco-Projects/FALM-Housekeeping-v7', 'id': '70c81259d55dc57f9af060970f4776c71ebc6417', 'size': '165', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'FALMHousekeeping/App_Plugins/FALM/backoffice/housekeeping/edittl.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '137937'}, {'name': 'CSS', 'bytes': '44034'}, {'name': 'HTML', 'bytes': '87218'}, {'name': 'JavaScript', 'bytes': '92468'}]}
<?php /** * System Events English lexicon topic * * @language en * @package modx * @subpackage lexicon */ $_lang['clear'] = 'Jelas'; $_lang['error_log'] = 'Log kesalahan'; $_lang['error_log_desc'] = 'Berikut adalah log kesalahan untuk MODX Revolusi:'; $_lang['error_log_download'] = 'Men-download Log kesalahan ([[+size]])'; $_lang['error_log_too_large'] = 'Log kesalahan di <em>[[+name]]</em> terlalu besar untuk dilihat. Anda dapat mendownload melalui tombol di bawah ini.'; $_lang['system_events'] = 'Sistem kegiatan'; $_lang['priority'] = 'Prioritas';
{'content_hash': '208698d19d64fb04f85886f054911759', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 151, 'avg_line_length': 37.4, 'alnum_prop': 0.6684491978609626, 'repo_name': 'rustyhutchison/rustyhutchison.github.io', 'id': '32b46a56fcc291bd15f6b3b29acf063eb40b9a93', 'size': '561', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'core/lexicon/id/system_events.inc.php', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '720933'}, {'name': 'HTML', 'bytes': '142352'}, {'name': 'Java', 'bytes': '14870'}, {'name': 'JavaScript', 'bytes': '1890914'}, {'name': 'PHP', 'bytes': '19285305'}, {'name': 'SQLPL', 'bytes': '4547'}, {'name': 'Smarty', 'bytes': '198133'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': '1c1ca3afb8bc989523089cc256faa7d7', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'b1a1cc3cbfe2574b56dd375908dfdc5b0b36487d', 'size': '186', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Paspalidium/Paspalidium constrictum/ Syn. Panicum flavidum tenuius/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
class CreateOfferingInterviews < ActiveRecord::Migration def self.up create_table :offering_interviews do |t| t.datetime :start_time t.string :location t.timestamps end end def self.down drop_table :offering_interviews end end
{'content_hash': '290812941ec1ee7eb4d0c71212ca1745', 'timestamp': '', 'source': 'github', 'line_count': 14, 'max_line_length': 56, 'avg_line_length': 19.071428571428573, 'alnum_prop': 0.6928838951310862, 'repo_name': 'joshlin/expo2', 'id': 'cfba515925154c77e063417574a3c58900fa87f2', 'size': '267', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'db/migrate/136_create_offering_interviews.rb', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '20409'}, {'name': 'CoffeeScript', 'bytes': '151'}, {'name': 'HTML', 'bytes': '16253'}, {'name': 'JavaScript', 'bytes': '824'}, {'name': 'Ruby', 'bytes': '466661'}]}
package com.hazelcast.client.cp.internal.datastructures.semaphore; import com.hazelcast.client.cp.internal.session.ClientProxySessionManager; import com.hazelcast.client.impl.clientside.HazelcastClientInstanceImpl; import com.hazelcast.client.impl.protocol.ClientMessage; import com.hazelcast.client.impl.protocol.codec.CPGroupDestroyCPObjectCodec; import com.hazelcast.client.impl.protocol.codec.SemaphoreAcquireCodec; import com.hazelcast.client.impl.protocol.codec.SemaphoreAvailablePermitsCodec; import com.hazelcast.client.impl.protocol.codec.SemaphoreChangeCodec; import com.hazelcast.client.impl.protocol.codec.SemaphoreDrainCodec; import com.hazelcast.client.impl.protocol.codec.SemaphoreInitCodec; import com.hazelcast.client.impl.protocol.codec.SemaphoreReleaseCodec; import com.hazelcast.client.impl.spi.ClientContext; import com.hazelcast.client.impl.spi.ClientProxy; import com.hazelcast.client.impl.spi.impl.ClientInvocation; import com.hazelcast.cp.CPGroupId; import com.hazelcast.cp.ISemaphore; import com.hazelcast.cp.internal.RaftGroupId; import com.hazelcast.cp.internal.datastructures.exception.WaitKeyCancelledException; import com.hazelcast.cp.internal.datastructures.semaphore.SemaphoreService; import com.hazelcast.cp.internal.session.SessionExpiredException; import com.hazelcast.internal.util.Clock; import java.util.UUID; import java.util.concurrent.TimeUnit; import static com.hazelcast.cp.internal.datastructures.semaphore.proxy.SessionAwareSemaphoreProxy.DRAIN_SESSION_ACQ_COUNT; import static com.hazelcast.cp.internal.session.AbstractProxySessionManager.NO_SESSION_ID; import static com.hazelcast.internal.util.Preconditions.checkNotNegative; import static com.hazelcast.internal.util.Preconditions.checkPositive; import static com.hazelcast.internal.util.ThreadUtil.getThreadId; import static com.hazelcast.internal.util.UuidUtil.newUnsecureUUID; import static java.lang.Math.max; /** * Client-side session-aware proxy of Raft-based {@link ISemaphore} */ public class SessionAwareSemaphoreProxy extends ClientProxy implements ISemaphore { private final ClientProxySessionManager sessionManager; private final RaftGroupId groupId; private final String objectName; public SessionAwareSemaphoreProxy(ClientContext context, RaftGroupId groupId, String proxyName, String objectName) { super(SemaphoreService.SERVICE_NAME, proxyName, context); this.sessionManager = getClient().getProxySessionManager(); this.groupId = groupId; this.objectName = objectName; } @Override public boolean init(int permits) { checkNotNegative(permits, "Permits must be non-negative!"); ClientMessage request = SemaphoreInitCodec.encodeRequest(groupId, objectName, permits); HazelcastClientInstanceImpl client = getClient(); ClientMessage response = new ClientInvocation(client, request, objectName).invoke().joinInternal(); return SemaphoreInitCodec.decodeResponse(response); } @Override public void acquire() { acquire(1); } @Override public void acquire(int permits) { checkPositive("permits", permits); long threadId = getThreadId(); UUID invocationUid = newUnsecureUUID(); for (; ; ) { long sessionId = sessionManager.acquireSession(this.groupId, permits); try { ClientMessage request = SemaphoreAcquireCodec.encodeRequest(groupId, objectName, sessionId, threadId, invocationUid, permits, -1); HazelcastClientInstanceImpl client = getClient(); new ClientInvocation(client, request, objectName).invoke().joinInternal(); return; } catch (SessionExpiredException e) { sessionManager.invalidateSession(this.groupId, sessionId); } catch (WaitKeyCancelledException e) { sessionManager.releaseSession(this.groupId, sessionId, permits); throw new IllegalStateException("Semaphore[" + objectName + "] not acquired because the acquire call " + "on the CP group is cancelled, possibly because of another indeterminate call from the same thread."); } catch (RuntimeException e) { sessionManager.releaseSession(this.groupId, sessionId, permits); throw e; } } } @Override public boolean tryAcquire() { return tryAcquire(1); } @Override public boolean tryAcquire(int permits) { return tryAcquire(permits, 0, TimeUnit.MILLISECONDS); } @Override public boolean tryAcquire(long timeout, TimeUnit unit) { return tryAcquire(1, timeout, unit); } @Override public boolean tryAcquire(int permits, long timeout, TimeUnit unit) { checkPositive(permits, "Permits must be positive!"); long timeoutMs = max(0, unit.toMillis(timeout)); long threadId = getThreadId(); UUID invocationUid = newUnsecureUUID(); long start; for (; ; ) { start = Clock.currentTimeMillis(); long sessionId = sessionManager.acquireSession(this.groupId, permits); try { ClientMessage request = SemaphoreAcquireCodec.encodeRequest(groupId, objectName, sessionId, threadId, invocationUid, permits, timeoutMs); HazelcastClientInstanceImpl client = getClient(); ClientMessage response = new ClientInvocation(client, request, objectName).invoke().joinInternal(); boolean acquired = SemaphoreAcquireCodec.decodeResponse(response); if (!acquired) { sessionManager.releaseSession(this.groupId, sessionId, permits); } return acquired; } catch (SessionExpiredException e) { sessionManager.invalidateSession(this.groupId, sessionId); timeoutMs -= (Clock.currentTimeMillis() - start); if (timeoutMs <= 0) { return false; } } catch (WaitKeyCancelledException e) { sessionManager.releaseSession(this.groupId, sessionId, permits); return false; } catch (RuntimeException e) { sessionManager.releaseSession(this.groupId, sessionId, permits); throw e; } } } @Override public void release() { release(1); } @Override public void release(int permits) { checkPositive(permits, "Permits must be positive!"); long sessionId = sessionManager.getSession(groupId); if (sessionId == NO_SESSION_ID) { throw newIllegalStateException(null); } long threadId = getThreadId(); UUID invocationUid = newUnsecureUUID(); try { ClientMessage request = SemaphoreReleaseCodec.encodeRequest(groupId, objectName, sessionId, threadId, invocationUid, permits); HazelcastClientInstanceImpl client = getClient(); new ClientInvocation(client, request, objectName).invoke().joinInternal(); } catch (SessionExpiredException e) { sessionManager.invalidateSession(this.groupId, sessionId); throw newIllegalStateException(e); } finally { sessionManager.releaseSession(this.groupId, sessionId, permits); } } @Override public int availablePermits() { ClientMessage request = SemaphoreAvailablePermitsCodec.encodeRequest(groupId, objectName); HazelcastClientInstanceImpl client = getClient(); ClientMessage response = new ClientInvocation(client, request, objectName).invoke().joinInternal(); return SemaphoreAvailablePermitsCodec.decodeResponse(response); } @Override public int drainPermits() { long threadId = getThreadId(); UUID invocationUid = newUnsecureUUID(); for (; ; ) { long sessionId = sessionManager.acquireSession(this.groupId, DRAIN_SESSION_ACQ_COUNT); try { ClientMessage request = SemaphoreDrainCodec.encodeRequest(groupId, objectName, sessionId, threadId, invocationUid); HazelcastClientInstanceImpl client = getClient(); ClientMessage response = new ClientInvocation(client, request, objectName).invoke().joinInternal(); int count = SemaphoreDrainCodec.decodeResponse(response); sessionManager.releaseSession(groupId, sessionId, DRAIN_SESSION_ACQ_COUNT - count); return count; } catch (SessionExpiredException e) { sessionManager.invalidateSession(this.groupId, sessionId); } catch (RuntimeException e) { sessionManager.releaseSession(this.groupId, sessionId, DRAIN_SESSION_ACQ_COUNT); throw e; } } } @Override public void reducePermits(int reduction) { checkNotNegative(reduction, "Reduction must be non-negative!"); if (reduction == 0) { return; } doChangePermits(-reduction); } @Override public void increasePermits(int increase) { checkNotNegative(increase, "Increase must be non-negative!"); if (increase == 0) { return; } doChangePermits(increase); } @Override public String getPartitionKey() { throw new UnsupportedOperationException(); } @Override public void onDestroy() { ClientMessage request = CPGroupDestroyCPObjectCodec.encodeRequest(groupId, getServiceName(), objectName); new ClientInvocation(getClient(), request, name).invoke().joinInternal(); } public CPGroupId getGroupId() { return groupId; } private void doChangePermits(int delta) { long sessionId = sessionManager.acquireSession(groupId); long threadId = getThreadId(); UUID invocationUid = newUnsecureUUID(); try { ClientMessage request = SemaphoreChangeCodec.encodeRequest(groupId, objectName, sessionId, threadId, invocationUid, delta); new ClientInvocation(getClient(), request, objectName).invoke().joinInternal(); } catch (SessionExpiredException e) { sessionManager.invalidateSession(this.groupId, sessionId); throw newIllegalStateException(e); } finally { sessionManager.releaseSession(this.groupId, sessionId); } } private IllegalStateException newIllegalStateException(SessionExpiredException e) { return new IllegalStateException("No valid session!", e); } }
{'content_hash': '6908b549aeacedf269cb974cdb27ea9d', 'timestamp': '', 'source': 'github', 'line_count': 260, 'max_line_length': 128, 'avg_line_length': 41.62307692307692, 'alnum_prop': 0.673627795231935, 'repo_name': 'emre-aydin/hazelcast', 'id': '796e8b81c3d4dd8a6ea5ec59dc50ac1e4988e30d', 'size': '11447', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'hazelcast/src/main/java/com/hazelcast/client/cp/internal/datastructures/semaphore/SessionAwareSemaphoreProxy.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '1261'}, {'name': 'C', 'bytes': '353'}, {'name': 'Java', 'bytes': '39634758'}, {'name': 'Shell', 'bytes': '29479'}]}
module Data.Attoparsec.Final.Parser ( Parser(..) ) where import Data.Attoparsec.Final.Parser.Internal
{'content_hash': '0649eda0dfb8e3b0f59e25891e5d5e8d', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 44, 'avg_line_length': 22.2, 'alnum_prop': 0.7297297297297297, 'repo_name': 'haskell-works/data-json-tokenize', 'id': '0afe0263693c6d9193868f775487d00c9630b803', 'size': '111', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/Data/Attoparsec/Final/Parser.hs', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Haskell', 'bytes': '10582'}]}
package ch.bfh.cas.bgd.ta.util; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.util.HashSet; import java.util.Scanner; import scala.Serializable; public class TextFile implements Serializable { private static final long serialVersionUID = -743705015706456706L; public static String readFile(String pathname) throws IOException { File file = new File(pathname); StringBuilder fileContents = new StringBuilder((int)file.length()); Scanner scanner = new Scanner(file); String lineSeparator = System.getProperty("line.separator"); try { while(scanner.hasNextLine()) { fileContents.append(scanner.nextLine() + lineSeparator); } return fileContents.toString(); } finally { scanner.close(); } } public static HashSet<String> readFileAsHashSet(String filename) throws FileNotFoundException { File file = new File(filename); Scanner scanner = new Scanner(file); return readLinewise(scanner); } private static HashSet<String> readLinewise(Scanner scanner) { HashSet<String> words = new HashSet<String>(); while (scanner.hasNext()) { // one word per line words.add(scanner.next()); } scanner.close(); return words; } }
{'content_hash': '0512fa833db82a641ed1ef2d215e220d', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 96, 'avg_line_length': 29.568181818181817, 'alnum_prop': 0.6971560338201384, 'repo_name': 'StrubT/CASBGDTextAnalysis', 'id': 'c9153c4cdeed36beabdf831b542fd15c1914488e', 'size': '1301', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'sentiment/src/main/java/ch/bfh/cas/bgd/ta/util/TextFile.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '87751'}, {'name': 'Shell', 'bytes': '1647'}]}
package flatbuf import ( flatbuffers "github.com/google/flatbuffers/go" ) type Message struct { _tab flatbuffers.Table } func GetRootAsMessage(buf []byte, offset flatbuffers.UOffsetT) *Message { n := flatbuffers.GetUOffsetT(buf[offset:]) x := &Message{} x.Init(buf, n+offset) return x } func (rcv *Message) Init(buf []byte, i flatbuffers.UOffsetT) { rcv._tab.Bytes = buf rcv._tab.Pos = i } func (rcv *Message) Table() flatbuffers.Table { return rcv._tab } func (rcv *Message) Version() MetadataVersion { o := flatbuffers.UOffsetT(rcv._tab.Offset(4)) if o != 0 { return rcv._tab.GetInt16(o + rcv._tab.Pos) } return 0 } func (rcv *Message) MutateVersion(n MetadataVersion) bool { return rcv._tab.MutateInt16Slot(4, n) } func (rcv *Message) HeaderType() byte { o := flatbuffers.UOffsetT(rcv._tab.Offset(6)) if o != 0 { return rcv._tab.GetByte(o + rcv._tab.Pos) } return 0 } func (rcv *Message) MutateHeaderType(n byte) bool { return rcv._tab.MutateByteSlot(6, n) } func (rcv *Message) Header(obj *flatbuffers.Table) bool { o := flatbuffers.UOffsetT(rcv._tab.Offset(8)) if o != 0 { rcv._tab.Union(obj, o) return true } return false } func (rcv *Message) BodyLength() int64 { o := flatbuffers.UOffsetT(rcv._tab.Offset(10)) if o != 0 { return rcv._tab.GetInt64(o + rcv._tab.Pos) } return 0 } func (rcv *Message) MutateBodyLength(n int64) bool { return rcv._tab.MutateInt64Slot(10, n) } func (rcv *Message) CustomMetadata(obj *KeyValue, j int) bool { o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) if o != 0 { x := rcv._tab.Vector(o) x += flatbuffers.UOffsetT(j) * 4 x = rcv._tab.Indirect(x) obj.Init(rcv._tab.Bytes, x) return true } return false } func (rcv *Message) CustomMetadataLength() int { o := flatbuffers.UOffsetT(rcv._tab.Offset(12)) if o != 0 { return rcv._tab.VectorLen(o) } return 0 } func MessageStart(builder *flatbuffers.Builder) { builder.StartObject(5) } func MessageAddVersion(builder *flatbuffers.Builder, version int16) { builder.PrependInt16Slot(0, version, 0) } func MessageAddHeaderType(builder *flatbuffers.Builder, headerType byte) { builder.PrependByteSlot(1, headerType, 0) } func MessageAddHeader(builder *flatbuffers.Builder, header flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(header), 0) } func MessageAddBodyLength(builder *flatbuffers.Builder, bodyLength int64) { builder.PrependInt64Slot(3, bodyLength, 0) } func MessageAddCustomMetadata(builder *flatbuffers.Builder, customMetadata flatbuffers.UOffsetT) { builder.PrependUOffsetTSlot(4, flatbuffers.UOffsetT(customMetadata), 0) } func MessageStartCustomMetadataVector(builder *flatbuffers.Builder, numElems int) flatbuffers.UOffsetT { return builder.StartVector(4, numElems, 4) } func MessageEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT { return builder.EndObject() }
{'content_hash': '2a1c4b1363bb30dbb28401854fc6f9c7', 'timestamp': '', 'source': 'github', 'line_count': 115, 'max_line_length': 104, 'avg_line_length': 24.956521739130434, 'alnum_prop': 0.7240418118466899, 'repo_name': 'majetideepak/arrow', 'id': '76fcc389d1dee9306eabb699056356c41eb111a9', 'size': '3727', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'go/arrow/internal/flatbuf/Message.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '73655'}, {'name': 'Awk', 'bytes': '3683'}, {'name': 'Batchfile', 'bytes': '32714'}, {'name': 'C', 'bytes': '334766'}, {'name': 'C#', 'bytes': '505406'}, {'name': 'C++', 'bytes': '8830397'}, {'name': 'CMake', 'bytes': '443673'}, {'name': 'CSS', 'bytes': '3946'}, {'name': 'Dockerfile', 'bytes': '51066'}, {'name': 'Emacs Lisp', 'bytes': '931'}, {'name': 'FreeMarker', 'bytes': '2271'}, {'name': 'Go', 'bytes': '835735'}, {'name': 'HTML', 'bytes': '22930'}, {'name': 'Java', 'bytes': '2941380'}, {'name': 'JavaScript', 'bytes': '99135'}, {'name': 'Lua', 'bytes': '8771'}, {'name': 'M4', 'bytes': '8712'}, {'name': 'MATLAB', 'bytes': '36600'}, {'name': 'Makefile', 'bytes': '49294'}, {'name': 'Meson', 'bytes': '37613'}, {'name': 'Objective-C', 'bytes': '11580'}, {'name': 'PLpgSQL', 'bytes': '56995'}, {'name': 'Perl', 'bytes': '3799'}, {'name': 'Python', 'bytes': '1885355'}, {'name': 'R', 'bytes': '214313'}, {'name': 'Ruby', 'bytes': '729461'}, {'name': 'Rust', 'bytes': '2011342'}, {'name': 'Shell', 'bytes': '358704'}, {'name': 'TSQL', 'bytes': '29787'}, {'name': 'Thrift', 'bytes': '138360'}, {'name': 'TypeScript', 'bytes': '1125277'}]}
import ApplicationSerializer from 'ember-fhir-adapter/serializers/application'; var CommunicationRequestPayloadComponent = ApplicationSerializer.extend({ attrs:{ contentAttachment : {embedded: 'always'}, contentReference : {embedded: 'always'} } }); export default CommunicationRequestPayloadComponent;
{'content_hash': 'faa00a32868c6b19608e26c94857dc99', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 79, 'avg_line_length': 36.888888888888886, 'alnum_prop': 0.7530120481927711, 'repo_name': 'intervention-engine/ember-fhir-adapter', 'id': '3bc7fa163b1127c8e4c963bd8b81014daf95e92b', 'size': '332', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'addon/serializers/communication-request-payload-component.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '1626'}, {'name': 'JavaScript', 'bytes': '766477'}]}
<?php /** * @class Shopgate_Model_Catalog_Validation * @see http://developer.shopgate.com/file_formats/xml/products * * @method setValidationType(string $value) * @method string getValidationType() * * @method setValue(string $value) * @method string getValue() * */ class Shopgate_Model_Catalog_Validation extends Shopgate_Model_AbstractExport { /** * types */ const DEFAULT_VALIDATION_TYPE_FILE = 'file'; const DEFAULT_VALIDATION_TYPE_VARIABLE = 'variable'; const DEFAULT_VALIDATION_TYPE_REGEX = 'regex'; /** * file */ const DEFAULT_VALIDATION_FILE_UNKNOWN = 'unknown'; const DEFAULT_VALIDATION_FILE_TEXT = 'text'; const DEFAULT_VALIDATION_FILE_PDF = 'pdf'; const DEFAULT_VALIDATION_FILE_JPEG = 'jpeg'; /** * variable */ const DEFAULT_VALIDATION_VARIABLE_NOT_EMPTY = 'not_empty'; const DEFAULT_VALIDATION_VARIABLE_INT = 'int'; const DEFAULT_VALIDATION_VARIABLE_FLOAT = 'float'; const DEFAULT_VALIDATION_VARIABLE_STRING = 'string'; const DEFAULT_VALIDATION_VARIABLE_DATE = 'date'; const DEFAULT_VALIDATION_VARIABLE_TIME = 'time'; /** * define allowed methods * * @var array */ protected $allowedMethods = array( 'ValidationType', 'Value'); /** * @param Shopgate_Model_XmlResultObject $itemNode * * @return Shopgate_Model_XmlResultObject */ public function asXml(Shopgate_Model_XmlResultObject $itemNode) { /** * @var Shopgate_Model_XmlResultObject $validationNode */ $validationNode = $itemNode->addChildWithCDATA('validation', $this->getValue()); $validationNode->addAttribute('type', $this->getValidationType()); return $itemNode; } }
{'content_hash': '0be71640c1df60ab809347194ec66457', 'timestamp': '', 'source': 'github', 'line_count': 66, 'max_line_length': 82, 'avg_line_length': 24.924242424242426, 'alnum_prop': 0.6984802431610942, 'repo_name': 'roemerdlr/kyojin', 'id': 'ec0857eabc1216013c630be2f48e84529c074486', 'size': '2882', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'lib/Shopgate/classes/models/catalog/Validation.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '20018'}, {'name': 'ApacheConf', 'bytes': '12321'}, {'name': 'Batchfile', 'bytes': '1036'}, {'name': 'CSS', 'bytes': '1864960'}, {'name': 'HTML', 'bytes': '5256105'}, {'name': 'JavaScript', 'bytes': '1135184'}, {'name': 'PHP', 'bytes': '48689882'}, {'name': 'PowerShell', 'bytes': '1028'}, {'name': 'Ruby', 'bytes': '288'}, {'name': 'Shell', 'bytes': '3849'}, {'name': 'XSLT', 'bytes': '2135'}]}
var Component = new Brick.Component(); Component.requires = { mod: [ {name: 'sys', files: ['application.js', 'form.js']}, {name: '{C#MODNAME}', files: ['model.js']} ] }; Component.entryPoint = function(NS){ var COMPONENT = this, SYS = Brick.mod.sys; NS.roles = new Brick.AppRoles('{C#MODNAME}', { isView: 10, isWrite: 30, isAdmin: 50 }); NS.URL = { ws: "#app={C#MODNAMEURI}/wspace/ws/", worker: function(){ return NS.URL.ws + 'worker/WorkerWidget/'; }, config: function(){ return NS.URL.ws + 'configEditor/ConfigEditorWidget/'; }, template: function(module, type, name){ return NS.URL.ws + 'template/TemplateEditorWidget/' + module + '/' + type + '/' + name + '/'; } }; SYS.Application.build(COMPONENT, { configData: { cache: 'configData', response: function(d){ return new NS.ConfigData(d); } }, configSave: { args: ['configData'] }, project: { cache: 'project', response: function(d){ return new NS.Project(d); } }, template: { args: ['module', 'type', 'name'], response: function(d){ return new NS.Template(d); } } }, { initializer: function(){ this.initCallbackFire(); }, fullData: function(callback, context){ var cache = this._appCache; if (cache.configData && cache.project){ return callback.apply(context, [null, cache]); } this.ajaxa({'do': 'fullData'}, callback, context); } }); var L = YAHOO.lang, R = NS.roles; NS.lif = function(f){ return L.isFunction(f) ? f : function(){ }; }; NS.life = function(f, p1, p2, p3, p4, p5, p6, p7){ f = NS.lif(f); f(p1, p2, p3, p4, p5, p6, p7); }; NS.getSelectionText = function(){ var selText = ""; if (document.getSelection){ // firefox selText = document.getSelection(); } else if (document.selection){ // ie selText = document.selection.createRange().text; } else if (window.getSelection){ // Safari selText = window.getSelection(); } return selText + ""; }; NS.getSelectionTextArea = function(el){ if (document.selection){ // ie el.focus(); return document.selection.createRange().text; } else if (el.selectionStart || el.selectionStart == '0'){ // firefox, opera return el.value.substr(el.selectionStart, el.selectionEnd - el.selectionStart); } return ''; }; NS.replaceSelectionTextArea = function(el, text){ el.focus(); if (document.selection){ var s = document.selection.createRange(); if (s.text){ s.text = text; return true; } } else if (typeof(el.selectionStart) == "number"){ if (el.selectionStart != el.selectionEnd){ var start = el.selectionStart, end = el.selectionEnd; el.value = el.value.substr(0, start) + text + el.value.substr(end); } return true; } return false; }; var I18nManager = function(callback){ this.init(callback); }; I18nManager.prototype = { init: function(callback){ this.modules = new NS.ModuleList(); this.languages = {}; var __self = this; R.load(function(){ var sd = { 'do': 'init' }; __self.ajax(sd, function(data){ if (!L.isNull(data)){ __self._updateBoardData(data); } NS.i18nManager = __self; NS.life(callback, __self); }); }); }, ajax: function(data, callback){ data = data || {}; data['tm'] = Math.round((new Date().getTime()) / 1000); Brick.ajax('{C#MODNAME}', { 'data': data, 'event': function(request){ NS.life(callback, request.data); } }); }, _updateBoardData: function(d){ if (L.isNull(d)){ return; } var a = (d['langs'] || '').replace(/\r/gi, '').split('\n'); for (var i = 0; i < a.length; i++){ var s = a[i].split(':'); this.languages[s[0]] = s[1]; } var ms = Brick.Modules, list = []; for (var n in ms){ var mod = new NS.Module({'id': n, 'nm': n}); for (var i = 0; i < ms[n].length; i++){ var comp = new NS.JSComponent(ms[n][i]); comp.module = mod; mod.jsComponents.add(comp); } list[list.length] = mod; } list = list.sort(function(m1, m2){ if (m1.name > m2.name){ return 1; } if (m1.name < m2.name){ return -1; } return 0; }); for (var i = 0; i < list.length; i++){ this.modules.add(list[i]); } // серверные компоненты for (var n in d['srv']){ var mod = this.modules.get(n); if (L.isNull(mod)){ mod = new Module({'id': n, 'nm': n}); } var mis = d['srv'][n]; for (var i = 0; i < mis.length; i++){ var comp = new NS.SrvComponent(mis[i]); comp.module = mod; mod.srvComponents.add(comp); } } } }; NS.I18nManager = I18nManager; NS.i18nManager = null; NS.initI18nManager = function(callback){ if (L.isNull(NS.i18nManager)){ NS.i18nManager = new I18nManager(callback); } else { NS.life(callback, NS.i18nManager); } }; var WS = "#app={C#MODNAMEURI}/wspace/ws/"; NS.navigator = { 'ws': WS, 'about': WS + 'about/AboutWidget/', 'module': { 'view': function(modid){ return WS + 'modview/ModuleViewWidget/' + modid + '/'; } } }; };
{'content_hash': 'c3df0027508a2cbc065dde0a1b82c0e5', 'timestamp': '', 'source': 'github', 'line_count': 234, 'max_line_length': 105, 'avg_line_length': 28.884615384615383, 'alnum_prop': 0.43497558810474923, 'repo_name': 'abricos/abricos-mod-i18n', 'id': 'b4fcfd2740962247ca7e1c6a7463555f34db5d44', 'size': '6778', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/js/lib.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '9623'}, {'name': 'HTML', 'bytes': '13896'}, {'name': 'JavaScript', 'bytes': '76113'}, {'name': 'PHP', 'bytes': '26803'}]}
angular.module('voxity.sms').service('vxtApiSms', [ 'vxtCoreApi', 'vxtSmsConf', '$filter', function (api, smsConf, $filter) { var sms = {}; sms.messages = {}; sms.messages.data = null; sms.messages.lastUpdateData = null; sms.responses = {}; sms.responses.data = {}; sms.responses.lastUpdateData = null; var messages = {}; var responses = {}; sms.baseUri = smsConf.startPath; /** * check if object is sms response or not * @param {Object} sms Text Message object * @return {Boolean} true if is response */ function isResponse(sms){ if (angular.isObject(sms)) { return new Boolean(sms.id_sms_sent) } return undefined; } /** * Check if data is expired * @return {Boolean} */ messages.expiredData = function(){ if (!sms.messages.lastUpdateData){return true;} var now = new Date(); return (now - sms.messages.lastUpdateData ) > smsConf.cacheDuration * 60000; } /** * Clean message send object * @param {Object} sms Text Message to clean * @return {Object} cleaned object */ messages.clean = function(sms){ if (angular.isObject(sms)) { sms.send_date = new Date(sms.send_date); if (sms.delivery_date) { sms.delivery_date = new Date(sms.delivery_date); } return sms; } else { return sms; } } /** * Check if data is expired * @return {Boolean} */ responses.expiredData = function(){ if (!sms.messages.lastUpdateData){return true;} var now = new Date(); return (now - sms.responses.lastUpdateData ) > smsConf.cacheDuration * 60000; } /** * Clean message response object * @param {Object} sms Text Message to clean * @return {Object} cleaned object */ responses.clean = function(sms){ if (angular.isObject(sms)) { sms.send_date = new Date(sms.send_date); return sms; } else { return sms; } } /** * Text message sended get from Voxity api * @param {Function} done Callback with 2 params err(Object), data:(list of Message Object) * @param {Book} force Force query to Api (ignore localCache); */ sms.messages.get = function(done, force){ if (sms.messages.data === {} || messages.expiredData() || force){ sms.messages.data = []; api.request({ url: sms.baseUri, }).success(function(d, status){ if (status == 200 && d.result) { sms.messages.lastUpdateData = new Date(); angular.forEach(d.result, function(elt, index){ sms.messages.data.push(messages.clean(elt)); }); sms.messages.data = $filter('orderBy')(sms.messages.data, '-send_date'); return done(null, sms.messages.data); } else { return done({'status': status, 'data':d}) } }) } else { return done(null, sms.messages.data); } } /** * Text message response get from Voxity api * @param {Function} done Callback with 2 params err(Object), data:(list of ResmonseMessage Object) * @param {Book} force Force query to Api (ignore localCache); */ sms.responses.get = function(done, force){ if (sms.responses.data === {} || responses.expiredData() || force){ sms.responses.data = []; api.request({ url: sms.baseUri + '/responses', }).success(function(d, status){ if (status == 200 && d.result) { sms.responses.lastUpdateData = new Date(); angular.forEach(d.result, function(elt, index){ sms.responses.data.push(responses.clean(elt)); }); sms.responses.data = $filter('orderBy')(sms.responses.data, 'send_date'); return done(null, sms.responses.data); } else { return done({'status': status, 'data':d}) } }) } else { return done(null, sms.responses.data); } } /** * Send text message * @param {Object} sms contains attr content, phone_number, emitter * @param {Function} done with 2 params : err, sms_result */ sms.messages.post = function(mess, done){ if(!angular.isFunction(done)) done = function(){}; api.request({ url: sms.baseUri, data: mess, method: 'POST' }).success(function(d, status){ if (status == 200 && d.result) { if (!angular.isArray(sms.messages.data)) sms.messages.data = []; sms.messages.data.push(messages.clean(d.result)); sms.messages.data = $filter('orderBy')(sms.messages.data, 'send_date'); return done(null, messages.clean(d.result)); } else { return done({'status': status, 'data':d}) } }).error(function(d, status) { return done({'status': status, 'data':d}) }); } /** * clean attribut message * @type {Object} */ sms.clean = { /** * Clean PhoneNumber attribut of message *(pre send query for exemple)*. Remove all non integer char * @param {String} num Phone number to clean * @return {String} clean value */ 'phoneNumber': function(num){ if(num && angular.isString(num)) { if (num.substring(0,3) === "+33"){ num = '0' + num.substring(3); } if (num.substring(0,2) === "33"){ num = '0' + num.substring(2); } return num.replace(/[^\d]/g,'').trim() } return '' }, /** * Clean emitter attribut of message. remove aull non alphabet letter (A-Z) char * @param {String} emitter emitter value to clean * @return {String} cleaned emitter value */ 'emitter': function(emitter){ if(emitter && angular.isString(emitter)) { return emitter.replace(/[^a-zA-Z]/g,'').trim() } return '' } } return sms; }] )
{'content_hash': 'c4689295071351110a709939637c518e', 'timestamp': '', 'source': 'github', 'line_count': 198, 'max_line_length': 113, 'avg_line_length': 36.95959595959596, 'alnum_prop': 0.4565455042361301, 'repo_name': 'thivolle-cazat-cedric/voxity-chrome-extension', 'id': 'aa7988918c376ecf18867b109f7d9ea98a3d39a7', 'size': '7318', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'voxity-chrome-extension/app/sms/services.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2804'}, {'name': 'HTML', 'bytes': '33919'}, {'name': 'JavaScript', 'bytes': '101807'}]}
title: Chapter Review source: - title: Common Core Basics subject: Social Studies chapter: 2 toc_type: Chapter Review toc_number: 2 pages: 72 - 108 questions: - excerpt: 1 - 2 text: > The United States Expands, 1783 - 1853 <img class="responsive-img materialboxed" src="-review-2.png" /> - number: 1 text: > Which was one effect of the Mexican War? choice: - option: A text: the Texas Annexation in 1845 - option: B text: Oregon Territory gained from England - option: C text: the Mexican Cession in 1848 - option: D text: the United States expanded eastward answer: - option: C text: > The United States won the Mexican War and took land that now is California, Arizona, New Mexico, Nevada, Utah, and Colorado. - number: 2 text: > Why did the United States clai m the areas of land from east to west? choice: - option: A text: Expansion grew westward from the original thirteen states. - option: B text: The United States wanted to claim land with rich natural resources. - option: C text: The United States wanted other countries to give it more land. - option: D text: The western lands were not as valuable as eastern lands. answer: - option: A text: > The original 13 states are on the east coast. West was the only direction in which the country could grow. - number: 3 text: > Why was the Fundamental Orders of Connecticut a model for the US Constitution? choice: - option: A text: It does not mention the king of England. - option: B text: It called for direct election of the governor. - option: C text: It required citizens to be church members. - option: D text: It was the first written constitution to create a government. answer: - option: D text: > The Fundamental Orders of Connecticut seems to have been the first written document that set up a government. - number: 4 text: > Which action led directly to the American Civil War? choice: - option: A text: More railroads were built-in Northern states than Southern states. - option: B text: Abraham Lincoln was elected president. - option: C text: John Brown attacked the US arsenal at Harper's Ferry. - option: D text: Lincoln issued the Emancipation Proclamation. answer: - option: B text: > After Lincoln's election, seven Southern states decided to secede from the Union. The Civil War began as an effort to preserve the Union. - excerpt: 5 text: <table class="striped"> <tr><th>Resources</th><th>North</th><th>South</th></tr> <tr><td>population</td><td>71%</td><td>29%</td></tr> <tr><td>railroad mileage</td><td>72%</td><td>28%</td></tr> <tr><td>iron and steel</td><td>93%</td><td>7%</td></tr> <tr><td>farm output</td><td>65%</td><td>35%</td></tr> </table> - number: 5 text: > Which conclusion is supported by the data? choice: - option: A text: The population, railroad mileage, and iron and steel resources in the South combined are greater than the farm output in the North. - option: B text: The North had an advantage over the South in terms of resources. - option: C text: The North had the biggest advantage in railroad mileage. - option: D text: The South had the biggest advantage in farm output. answer: - option: B text: > In every category the North had advantages over the South. - number: 6 text: > Which of the following is a reason that some people might not support Social Darwinism? choice: - option: A text: They believe that the rights of the weak should be protected. - option: B text: They believe that government should not be involved in social reforms. - option: C text: They think that everyone has equal opportunities in society. - option: D text: They th ink that success should always be rewarded. answer: - option: A text: > Social Darwinist believe that the powerful and strong members of society have the right to success and wealth. People who don't believe in Social Darwinism might think that the less powerful people need to be protected from the strong and wealthy. - number: 7 text: > Which document set up the government of the United States? choice: - option: A text: Articles of Confederation - option: B text: Declaration of Independence - option: C text: Magna Carta - option: D text: Mayflower Compact answer: - option: A text: > After the Revolution, the United States was a new country without a government. Representatives from the 13 colonies met and created the Articles of Confederation. - number: 8 text: What was the most important change made by the US Constitution? choice: - option: A text: It set up a legislature. - option: B text: States could issue their own currency. - option: C text: The power of individual states increased. - option: D text: The national government gained more power. answer: - option: D text: > Under the Articles of Confederation, the central government was weak. It had a unicameral legislature but no president or court system. The Constitution created three branches of government. It gave certain powers to the national government, such as regulating interstate commerce and printing a national currency. - number: 9 text: > What was the goal of the Missouri Compromise? choice: - option: A text: to pass the Fugitive Slave Act - option: B text: to allow California to join the Union as a free state - option: C text: to maintain a balance between the number of slave states and the number of free states - option: D text: to keep the Southern economy based on agriculture and the Northern economy on industry answer: - option: C text: > The Missouri Compromise tried to calm the tensions between the North and the South by maintaining the balance between free and slave states. - number: 10 text: > Which term describes John Brown, Harriet Beecher Stowe. and Frederick Douglass? choice: - option: A text: abolitionists - option: B text: secessionists - option: C text: former slaves - option: D text: important authors answer: - option: A text: > All three favored the abolition of slavery. Brown was a militant who attacked the federal arsenal at Harper's Ferry, Stowe wrote the bestselling antislavery novel Uncle Tom's Cabin, and Douglass was a former enslaved person. - number: 11 text: > Which was one reason the United States did not join the League of Nations after World War I? choice: - option: A text: US citizens voted against US membership in the League of Nations. - option: B text: Republican senators feared joining might force the United States to go to war. - option: C text: US leaders did not want to join a group that Germany belonged to. - option: D text: Democratic senators feared joining would prevent the United States from going to war. answer: - option: B text: > President Wilson, a Democrat, had proposed the League of Nations as a way to help nations settle disputes. However, Republican leaders in the Senate feared that membership could force the United States into war, so they kept the country from joining. - number: 12 text: > Which of the following best describes the 1920s? choice: - option: A text: a time of isolationism and prosperity - option: B text: a time of loss and hopelessness - option: C text: a decade of political activism and social upheaval - option: D text: a decade of war and political dominance answer: - option: A text: > The Roaring Twenties was characterized by isolationism, which kept the United States out of world affairs. At home, business was thriving. It was a time of more jobs and higher wages. - excerpt: 13, 14 text: > <blockquote>The only way whereby any one divests himself of his natural liberty, and puts on the bonds of civil society, is by agreeing with other men to join and unite into a community for their comfortable, safe, and peaceable living one amongst another, in a secure enjoyment of their properties, and a greater security against any, that are not of it. This any number of men may do, because it injures not the freedom of the rest; they are left as they were in the liberty of the state of nature. When any number of men have so consented to make one community or government, they are thereby presently incorporated, and make one body politic, wherein the majority have a right to act and conclude the rest.</blockquote> The Second Treatise of Civil Government, by John Locke (1690) - number: 13 text: > Which option best describes what Locke is writing about in this passage? choice: - option: A text: the best way to organize people - option: B text: why it is necessary to create laws - option: C text: how a large group of people should make decisions - option: D text: the social contract between the individual and the government answer: - option: D text: > Locke was writing about a social contract-an agreement between citizens and government. - number: 14 text: > Which words from the Declaration of Independence are similar to Locke's words in this passage? choice: - option: A text: "We hold these rights to be self-evident." - option: B text: "All men are created equal." - option: C text: "Governments are instituted among Men." - option: D text: "It is the right of the people to abolish it [a destructive government]." answer: - option: C text: > The phrase "any number of men have so consented to make one community or government" is similar to the words "Governments are instituted among Men," which is found in the Declaration of Independence. layout: cc_review --- #### Check Your Understanding On the following chart, circle the number of any question you answered incorrectly. In the third column, you will see the pages you can review to study the content covered in the question. Pay particular attention to reviewing those lessons in which you missed half or more of the questions. **Chapter Review** {: .center-align } | Lesson | Question Number | Review Pages | |:-|:-|:-| | Early Democratic Traditions | 3, 7, 13, 14 | 74-77 | | Revolution and a New Nation | 1,2,8 | 78-85 | | The Civil War and Reconstruction | 4, 5, 9, 10 | 86-93 | | The Progressive Era, World War I, and the Depression | 6, 11, 12 | 94- 101 | {: .striped }
{'content_hash': '0965276fe11f587b6fe7a29891b1f8f4', 'timestamp': '', 'source': 'github', 'line_count': 268, 'max_line_length': 729, 'avg_line_length': 42.582089552238806, 'alnum_prop': 0.6600946372239748, 'repo_name': 'champa720/jekyll', 'id': '59d31d1555f394efc0295878d53674eba3de1537', 'size': '11416', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_social_studies/cc-basics/chapter_2/chapter-review.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '179789'}, {'name': 'HTML', 'bytes': '38163'}, {'name': 'JavaScript', 'bytes': '1539'}, {'name': 'Ruby', 'bytes': '3441'}]}
<html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> <title>Arachne: Home</title> <!-- Latest compiled and minified CSS --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <!-- Optional theme --> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/readable/bootstrap.min.css"> <link rel="stylesheet" href="/static/index.css"> </head> <body> {{> admin_header}} <div class="container"> <div class="row"> <h1> Images: </h1> <div class="bg-danger">{{msg}}</div> {{#each images}} <div class="col-md-3 col-sm-4 col-xs-6"> <img src="/img/{{filename}}" alt="{{title}}" height=250 width=250><br/> <h3>{{title}}</h3> </div> {{/each}} </div> <div class="row"> <h1> Add Image: </h1> <form action="/admin/images" method="post" enctype="multipart/form-data"> <b>Title: </b> <input name="title" type="text"> <input type="file" name="file" id="file"> <input type="submit" value="Upload Image" name="submit"> </form> </div> <footer> <p>&copy; Arachne 2014</p> </footer> </div> <!-- /container --> <!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <!-- Include all compiled plugins (below), or include individual files as needed --> <script src="js/bootstrap.min.js"></script> </body> </html>
{'content_hash': '03160e410d9ffcf5978e8d49543d9087', 'timestamp': '', 'source': 'github', 'line_count': 52, 'max_line_length': 117, 'avg_line_length': 33.15384615384615, 'alnum_prop': 0.617169373549884, 'repo_name': 'yamikuronue/Arachne', 'id': '7374eb2a4a7a6968b7b6dc4ea4563397b235498f', 'size': '1724', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/templates/admin_imageEdit.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '371'}, {'name': 'HTML', 'bytes': '23815'}, {'name': 'JavaScript', 'bytes': '15733'}]}
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="generator" content="ApiGen 2.8.0" /> <meta name="robots" content="noindex" /> <title>File vendor/jms/serializer/tests/JMS/Serializer/Tests/Fixtures/SimpleSubClassObject.php | seip</title> <script type="text/javascript" src="resources/combined.js?784181472"></script> <script type="text/javascript" src="elementlist.js?3927760630"></script> <link rel="stylesheet" type="text/css" media="all" href="resources/style.css?3505392360" /> </head> <body> <div id="left"> <div id="menu"> <a href="index.html" title="Overview"><span>Overview</span></a> <div id="groups"> <h3>Namespaces</h3> <ul> <li><a href="namespace-Acme.html">Acme<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.html">DemoBundle<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Command.html">Command</a> </li> <li><a href="namespace-Acme.DemoBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Acme.DemoBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Acme.DemoBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Acme.DemoBundle.Form.html">Form</a> </li> <li><a href="namespace-Acme.DemoBundle.Proxy.html">Proxy<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.html">Symfony<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.html">Component<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.html">Acl<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Acl.Tests.Domain.html">Domain</a> </li> </ul></li></ul></li> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Proxy.__CG__.Symfony.Component.Security.Core.Tests.Util.html">Util</a> </li> </ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Acme.DemoBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Tests.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Acme.DemoBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Acme.DemoBundle.Twig.Extension.html">Extension</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Alpha.html">Alpha</a> </li> <li><a href="namespace-Apc.html">Apc<span></span></a> <ul> <li><a href="namespace-Apc.NamespaceCollision.html">NamespaceCollision<span></span></a> <ul> <li><a href="namespace-Apc.NamespaceCollision.A.html">A<span></span></a> <ul> <li><a href="namespace-Apc.NamespaceCollision.A.B.html">B</a> </li> </ul></li></ul></li> <li><a href="namespace-Apc.Namespaced.html">Namespaced</a> </li> </ul></li> <li><a href="namespace-Assetic.html">Assetic<span></span></a> <ul> <li><a href="namespace-Assetic.Asset.html">Asset<span></span></a> <ul> <li><a href="namespace-Assetic.Asset.Iterator.html">Iterator</a> </li> </ul></li> <li><a href="namespace-Assetic.Cache.html">Cache</a> </li> <li><a href="namespace-Assetic.Exception.html">Exception</a> </li> <li><a href="namespace-Assetic.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Assetic.Extension.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-Assetic.Factory.html">Factory<span></span></a> <ul> <li><a href="namespace-Assetic.Factory.Loader.html">Loader</a> </li> <li><a href="namespace-Assetic.Factory.Resource.html">Resource</a> </li> <li><a href="namespace-Assetic.Factory.Worker.html">Worker</a> </li> </ul></li> <li><a href="namespace-Assetic.Filter.html">Filter<span></span></a> <ul> <li><a href="namespace-Assetic.Filter.GoogleClosure.html">GoogleClosure</a> </li> <li><a href="namespace-Assetic.Filter.Sass.html">Sass</a> </li> <li><a href="namespace-Assetic.Filter.Yui.html">Yui</a> </li> </ul></li> <li><a href="namespace-Assetic.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Bazinga.html">Bazinga<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.html">JsTranslationBundle<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Command.html">Command</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Dumper.html">Dumper</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Finder.html">Finder</a> </li> <li><a href="namespace-Bazinga.Bundle.JsTranslationBundle.Tests.html">Tests</a> </li> </ul></li></ul></li> <li><a href="namespace-Bazinga.JsTranslationBundle.html">JsTranslationBundle<span></span></a> <ul> <li><a href="namespace-Bazinga.JsTranslationBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Bazinga.JsTranslationBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Bazinga.JsTranslationBundle.Tests.Finder.html">Finder</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Beta.html">Beta</a> </li> <li><a href="namespace-Blameable.html">Blameable<span></span></a> <ul> <li><a href="namespace-Blameable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Blameable.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Blameable.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-ClassesWithParents.html">ClassesWithParents</a> </li> <li><a href="namespace-ClassLoaderTest.html">ClassLoaderTest</a> </li> <li><a href="namespace-ClassMap.html">ClassMap</a> </li> <li><a href="namespace-Composer.html">Composer<span></span></a> <ul> <li><a href="namespace-Composer.Autoload.html">Autoload</a> </li> </ul></li> <li><a href="namespace-Container14.html">Container14</a> </li> <li><a href="namespace-Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.html">DoctrineBundle<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Command.html">Command<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Command.Proxy.html">Proxy</a> </li> </ul></li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Mapping.html">Mapping</a> </li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> </ul></li> <li><a href="namespace-Doctrine.Bundle.DoctrineBundle.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-Doctrine.Bundle.FixturesBundle.html">FixturesBundle<span></span></a> <ul> <li><a href="namespace-Doctrine.Bundle.FixturesBundle.Command.html">Command</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.Common.html">Common<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Annotations.html">Annotations<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Annotations.Annotation.html">Annotation</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.Cache.html">Cache</a> </li> <li><a href="namespace-Doctrine.Common.Collections.html">Collections<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Collections.Expr.html">Expr</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.DataFixtures.html">DataFixtures<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.DataFixtures.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.DataFixtures.Event.Listener.html">Listener</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.DataFixtures.Exception.html">Exception</a> </li> <li><a href="namespace-Doctrine.Common.DataFixtures.Executor.html">Executor</a> </li> <li><a href="namespace-Doctrine.Common.DataFixtures.Purger.html">Purger</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.Inflector.html">Inflector</a> </li> <li><a href="namespace-Doctrine.Common.Lexer.html">Lexer</a> </li> <li><a href="namespace-Doctrine.Common.Persistence.html">Persistence<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Persistence.Event.html">Event</a> </li> <li><a href="namespace-Doctrine.Common.Persistence.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Persistence.Mapping.Driver.html">Driver</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.Common.Proxy.html">Proxy<span></span></a> <ul> <li><a href="namespace-Doctrine.Common.Proxy.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-Doctrine.Common.Reflection.html">Reflection</a> </li> <li><a href="namespace-Doctrine.Common.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.html">DBAL<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Cache.html">Cache</a> </li> <li><a href="namespace-Doctrine.DBAL.Connections.html">Connections</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.html">Driver<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Driver.DrizzlePDOMySql.html">DrizzlePDOMySql</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.IBMDB2.html">IBMDB2</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.Mysqli.html">Mysqli</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.OCI8.html">OCI8</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOIbm.html">PDOIbm</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOMySql.html">PDOMySql</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOOracle.html">PDOOracle</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOPgSql.html">PDOPgSql</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOSqlite.html">PDOSqlite</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.PDOSqlsrv.html">PDOSqlsrv</a> </li> <li><a href="namespace-Doctrine.DBAL.Driver.SQLSrv.html">SQLSrv</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Event.Listeners.html">Listeners</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Id.html">Id</a> </li> <li><a href="namespace-Doctrine.DBAL.Logging.html">Logging</a> </li> <li><a href="namespace-Doctrine.DBAL.Platforms.html">Platforms<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Platforms.Keywords.html">Keywords</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Portability.html">Portability</a> </li> <li><a href="namespace-Doctrine.DBAL.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Query.Expression.html">Expression</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Schema.html">Schema<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Schema.Synchronizer.html">Synchronizer</a> </li> <li><a href="namespace-Doctrine.DBAL.Schema.Visitor.html">Visitor</a> </li> </ul></li> <li><a href="namespace-Doctrine.DBAL.Sharding.html">Sharding<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Sharding.ShardChoser.html">ShardChoser</a> </li> <li><a href="namespace-Doctrine.DBAL.Sharding.SQLAzure.html">SQLAzure<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Sharding.SQLAzure.Schema.html">Schema</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.DBAL.Tools.html">Tools<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Tools.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Doctrine.DBAL.Tools.Console.Command.html">Command</a> </li> <li><a href="namespace-Doctrine.DBAL.Tools.Console.Helper.html">Helper</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.DBAL.Types.html">Types</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.html">ORM<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Decorator.html">Decorator</a> </li> <li><a href="namespace-Doctrine.ORM.Event.html">Event</a> </li> <li><a href="namespace-Doctrine.ORM.Id.html">Id</a> </li> <li><a href="namespace-Doctrine.ORM.Internal.html">Internal<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Internal.Hydration.html">Hydration</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Mapping.Builder.html">Builder</a> </li> <li><a href="namespace-Doctrine.ORM.Mapping.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Persisters.html">Persisters</a> </li> <li><a href="namespace-Doctrine.ORM.Proxy.html">Proxy</a> </li> <li><a href="namespace-Doctrine.ORM.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Query.AST.html">AST<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Query.AST.Functions.html">Functions</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Query.Exec.html">Exec</a> </li> <li><a href="namespace-Doctrine.ORM.Query.Expr.html">Expr</a> </li> <li><a href="namespace-Doctrine.ORM.Query.Filter.html">Filter</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Repository.html">Repository</a> </li> <li><a href="namespace-Doctrine.ORM.Tools.html">Tools<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Console.Command.html">Command<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Console.Command.ClearCache.html">ClearCache</a> </li> <li><a href="namespace-Doctrine.ORM.Tools.Console.Command.SchemaTool.html">SchemaTool</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Tools.Console.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Tools.Event.html">Event</a> </li> <li><a href="namespace-Doctrine.ORM.Tools.Export.html">Export<span></span></a> <ul> <li><a href="namespace-Doctrine.ORM.Tools.Export.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-Doctrine.ORM.Tools.Pagination.html">Pagination</a> </li> </ul></li></ul></li> <li><a href="namespace-Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.html">Common<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.html">Annotations<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Bar.html">Bar</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Fixtures.Annotation.html">Annotation</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Foo.html">Foo</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.FooBar.html">FooBar</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.html">Ticket<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.ORM.html">ORM<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Annotations.Ticket.Doctrine.ORM.Mapping.html">Mapping</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Doctrine.Tests.Common.Cache.html">Cache</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Collections.html">Collections</a> </li> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.html">DataFixtures<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.Executor.html">Executor</a> </li> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.TestEntity.html">TestEntity</a> </li> <li><a href="namespace-Doctrine.Tests.Common.DataFixtures.TestFixtures.html">TestFixtures</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Inflector.html">Inflector</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Persistence.html">Persistence<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Persistence.Mapping.html">Mapping</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Proxy.html">Proxy</a> </li> <li><a href="namespace-Doctrine.Tests.Common.Reflection.html">Reflection<span></span></a> <ul> <li><a href="namespace-Doctrine.Tests.Common.Reflection.Dummies.html">Dummies</a> </li> </ul></li> <li><a href="namespace-Doctrine.Tests.Common.Util.html">Util</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.html">Bundles<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.AnnotationsBundle.html">AnnotationsBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.AnnotationsBundle.Entity.html">Entity</a> </li> </ul></li> <li><a href="namespace-Fixtures.Bundles.Vendor.html">Vendor<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.Vendor.AnnotationsBundle.html">AnnotationsBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.Vendor.AnnotationsBundle.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-Fixtures.Bundles.XmlBundle.html">XmlBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.XmlBundle.Entity.html">Entity</a> </li> </ul></li> <li><a href="namespace-Fixtures.Bundles.YamlBundle.html">YamlBundle<span></span></a> <ul> <li><a href="namespace-Fixtures.Bundles.YamlBundle.Entity.html">Entity</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Foo.html">Foo<span></span></a> <ul> <li><a href="namespace-Foo.Bar.html">Bar</a> </li> </ul></li> <li><a href="namespace-FOS.html">FOS<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.html">RestBundle<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Controller.html">Controller<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Controller.Annotations.html">Annotations</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Decoder.html">Decoder</a> </li> <li><a href="namespace-FOS.RestBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-FOS.RestBundle.Examples.html">Examples</a> </li> <li><a href="namespace-FOS.RestBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Form.Extension.html">Extension</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Normalizer.html">Normalizer<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Normalizer.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Request.html">Request</a> </li> <li><a href="namespace-FOS.RestBundle.Response.html">Response<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Response.AllowedMethodsLoader.html">AllowedMethodsLoader</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Routing.html">Routing<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Routing.Loader.html">Loader<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Routing.Loader.Reader.html">Reader</a> </li> </ul></li></ul></li> <li><a href="namespace-FOS.RestBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Controller.html">Controller<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Controller.Annotations.html">Annotations</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.Decoder.html">Decoder</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Fixtures.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.Normalizer.html">Normalizer</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.Request.html">Request</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.Routing.html">Routing<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Tests.Routing.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Tests.Util.html">Util</a> </li> <li><a href="namespace-FOS.RestBundle.Tests.View.html">View</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.Util.html">Util<span></span></a> <ul> <li><a href="namespace-FOS.RestBundle.Util.Inflector.html">Inflector</a> </li> </ul></li> <li><a href="namespace-FOS.RestBundle.View.html">View</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.html">UserBundle<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.Command.html">Command</a> </li> <li><a href="namespace-FOS.UserBundle.Controller.html">Controller</a> </li> <li><a href="namespace-FOS.UserBundle.CouchDocument.html">CouchDocument</a> </li> <li><a href="namespace-FOS.UserBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-FOS.UserBundle.Document.html">Document</a> </li> <li><a href="namespace-FOS.UserBundle.Entity.html">Entity</a> </li> <li><a href="namespace-FOS.UserBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-FOS.UserBundle.Form.Handler.html">Handler</a> </li> <li><a href="namespace-FOS.UserBundle.Form.Model.html">Model</a> </li> <li><a href="namespace-FOS.UserBundle.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.Mailer.html">Mailer</a> </li> <li><a href="namespace-FOS.UserBundle.Model.html">Model</a> </li> <li><a href="namespace-FOS.UserBundle.Propel.html">Propel</a> </li> <li><a href="namespace-FOS.UserBundle.Security.html">Security</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-FOS.UserBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Model.html">Model</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Security.html">Security</a> </li> <li><a href="namespace-FOS.UserBundle.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-FOS.UserBundle.Util.html">Util</a> </li> <li><a href="namespace-FOS.UserBundle.Validator.html">Validator</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.html">Gedmo<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.html">Blameable<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Blameable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Blameable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Blameable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Exception.html">Exception</a> </li> <li><a href="namespace-Gedmo.IpTraceable.html">IpTraceable<span></span></a> <ul> <li><a href="namespace-Gedmo.IpTraceable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.IpTraceable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.IpTraceable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.IpTraceable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.IpTraceable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Loggable.html">Loggable<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Document.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Loggable.Document.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Loggable.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Entity.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Loggable.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Loggable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Loggable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Loggable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Annotation.html">Annotation</a> </li> <li><a href="namespace-Gedmo.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li> <li><a href="namespace-Gedmo.Mapping.Mock.html">Mock<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.html">Encoder<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Extension.Encoder.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Mapping.Mock.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Mapping.Mock.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Mapping.Xml.html">Xml</a> </li> </ul></li> <li><a href="namespace-Gedmo.ReferenceIntegrity.html">ReferenceIntegrity<span></span></a> <ul> <li><a href="namespace-Gedmo.ReferenceIntegrity.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.ReferenceIntegrity.Mapping.Driver.html">Driver</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.References.html">References<span></span></a> <ul> <li><a href="namespace-Gedmo.References.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.References.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.References.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.References.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Sluggable.html">Sluggable<span></span></a> <ul> <li><a href="namespace-Gedmo.Sluggable.Handler.html">Handler</a> </li> <li><a href="namespace-Gedmo.Sluggable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Sluggable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Sluggable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Sluggable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Sluggable.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.html">SoftDeleteable<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Filter.html">Filter<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Filter.ODM.html">ODM</a> </li> </ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Query.TreeWalker.html">TreeWalker<span></span></a> <ul> <li><a href="namespace-Gedmo.SoftDeleteable.Query.TreeWalker.Exec.html">Exec</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.SoftDeleteable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Sortable.html">Sortable<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Sortable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Sortable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Sortable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Gedmo.Timestampable.html">Timestampable<span></span></a> <ul> <li><a href="namespace-Gedmo.Timestampable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Timestampable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Timestampable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Timestampable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Timestampable.Traits.html">Traits</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tool.html">Tool<span></span></a> <ul> <li><a href="namespace-Gedmo.Tool.Logging.html">Logging<span></span></a> <ul> <li><a href="namespace-Gedmo.Tool.Logging.DBAL.html">DBAL</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tool.Wrapper.html">Wrapper</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.html">Translatable<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Document.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Translatable.Document.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Entity.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Translatable.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.Hydrator.html">Hydrator<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Hydrator.ORM.html">ORM</a> </li> </ul></li> <li><a href="namespace-Gedmo.Translatable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Translatable.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Translatable.Query.html">Query<span></span></a> <ul> <li><a href="namespace-Gedmo.Translatable.Query.TreeWalker.html">TreeWalker</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Translator.html">Translator<span></span></a> <ul> <li><a href="namespace-Gedmo.Translator.Document.html">Document</a> </li> <li><a href="namespace-Gedmo.Translator.Entity.html">Entity</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tree.html">Tree<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Document.MongoDB.html">MongoDB<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Document.MongoDB.Repository.html">Repository</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Tree.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Entity.MappedSuperclass.html">MappedSuperclass</a> </li> <li><a href="namespace-Gedmo.Tree.Entity.Repository.html">Repository</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tree.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Mapping.Driver.html">Driver</a> </li> <li><a href="namespace-Gedmo.Tree.Mapping.Event.html">Event<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Mapping.Event.Adapter.html">Adapter</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Tree.Strategy.html">Strategy<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Strategy.ODM.html">ODM<span></span></a> <ul> <li><a href="namespace-Gedmo.Tree.Strategy.ODM.MongoDB.html">MongoDB</a> </li> </ul></li> <li><a href="namespace-Gedmo.Tree.Strategy.ORM.html">ORM</a> </li> </ul></li></ul></li> <li><a href="namespace-Gedmo.Uploadable.html">Uploadable<span></span></a> <ul> <li><a href="namespace-Gedmo.Uploadable.Event.html">Event</a> </li> <li><a href="namespace-Gedmo.Uploadable.FileInfo.html">FileInfo</a> </li> <li><a href="namespace-Gedmo.Uploadable.FilenameGenerator.html">FilenameGenerator</a> </li> <li><a href="namespace-Gedmo.Uploadable.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Gedmo.Uploadable.Mapping.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-Gedmo.Uploadable.MimeType.html">MimeType</a> </li> <li><a href="namespace-Gedmo.Uploadable.Stub.html">Stub</a> </li> </ul></li></ul></li> <li><a href="namespace-Incenteev.html">Incenteev<span></span></a> <ul> <li><a href="namespace-Incenteev.ParameterHandler.html">ParameterHandler<span></span></a> <ul> <li><a href="namespace-Incenteev.ParameterHandler.Tests.html">Tests</a> </li> </ul></li></ul></li> <li><a href="namespace-IpTraceable.html">IpTraceable<span></span></a> <ul> <li><a href="namespace-IpTraceable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-IpTraceable.Fixture.Document.html">Document</a> </li> </ul></li></ul></li> <li class="active"><a href="namespace-JMS.html">JMS<span></span></a> <ul> <li><a href="namespace-JMS.Parser.html">Parser<span></span></a> <ul> <li><a href="namespace-JMS.Parser.Tests.html">Tests</a> </li> </ul></li> <li class="active"><a href="namespace-JMS.Serializer.html">Serializer<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Annotation.html">Annotation</a> </li> <li><a href="namespace-JMS.Serializer.Builder.html">Builder</a> </li> <li><a href="namespace-JMS.Serializer.Construction.html">Construction</a> </li> <li><a href="namespace-JMS.Serializer.EventDispatcher.html">EventDispatcher<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.EventDispatcher.Subscriber.html">Subscriber</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Exception.html">Exception</a> </li> <li><a href="namespace-JMS.Serializer.Exclusion.html">Exclusion</a> </li> <li><a href="namespace-JMS.Serializer.Handler.html">Handler</a> </li> <li><a href="namespace-JMS.Serializer.Metadata.html">Metadata<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Metadata.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Naming.html">Naming</a> </li> <li class="active"><a href="namespace-JMS.Serializer.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Exclusion.html">Exclusion</a> </li> <li class="active"><a href="namespace-JMS.Serializer.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.Discriminator.html">Discriminator</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Fixtures.DoctrinePHPCR.html">DoctrinePHPCR</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Handler.html">Handler</a> </li> <li><a href="namespace-JMS.Serializer.Tests.Metadata.html">Metadata<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Metadata.Driver.html">Driver</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Serializer.html">Serializer<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Serializer.EventDispatcher.html">EventDispatcher<span></span></a> <ul> <li><a href="namespace-JMS.Serializer.Tests.Serializer.EventDispatcher.Subscriber.html">Subscriber</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Serializer.Naming.html">Naming</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Tests.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-JMS.Serializer.Twig.html">Twig</a> </li> <li><a href="namespace-JMS.Serializer.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-JMS.SerializerBundle.html">SerializerBundle<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-JMS.SerializerBundle.Serializer.html">Serializer</a> </li> <li><a href="namespace-JMS.SerializerBundle.Templating.html">Templating</a> </li> <li><a href="namespace-JMS.SerializerBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-JMS.SerializerBundle.Tests.DependencyInjection.Fixture.html">Fixture</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.html">TranslationBundle<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Annotation.html">Annotation</a> </li> <li><a href="namespace-JMS.TranslationBundle.Command.html">Command</a> </li> <li><a href="namespace-JMS.TranslationBundle.Controller.html">Controller</a> </li> <li><a href="namespace-JMS.TranslationBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Exception.html">Exception</a> </li> <li><a href="namespace-JMS.TranslationBundle.Logger.html">Logger</a> </li> <li><a href="namespace-JMS.TranslationBundle.Model.html">Model</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Functional.html">Functional<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Functional.TestBundle.html">TestBundle<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Functional.TestBundle.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Model.html">Model</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.html">Translation<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Comparison.html">Comparison</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Dumper.html">Dumper</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.html">Extractor<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.File.html">File<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.File.Fixture.html">Fixture</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.html">SimpleTest<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.Controller.html">Controller</a> </li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Extractor.Fixture.SimpleTest.Form.html">Form</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Loader.html">Loader<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Tests.Translation.Loader.Symfony.html">Symfony</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Tests.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Translation.html">Translation<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Translation.Comparison.html">Comparison</a> </li> <li><a href="namespace-JMS.TranslationBundle.Translation.Dumper.html">Dumper</a> </li> <li><a href="namespace-JMS.TranslationBundle.Translation.Extractor.html">Extractor<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Translation.Extractor.File.html">File</a> </li> </ul></li> <li><a href="namespace-JMS.TranslationBundle.Translation.Loader.html">Loader<span></span></a> <ul> <li><a href="namespace-JMS.TranslationBundle.Translation.Loader.Symfony.html">Symfony</a> </li> </ul></li></ul></li> <li><a href="namespace-JMS.TranslationBundle.Twig.html">Twig</a> </li> <li><a href="namespace-JMS.TranslationBundle.Util.html">Util</a> </li> </ul></li></ul></li> <li><a href="namespace-Knp.html">Knp<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.html">MenuBundle<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.html">Stubs<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Child.html">Child<span></span></a> <ul> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Child.Menu.html">Menu</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Stubs.Menu.html">Menu</a> </li> </ul></li> <li><a href="namespace-Knp.Bundle.MenuBundle.Tests.Templating.html">Templating</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Knp.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Factory.html">Factory</a> </li> <li><a href="namespace-Knp.Menu.Integration.html">Integration<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Integration.Silex.html">Silex</a> </li> <li><a href="namespace-Knp.Menu.Integration.Symfony.html">Symfony</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Iterator.html">Iterator</a> </li> <li><a href="namespace-Knp.Menu.Loader.html">Loader</a> </li> <li><a href="namespace-Knp.Menu.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Matcher.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Menu.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Menu.Silex.html">Silex<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Silex.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Tests.Factory.html">Factory</a> </li> <li><a href="namespace-Knp.Menu.Tests.Integration.html">Integration<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Tests.Integration.Silex.html">Silex</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Tests.Iterator.html">Iterator</a> </li> <li><a href="namespace-Knp.Menu.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Knp.Menu.Tests.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Knp.Menu.Tests.Matcher.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Tests.Provider.html">Provider</a> </li> <li><a href="namespace-Knp.Menu.Tests.Renderer.html">Renderer</a> </li> <li><a href="namespace-Knp.Menu.Tests.Silex.html">Silex</a> </li> <li><a href="namespace-Knp.Menu.Tests.Twig.html">Twig</a> </li> <li><a href="namespace-Knp.Menu.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Knp.Menu.Twig.html">Twig</a> </li> <li><a href="namespace-Knp.Menu.Util.html">Util</a> </li> </ul></li></ul></li> <li><a href="namespace-Loggable.html">Loggable<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.Document.Log.html">Log</a> </li> </ul></li> <li><a href="namespace-Loggable.Fixture.Entity.html">Entity<span></span></a> <ul> <li><a href="namespace-Loggable.Fixture.Entity.Log.html">Log</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Lunetics.html">Lunetics<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.html">LocaleBundle<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Cookie.html">Cookie</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Event.html">Event</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Form.Extension.Type.html">Type</a> </li> </ul></li></ul></li> <li><a href="namespace-Lunetics.LocaleBundle.LocaleGuesser.html">LocaleGuesser</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.LocaleInformation.html">LocaleInformation</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Matcher.html">Matcher</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Session.html">Session</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Switcher.html">Switcher</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Event.html">Event</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Form.Extension.Type.html">Type</a> </li> </ul></li></ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.LocaleGuesser.html">LocaleGuesser</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.LocaleInformation.html">LocaleInformation</a> </li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Twig.Extension.html">Extension</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Tests.Validator.html">Validator</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Lunetics.LocaleBundle.Twig.Extension.html">Extension</a> </li> </ul></li> <li><a href="namespace-Lunetics.LocaleBundle.Validator.html">Validator</a> </li> </ul></li></ul></li> <li><a href="namespace-Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Mapping.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Mapping.Fixture.Compatibility.html">Compatibility</a> </li> <li><a href="namespace-Mapping.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Mapping.Fixture.Unmapped.html">Unmapped</a> </li> <li><a href="namespace-Mapping.Fixture.Xml.html">Xml</a> </li> <li><a href="namespace-Mapping.Fixture.Yaml.html">Yaml</a> </li> </ul></li></ul></li> <li><a href="namespace-Metadata.html">Metadata<span></span></a> <ul> <li><a href="namespace-Metadata.Cache.html">Cache</a> </li> <li><a href="namespace-Metadata.Driver.html">Driver</a> </li> <li><a href="namespace-Metadata.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Cache.html">Cache</a> </li> <li><a href="namespace-Metadata.Tests.Driver.html">Driver<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Driver.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Driver.Fixture.A.html">A</a> </li> <li><a href="namespace-Metadata.Tests.Driver.Fixture.B.html">B</a> </li> <li><a href="namespace-Metadata.Tests.Driver.Fixture.C.html">C<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Driver.Fixture.C.SubDir.html">SubDir</a> </li> </ul></li> <li><a href="namespace-Metadata.Tests.Driver.Fixture.T.html">T</a> </li> </ul></li></ul></li> <li><a href="namespace-Metadata.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Metadata.Tests.Fixtures.ComplexHierarchy.html">ComplexHierarchy</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Monolog.html">Monolog<span></span></a> <ul> <li><a href="namespace-Monolog.Formatter.html">Formatter</a> </li> <li><a href="namespace-Monolog.Handler.html">Handler<span></span></a> <ul> <li><a href="namespace-Monolog.Handler.FingersCrossed.html">FingersCrossed</a> </li> <li><a href="namespace-Monolog.Handler.SyslogUdp.html">SyslogUdp</a> </li> </ul></li> <li><a href="namespace-Monolog.Processor.html">Processor</a> </li> </ul></li> <li><a href="namespace-MyProject.html">MyProject<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.html">Proxies<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.Common.html">Common<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.Doctrine.Tests.Common.Util.html">Util</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.html">OtherProject<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.html">Proxies<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.Common.html">Common<span></span></a> <ul> <li><a href="namespace-MyProject.Proxies.__CG__.OtherProject.Proxies.__CG__.Doctrine.Tests.Common.Util.html">Util</a> </li> </ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-NamespaceCollision.html">NamespaceCollision<span></span></a> <ul> <li><a href="namespace-NamespaceCollision.A.html">A<span></span></a> <ul> <li><a href="namespace-NamespaceCollision.A.B.html">B</a> </li> </ul></li> <li><a href="namespace-NamespaceCollision.C.html">C<span></span></a> <ul> <li><a href="namespace-NamespaceCollision.C.B.html">B</a> </li> </ul></li></ul></li> <li><a href="namespace-Namespaced.html">Namespaced</a> </li> <li><a href="namespace-Namespaced2.html">Namespaced2</a> </li> <li><a href="namespace-Negotiation.html">Negotiation<span></span></a> <ul> <li><a href="namespace-Negotiation.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-None.html">None</a> </li> <li><a href="namespace-Pequiven.html">Pequiven<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.html">SEIPBundle<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.DataFixtures.html">DataFixtures</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.Entity.html">Entity</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Pequiven.SEIPBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Pequiven.SEIPBundle.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Menu.Template.html">Template<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Menu.Template.Developer.html">Developer</a> </li> </ul></li></ul></li> <li><a href="namespace-Pequiven.SEIPBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Pequiven.SEIPBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-PHP.html">PHP</a> </li> <li><a href="namespace-PhpCollection.html">PhpCollection<span></span></a> <ul> <li><a href="namespace-PhpCollection.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-PhpOption.html">PhpOption<span></span></a> <ul> <li><a href="namespace-PhpOption.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Proxies.html">Proxies<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.html">__CG__<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.Pequiven.html">Pequiven<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.Pequiven.SEIPBundle.html">SEIPBundle<span></span></a> <ul> <li><a href="namespace-Proxies.__CG__.Pequiven.SEIPBundle.Entity.html">Entity</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Psr.html">Psr<span></span></a> <ul> <li><a href="namespace-Psr.Log.html">Log<span></span></a> <ul> <li><a href="namespace-Psr.Log.Test.html">Test</a> </li> </ul></li></ul></li> <li><a href="namespace-ReferenceIntegrity.html">ReferenceIntegrity<span></span></a> <ul> <li><a href="namespace-ReferenceIntegrity.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.ManyNullify.html">ManyNullify</a> </li> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.ManyRestrict.html">ManyRestrict</a> </li> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.OneNullify.html">OneNullify</a> </li> <li><a href="namespace-ReferenceIntegrity.Fixture.Document.OneRestrict.html">OneRestrict</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-References.html">References<span></span></a> <ul> <li><a href="namespace-References.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-References.Fixture.ODM.html">ODM<span></span></a> <ul> <li><a href="namespace-References.Fixture.ODM.MongoDB.html">MongoDB</a> </li> </ul></li> <li><a href="namespace-References.Fixture.ORM.html">ORM</a> </li> </ul></li></ul></li> <li><a href="namespace-Sensio.html">Sensio<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.DistributionBundle.html">DistributionBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Composer.html">Composer</a> </li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.html">Configurator<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.Form.html">Form</a> </li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Configurator.Step.html">Step</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Sensio.Bundle.DistributionBundle.DependencyInjection.html">DependencyInjection</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.html">FrameworkExtraBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Configuration.html">Configuration</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Request.html">Request<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Request.ParamConverter.html">ParamConverter</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Routing.html">Routing</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Security.html">Security</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Templating.html">Templating</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Configuration.html">Configuration</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.EventListener.html">EventListener<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.EventListener.Fixture.html">Fixture</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Request.html">Request<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Request.ParamConverter.html">ParamConverter</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Routing.html">Routing</a> </li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.BarBundle.html">BarBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.BarBundle.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBarBundle.html">FooBarBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBarBundle.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.FrameworkExtraBundle.Tests.Templating.Fixture.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.html">GeneratorBundle<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Command.html">Command<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Command.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Generator.html">Generator</a> </li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Manipulator.html">Manipulator</a> </li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.Command.html">Command</a> </li> <li><a href="namespace-Sensio.Bundle.GeneratorBundle.Tests.Generator.html">Generator</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Sluggable.html">Sluggable<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.Doctrine.html">Doctrine</a> </li> <li><a href="namespace-Sluggable.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.Document.Handler.html">Handler</a> </li> </ul></li> <li><a href="namespace-Sluggable.Fixture.Handler.html">Handler<span></span></a> <ul> <li><a href="namespace-Sluggable.Fixture.Handler.People.html">People</a> </li> </ul></li> <li><a href="namespace-Sluggable.Fixture.Inheritance.html">Inheritance</a> </li> <li><a href="namespace-Sluggable.Fixture.Inheritance2.html">Inheritance2</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue104.html">Issue104</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue116.html">Issue116</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue131.html">Issue131</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue449.html">Issue449</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue633.html">Issue633</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue827.html">Issue827</a> </li> <li><a href="namespace-Sluggable.Fixture.Issue939.html">Issue939</a> </li> <li><a href="namespace-Sluggable.Fixture.MappedSuperclass.html">MappedSuperclass</a> </li> </ul></li></ul></li> <li><a href="namespace-SoftDeleteable.html">SoftDeleteable<span></span></a> <ul> <li><a href="namespace-SoftDeleteable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-SoftDeleteable.Fixture.Document.html">Document</a> </li> <li><a href="namespace-SoftDeleteable.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-Sortable.html">Sortable<span></span></a> <ul> <li><a href="namespace-Sortable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Sortable.Fixture.Transport.html">Transport</a> </li> </ul></li></ul></li> <li><a href="namespace-Stof.html">Stof<span></span></a> <ul> <li><a href="namespace-Stof.DoctrineExtensionsBundle.html">DoctrineExtensionsBundle<span></span></a> <ul> <li><a href="namespace-Stof.DoctrineExtensionsBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Stof.DoctrineExtensionsBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Stof.DoctrineExtensionsBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Stof.DoctrineExtensionsBundle.Uploadable.html">Uploadable</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.html">Symfony<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.html">Bridge<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.html">Doctrine<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DataFixtures.html">DataFixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.CompilerPass.html">CompilerPass</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.DependencyInjection.Security.UserProvider.html">UserProvider</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.ExpressionLanguage.html">ExpressionLanguage</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.HttpFoundation.html">HttpFoundation</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Logger.html">Logger</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Security.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Security.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Test.html">Test</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DataFixtures.html">DataFixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.DependencyInjection.CompilerPass.html">CompilerPass</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.ExpressionLanguage.html">ExpressionLanguage</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.HttpFoundation.html">HttpFoundation</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Logger.html">Logger</a> </li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Security.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Tests.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Doctrine.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Doctrine.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Monolog.html">Monolog<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Monolog.Formatter.html">Formatter</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Processor.html">Processor</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Monolog.Tests.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Bridge.Monolog.Tests.Processor.html">Processor</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.html">Propel1<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.DependencyInjection.Security.UserProvider.html">UserProvider</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.Logger.html">Logger</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Security.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Bridge.Propel1.Tests.Form.DataTransformer.html">DataTransformer</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.ProxyManager.html">ProxyManager<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Bridge.ProxyManager.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Bridge.ProxyManager.Tests.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bridge.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Twig.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Form.html">Form</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.NodeVisitor.html">NodeVisitor</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Extension.Fixtures.html">Fixtures</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.NodeVisitor.html">NodeVisitor</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.TokenParser.html">TokenParser</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Tests.Translation.html">Translation</a> </li> </ul></li> <li><a href="namespace-Symfony.Bridge.Twig.TokenParser.html">TokenParser</a> </li> <li><a href="namespace-Symfony.Bridge.Twig.Translation.html">Translation</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.html">AsseticBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Config.html">Config</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.html">Factory<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Resource.html">Resource</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Factory.Worker.html">Worker</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Routing.html">Routing</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Templating.html">Templating</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Factory.html">Factory<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Factory.Resource.html">Resource</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.Templating.html">Templating</a> </li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Tests.TestBundle.html">TestBundle</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.AsseticBundle.Twig.html">Twig</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.html">FrameworkBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.Descriptor.html">Descriptor</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Console.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.HttpCache.html">HttpCache</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Routing.html">Routing</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Asset.html">Asset</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Templating.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Test.html">Test</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Console.Descriptor.html">Descriptor</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fixtures.BaseBundle.html">BaseBundle</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.html">Functional<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.app.html">app</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.TestBundle.html">TestBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Functional.Bundle.TestBundle.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Routing.html">Routing</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Helper.html">Helper<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Helper.Fixtures.html">Fixtures</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Templating.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Translation.html">Translation</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Tests.Validator.html">Validator</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Translation.html">Translation</a> </li> <li><a href="namespace-Symfony.Bundle.FrameworkBundle.Validator.html">Validator</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.MonologBundle.html">MonologBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.MonologBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.html">SecurityBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.Factory.html">Factory</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.DependencyInjection.Security.UserProvider.html">UserProvider</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Security.html">Security</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Templating.Helper.html">Helper</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.DependencyInjection.Security.Factory.html">Factory</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.html">Functional<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.app.html">app</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.html">CsrfFormLoginBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.CsrfFormLoginBundle.Form.html">Form</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.html">FormLoginBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Tests.Functional.Bundle.FormLoginBundle.Security.html">Security</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SecurityBundle.Twig.Extension.html">Extension</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.html">SwiftmailerBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.SwiftmailerBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.html">TwigBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Bundle.TwigBundle.Tests.TokenParser.html">TokenParser</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.TwigBundle.TokenParser.html">TokenParser</a> </li> </ul></li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.html">WebProfilerBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Profiler.html">Profiler</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Bundle.WebProfilerBundle.Tests.Profiler.html">Profiler</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.html">Component<span></span></a> <ul> <li><a href="namespace-Symfony.Component.BrowserKit.html">BrowserKit<span></span></a> <ul> <li><a href="namespace-Symfony.Component.BrowserKit.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.ClassLoader.html">ClassLoader<span></span></a> <ul> <li><a href="namespace-Symfony.Component.ClassLoader.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.html">Config<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Definition.html">Definition<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Definition.Builder.html">Builder</a> </li> <li><a href="namespace-Symfony.Component.Config.Definition.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.Config.Definition.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Config.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Config.Resource.html">Resource</a> </li> <li><a href="namespace-Symfony.Component.Config.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Tests.Definition.html">Definition<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Tests.Definition.Builder.html">Builder</a> </li> <li><a href="namespace-Symfony.Component.Config.Tests.Definition.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Config.Tests.Fixtures.Configuration.html">Configuration</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Config.Tests.Resource.html">Resource</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Config.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Console.html">Console<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Console.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Component.Console.Descriptor.html">Descriptor</a> </li> <li><a href="namespace-Symfony.Component.Console.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.Console.Formatter.html">Formatter</a> </li> <li><a href="namespace-Symfony.Component.Console.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Console.Input.html">Input</a> </li> <li><a href="namespace-Symfony.Component.Console.Output.html">Output</a> </li> <li><a href="namespace-Symfony.Component.Console.Tester.html">Tester</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Console.Tests.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Descriptor.html">Descriptor</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Formatter.html">Formatter</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Input.html">Input</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Output.html">Output</a> </li> <li><a href="namespace-Symfony.Component.Console.Tests.Tester.html">Tester</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.CssSelector.html">CssSelector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Parser.html">Parser<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Parser.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Parser.Shortcut.html">Shortcut</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Parser.Tokenizer.html">Tokenizer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.html">Parser<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.Parser.Shortcut.html">Shortcut</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.CssSelector.Tests.XPath.html">XPath</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.CssSelector.XPath.html">XPath<span></span></a> <ul> <li><a href="namespace-Symfony.Component.CssSelector.XPath.Extension.html">Extension</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Debug.html">Debug<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Debug.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Debug.FatalErrorHandler.html">FatalErrorHandler</a> </li> <li><a href="namespace-Symfony.Component.Debug.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Debug.Tests.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Debug.Tests.FatalErrorHandler.html">FatalErrorHandler</a> </li> <li><a href="namespace-Symfony.Component.Debug.Tests.Fixtures.html">Fixtures</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Dump.html">Dump</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.DependencyInjection.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.ParameterBag.html">ParameterBag</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Extension.html">Extension</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.html">LazyProxy<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.Instantiator.html">Instantiator</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.LazyProxy.PhpDumper.html">PhpDumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.DependencyInjection.Tests.ParameterBag.html">ParameterBag</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.DomCrawler.html">DomCrawler<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DomCrawler.Field.html">Field</a> </li> <li><a href="namespace-Symfony.Component.DomCrawler.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.DomCrawler.Tests.Field.html">Field</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.EventDispatcher.html">EventDispatcher<span></span></a> <ul> <li><a href="namespace-Symfony.Component.EventDispatcher.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Component.EventDispatcher.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.ExpressionLanguage.html">ExpressionLanguage<span></span></a> <ul> <li><a href="namespace-Symfony.Component.ExpressionLanguage.Node.html">Node</a> </li> <li><a href="namespace-Symfony.Component.ExpressionLanguage.ParserCache.html">ParserCache</a> </li> <li><a href="namespace-Symfony.Component.ExpressionLanguage.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.ExpressionLanguage.Tests.Node.html">Node</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Filesystem.html">Filesystem<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Filesystem.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Filesystem.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Finder.html">Finder<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Finder.Adapter.html">Adapter</a> </li> <li><a href="namespace-Symfony.Component.Finder.Comparator.html">Comparator</a> </li> <li><a href="namespace-Symfony.Component.Finder.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Finder.Expression.html">Expression</a> </li> <li><a href="namespace-Symfony.Component.Finder.Iterator.html">Iterator</a> </li> <li><a href="namespace-Symfony.Component.Finder.Shell.html">Shell</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Finder.Tests.Comparator.html">Comparator</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.Expression.html">Expression</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.FakeAdapter.html">FakeAdapter</a> </li> <li><a href="namespace-Symfony.Component.Finder.Tests.Iterator.html">Iterator</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Core.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.DataMapper.html">DataMapper</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.Type.html">Type</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Core.View.html">View</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.Csrf.html">Csrf<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Csrf.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Csrf.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.html">DataCollector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.Proxy.html">Proxy</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.DataCollector.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.HttpFoundation.html">HttpFoundation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.HttpFoundation.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Extension.Templating.html">Templating</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.Type.html">Type</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Form.Extension.Validator.ViolationMapper.html">ViolationMapper</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Form.Guess.html">Guess</a> </li> <li><a href="namespace-Symfony.Component.Form.Test.html">Test</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.html">Extension<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.ChoiceList.html">ChoiceList</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.DataMapper.html">DataMapper</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.DataTransformer.html">DataTransformer</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Core.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.html">Csrf<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.CsrfProvider.html">CsrfProvider</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Csrf.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.DataCollector.html">DataCollector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.DataCollector.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.HttpFoundation.html">HttpFoundation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.HttpFoundation.EventListener.html">EventListener</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Type.html">Type</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Extension.Validator.ViolationMapper.html">ViolationMapper</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Form.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Guess.html">Guess</a> </li> <li><a href="namespace-Symfony.Component.Form.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Form.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.html">HttpFoundation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.File.html">File<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.File.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.File.MimeType.html">MimeType</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.html">Session<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Attribute.html">Attribute</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Flash.html">Flash</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.html">Storage<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Session.Storage.Proxy.html">Proxy</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.File.html">File<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.File.MimeType.html">MimeType</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.html">Session<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Attribute.html">Attribute</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Flash.html">Flash</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.html">Storage<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.Handler.html">Handler</a> </li> <li><a href="namespace-Symfony.Component.HttpFoundation.Tests.Session.Storage.Proxy.html">Proxy</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.html">HttpKernel<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Bundle.html">Bundle</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.CacheClearer.html">CacheClearer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Config.html">Config</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.DataCollector.html">DataCollector<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.DataCollector.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.HttpCache.html">HttpCache</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Log.html">Log</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Profiler.html">Profiler</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Bundle.html">Bundle</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.CacheClearer.html">CacheClearer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.CacheWarmer.html">CacheWarmer</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Config.html">Config</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Controller.html">Controller</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.DataCollector.html">DataCollector</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Debug.html">Debug</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.EventListener.html">EventListener</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionAbsentBundle.html">ExtensionAbsentBundle</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionLoadedBundle.html">ExtensionLoadedBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionLoadedBundle.DependencyInjection.html">DependencyInjection</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.html">ExtensionPresentBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.Command.html">Command</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fixtures.ExtensionPresentBundle.DependencyInjection.html">DependencyInjection</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Fragment.html">Fragment</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.HttpCache.html">HttpCache</a> </li> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Profiler.html">Profiler<span></span></a> <ul> <li><a href="namespace-Symfony.Component.HttpKernel.Tests.Profiler.Mock.html">Mock</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Icu.html">Icu<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Icu.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.html">Intl<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Collator.html">Collator</a> </li> <li><a href="namespace-Symfony.Component.Intl.DateFormatter.html">DateFormatter<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.DateFormatter.DateFormat.html">DateFormat</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Intl.Globals.html">Globals</a> </li> <li><a href="namespace-Symfony.Component.Intl.Locale.html">Locale</a> </li> <li><a href="namespace-Symfony.Component.Intl.NumberFormatter.html">NumberFormatter</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.html">ResourceBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Compiler.html">Compiler</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Reader.html">Reader</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Transformer.html">Transformer<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Transformer.Rule.html">Rule</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Intl.ResourceBundle.Writer.html">Writer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Collator.html">Collator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Collator.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.DateFormatter.html">DateFormatter<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.DateFormatter.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.Globals.html">Globals<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Globals.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.Locale.html">Locale<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.Locale.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.NumberFormatter.html">NumberFormatter<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.NumberFormatter.Verification.html">Verification</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.html">ResourceBundle<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Reader.html">Reader</a> </li> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Intl.Tests.ResourceBundle.Writer.html">Writer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Tests.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Intl.Util.html">Util</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Locale.html">Locale<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Locale.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Locale.Tests.Stub.html">Stub</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.OptionsResolver.html">OptionsResolver<span></span></a> <ul> <li><a href="namespace-Symfony.Component.OptionsResolver.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.OptionsResolver.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Process.html">Process<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Process.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Process.Tests.html">Tests</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.PropertyAccess.html">PropertyAccess<span></span></a> <ul> <li><a href="namespace-Symfony.Component.PropertyAccess.Exception.html">Exception</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.html">Routing<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Annotation.html">Annotation</a> </li> <li><a href="namespace-Symfony.Component.Routing.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Routing.Generator.html">Generator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Generator.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Routing.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Matcher.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Annotation.html">Annotation</a> </li> <li><a href="namespace-Symfony.Component.Routing.Tests.Fixtures.html">Fixtures<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Fixtures.AnnotatedClasses.html">AnnotatedClasses</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Tests.Generator.html">Generator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Generator.Dumper.html">Dumper</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Routing.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Routing.Tests.Matcher.html">Matcher<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Routing.Tests.Matcher.Dumper.html">Dumper</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.html">Security<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Acl.html">Acl<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Acl.Dbal.html">Dbal</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Domain.html">Domain</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Model.html">Model</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Permission.html">Permission</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Dbal.html">Dbal</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Domain.html">Domain</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Permission.html">Permission</a> </li> <li><a href="namespace-Symfony.Component.Security.Acl.Tests.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Acl.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.html">Authentication<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.Provider.html">Provider</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Authentication.Token.html">Token</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Authorization.html">Authorization<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Authorization.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Role.html">Role</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.html">Authentication<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.Provider.html">Provider</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authentication.Token.html">Token</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authorization.html">Authorization<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Authorization.Voter.html">Voter</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Role.html">Role</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.User.html">User</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Tests.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.Core.User.html">User</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Util.html">Util</a> </li> <li><a href="namespace-Symfony.Component.Security.Core.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Core.Validator.Constraints.html">Constraints</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.Csrf.html">Csrf<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Csrf.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Security.Csrf.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Csrf.Tests.TokenGenerator.html">TokenGenerator</a> </li> <li><a href="namespace-Symfony.Component.Security.Csrf.Tests.TokenStorage.html">TokenStorage</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Csrf.TokenGenerator.html">TokenGenerator</a> </li> <li><a href="namespace-Symfony.Component.Security.Csrf.TokenStorage.html">TokenStorage</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Http.html">Http<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Http.Authentication.html">Authentication</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Authorization.html">Authorization</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.EntryPoint.html">EntryPoint</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Event.html">Event</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Firewall.html">Firewall</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Logout.html">Logout</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Session.html">Session</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Authentication.html">Authentication</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.EntryPoint.html">EntryPoint</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Firewall.html">Firewall</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Logout.html">Logout</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.RememberMe.html">RememberMe</a> </li> <li><a href="namespace-Symfony.Component.Security.Http.Tests.Session.html">Session</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Security.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Core.html">Core<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Core.Authentication.html">Authentication<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Core.Authentication.Token.html">Token</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Tests.Core.User.html">User</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Security.Tests.Http.html">Http<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Security.Tests.Http.Firewall.html">Firewall</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Serializer.html">Serializer<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Serializer.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Normalizer.html">Normalizer</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Serializer.Tests.Encoder.html">Encoder</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Serializer.Tests.Normalizer.html">Normalizer</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Stopwatch.html">Stopwatch</a> </li> <li><a href="namespace-Symfony.Component.Templating.html">Templating<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Templating.Asset.html">Asset</a> </li> <li><a href="namespace-Symfony.Component.Templating.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Templating.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Templating.Storage.html">Storage</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Templating.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.Helper.html">Helper</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Templating.Tests.Storage.html">Storage</a> </li> </ul></li></ul></li> <li><a href="namespace-Symfony.Component.Translation.html">Translation<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Translation.Catalogue.html">Catalogue</a> </li> <li><a href="namespace-Symfony.Component.Translation.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.Translation.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Translation.Extractor.html">Extractor</a> </li> <li><a href="namespace-Symfony.Component.Translation.Loader.html">Loader</a> </li> <li><a href="namespace-Symfony.Component.Translation.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Translation.Tests.Catalogue.html">Catalogue</a> </li> <li><a href="namespace-Symfony.Component.Translation.Tests.Dumper.html">Dumper</a> </li> <li><a href="namespace-Symfony.Component.Translation.Tests.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Translation.Writer.html">Writer</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Validator.html">Validator<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Validator.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Validator.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Mapping.Cache.html">Cache</a> </li> <li><a href="namespace-Symfony.Component.Validator.Mapping.Loader.html">Loader</a> </li> </ul></li> <li><a href="namespace-Symfony.Component.Validator.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Tests.Constraints.html">Constraints</a> </li> <li><a href="namespace-Symfony.Component.Validator.Tests.Fixtures.html">Fixtures</a> </li> <li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.html">Mapping<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.Cache.html">Cache</a> </li> <li><a href="namespace-Symfony.Component.Validator.Tests.Mapping.Loader.html">Loader</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Symfony.Component.Yaml.html">Yaml<span></span></a> <ul> <li><a href="namespace-Symfony.Component.Yaml.Exception.html">Exception</a> </li> <li><a href="namespace-Symfony.Component.Yaml.Tests.html">Tests</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.html">Tecnocreaciones<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.html">Bundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.html">AjaxFOSUserBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.DependencyInjection.html">DependencyInjection<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.DependencyInjection.Compiler.html">Compiler</a> </li> </ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Event.html">Event</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.EventListener.html">EventListener</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Handler.html">Handler</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.AjaxFOSUserBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.html">InstallBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Command.html">Command</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.InstallBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.html">TemplateBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Controller.html">Controller</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.Template.html">Template<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Menu.Template.Developer.html">Developer</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Bundle.TemplateBundle.Tests.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.html">Vzla<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.html">GovernmentBundle<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.DependencyInjection.html">DependencyInjection</a> </li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Form.html">Form<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Form.Type.html">Type</a> </li> </ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.html">Menu<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.Template.html">Template<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Menu.Template.Developer.html">Developer</a> </li> </ul></li></ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Model.html">Model</a> </li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Tests.html">Tests<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Tests.Controller.html">Controller</a> </li> </ul></li> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Twig.html">Twig<span></span></a> <ul> <li><a href="namespace-Tecnocreaciones.Vzla.GovernmentBundle.Twig.Extension.html">Extension</a> </li> </ul></li></ul></li></ul></li></ul></li> <li><a href="namespace-TestBundle.html">TestBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Fabpot.html">Fabpot<span></span></a> <ul> <li><a href="namespace-TestBundle.Fabpot.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Fabpot.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-TestBundle.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.FooBundle.Controller.html">Controller<span></span></a> <ul> <li><a href="namespace-TestBundle.FooBundle.Controller.Sub.html">Sub</a> </li> <li><a href="namespace-TestBundle.FooBundle.Controller.Test.html">Test</a> </li> </ul></li></ul></li> <li><a href="namespace-TestBundle.Sensio.html">Sensio<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.Cms.html">Cms<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.Cms.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.Cms.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li> <li><a href="namespace-TestBundle.Sensio.FooBundle.html">FooBundle<span></span></a> <ul> <li><a href="namespace-TestBundle.Sensio.FooBundle.Controller.html">Controller</a> </li> </ul></li></ul></li></ul></li> <li><a href="namespace-TestFixtures.html">TestFixtures</a> </li> <li><a href="namespace-Timestampable.html">Timestampable<span></span></a> <ul> <li><a href="namespace-Timestampable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Timestampable.Fixture.Document.html">Document</a> </li> </ul></li></ul></li> <li><a href="namespace-Tool.html">Tool</a> </li> <li><a href="namespace-Translatable.html">Translatable<span></span></a> <ul> <li><a href="namespace-Translatable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Translatable.Fixture.Document.html">Document<span></span></a> <ul> <li><a href="namespace-Translatable.Fixture.Document.Personal.html">Personal</a> </li> </ul></li> <li><a href="namespace-Translatable.Fixture.Issue114.html">Issue114</a> </li> <li><a href="namespace-Translatable.Fixture.Issue138.html">Issue138</a> </li> <li><a href="namespace-Translatable.Fixture.Issue165.html">Issue165</a> </li> <li><a href="namespace-Translatable.Fixture.Issue173.html">Issue173</a> </li> <li><a href="namespace-Translatable.Fixture.Issue75.html">Issue75</a> </li> <li><a href="namespace-Translatable.Fixture.Issue922.html">Issue922</a> </li> <li><a href="namespace-Translatable.Fixture.Personal.html">Personal</a> </li> <li><a href="namespace-Translatable.Fixture.Template.html">Template</a> </li> <li><a href="namespace-Translatable.Fixture.Type.html">Type</a> </li> </ul></li></ul></li> <li><a href="namespace-Translator.html">Translator<span></span></a> <ul> <li><a href="namespace-Translator.Fixture.html">Fixture</a> </li> </ul></li> <li><a href="namespace-Tree.html">Tree<span></span></a> <ul> <li><a href="namespace-Tree.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Tree.Fixture.Closure.html">Closure</a> </li> <li><a href="namespace-Tree.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Tree.Fixture.Genealogy.html">Genealogy</a> </li> <li><a href="namespace-Tree.Fixture.Mock.html">Mock</a> </li> <li><a href="namespace-Tree.Fixture.Repository.html">Repository</a> </li> <li><a href="namespace-Tree.Fixture.Transport.html">Transport</a> </li> </ul></li></ul></li> <li><a href="namespace-Uploadable.html">Uploadable<span></span></a> <ul> <li><a href="namespace-Uploadable.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Uploadable.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> <li><a href="namespace-Wrapper.html">Wrapper<span></span></a> <ul> <li><a href="namespace-Wrapper.Fixture.html">Fixture<span></span></a> <ul> <li><a href="namespace-Wrapper.Fixture.Document.html">Document</a> </li> <li><a href="namespace-Wrapper.Fixture.Entity.html">Entity</a> </li> </ul></li></ul></li> </ul> </div> <hr /> <div id="elements"> <h3>Classes</h3> <ul> <li><a href="class-JMS.Serializer.Tests.Fixtures.AccessorOrderChild.html">AccessorOrderChild</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.AccessorOrderMethod.html">AccessorOrderMethod</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.AccessorOrderParent.html">AccessorOrderParent</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.AllExcludedObject.html">AllExcludedObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Article.html">Article</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Author.html">Author</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.AuthorList.html">AuthorList</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.AuthorReadOnly.html">AuthorReadOnly</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.AuthorReadOnlyPerClass.html">AuthorReadOnlyPerClass</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.BlogPost.html">BlogPost</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.CircularReferenceChild.html">CircularReferenceChild</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.CircularReferenceParent.html">CircularReferenceParent</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Comment.html">Comment</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.CurrencyAwareOrder.html">CurrencyAwareOrder</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.CurrencyAwarePrice.html">CurrencyAwarePrice</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.CustomDeserializationObject.html">CustomDeserializationObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.DateTimeArraysObject.html">DateTimeArraysObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.GetSetObject.html">GetSetObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.GroupsObject.html">GroupsObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.IndexedCommentsBlogPost.html">IndexedCommentsBlogPost</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.IndexedCommentsList.html">IndexedCommentsList</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InitializedBlogPostConstructor.html">InitializedBlogPostConstructor</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InitializedObjectConstructor.html">InitializedObjectConstructor</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InlineChild.html">InlineChild</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InlineChildEmpty.html">InlineChildEmpty</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InlineParent.html">InlineParent</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Input.html">Input</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InvalidGroupsObject.html">InvalidGroupsObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.InvalidUsageOfXmlValue.html">InvalidUsageOfXmlValue</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Log.html">Log</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.NamedDateTimeArraysObject.html">NamedDateTimeArraysObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Node.html">Node</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithEmptyHash.html">ObjectWithEmptyHash</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithLifecycleCallbacks.html">ObjectWithLifecycleCallbacks</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithNullProperty.html">ObjectWithNullProperty</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithVersionedVirtualProperties.html">ObjectWithVersionedVirtualProperties</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithVirtualProperties.html">ObjectWithVirtualProperties</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithVirtualPropertiesAndExcludeAll.html">ObjectWithVirtualPropertiesAndExcludeAll</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithVirtualXmlProperties.html">ObjectWithVirtualXmlProperties</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithXmlKeyValuePairs.html">ObjectWithXmlKeyValuePairs</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithXmlNamespaces.html">ObjectWithXmlNamespaces</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.ObjectWithXmlRootNamespace.html">ObjectWithXmlRootNamespace</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Order.html">Order</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Person.html">Person</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.PersonCollection.html">PersonCollection</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.PersonLocation.html">PersonLocation</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Price.html">Price</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Publisher.html">Publisher</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.SimpleClassObject.html">SimpleClassObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.SimpleObject.html">SimpleObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.SimpleObjectProxy.html">SimpleObjectProxy</a></li> <li class="active"><a href="class-JMS.Serializer.Tests.Fixtures.SimpleSubClassObject.html">SimpleSubClassObject</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.Tree.html">Tree</a></li> <li><a href="class-JMS.Serializer.Tests.Fixtures.VersionedObject.html">VersionedObject</a></li> </ul> </div> </div> </div> <div id="splitter"></div> <div id="right"> <div id="rightInner"> <form id="search"> <input type="hidden" name="cx" value="" /> <input type="hidden" name="ie" value="UTF-8" /> <input type="text" name="q" class="text" /> <input type="submit" value="Search" /> </form> <div id="navigation"> <ul> <li> <a href="index.html" title="Overview"><span>Overview</span></a> </li> <li> <a href="namespace-JMS.Serializer.Tests.Fixtures.html" title="Summary of JMS\Serializer\Tests\Fixtures"><span>Namespace</span></a> </li> <li> <a href="class-JMS.Serializer.Tests.Fixtures.SimpleSubClassObject.html" title="Summary of JMS\Serializer\Tests\Fixtures\SimpleSubClassObject"><span>Class</span></a> </li> </ul> <ul> <li> <a href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a> </li> </ul> <ul> </ul> </div> <pre><code><span id="1" class="l"><a class="l" href="#1"> 1: </a><span class="xlang">&lt;?php</span> </span><span id="2" class="l"><a class="l" href="#2"> 2: </a> </span><span id="3" class="l"><a class="l" href="#3"> 3: </a><span class="php-comment"></span> </span><span id="18" class="l"><a class="l" href="#18">18: </a> </span><span id="19" class="l"><a class="l" href="#19">19: </a><span class="php-keyword1">namespace</span> JMS\Serializer\Tests\Fixtures; </span><span id="20" class="l"><a class="l" href="#20">20: </a> </span><span id="21" class="l"><a class="l" href="#21">21: </a><span class="php-keyword1">use</span> JMS\Serializer\Annotation\XmlNamespace; </span><span id="22" class="l"><a class="l" href="#22">22: </a><span class="php-keyword1">use</span> JMS\Serializer\Annotation\Type; </span><span id="23" class="l"><a class="l" href="#23">23: </a><span class="php-keyword1">use</span> JMS\Serializer\Annotation\XmlAttribute; </span><span id="24" class="l"><a class="l" href="#24">24: </a><span class="php-keyword1">use</span> JMS\Serializer\Annotation\XmlElement; </span><span id="25" class="l"><a class="l" href="#25">25: </a> </span><span id="26" class="l"><a class="l" href="#26">26: </a><span class="php-comment">/** </span></span><span id="27" class="l"><a class="l" href="#27">27: </a><span class="php-comment"> * @XmlNamespace(prefix=&quot;old_foo&quot;, uri=&quot;http://foo.example.org&quot;); </span></span><span id="28" class="l"><a class="l" href="#28">28: </a><span class="php-comment"> * @XmlNamespace(prefix=&quot;foo&quot;, uri=&quot;http://better.foo.example.org&quot;); </span></span><span id="29" class="l"><a class="l" href="#29">29: </a><span class="php-comment"> */</span> </span><span id="30" class="l"><a class="l" href="#30">30: </a><span class="php-keyword1">class</span> <a id="SimpleSubClassObject" href="#SimpleSubClassObject">SimpleSubClassObject</a> </span><span id="31" class="l"><a class="l" href="#31">31: </a> <span class="php-keyword1">extends</span> SimpleClassObject </span><span id="32" class="l"><a class="l" href="#32">32: </a>{ </span><span id="33" class="l"><a class="l" href="#33">33: </a> </span><span id="34" class="l"><a class="l" href="#34">34: </a> <span class="php-comment">/** </span></span><span id="35" class="l"><a class="l" href="#35">35: </a><span class="php-comment"> * @Type(&quot;string&quot;) </span></span><span id="36" class="l"><a class="l" href="#36">36: </a><span class="php-comment"> * @XmlElement(namespace=&quot;http://better.foo.example.org&quot;) </span></span><span id="37" class="l"><a class="l" href="#37">37: </a><span class="php-comment"> */</span> </span><span id="38" class="l"><a class="l" href="#38">38: </a> <span class="php-keyword1">public</span> <span class="php-var"><a id="$moo" href="#$moo">$moo</a></span>; </span><span id="39" class="l"><a class="l" href="#39">39: </a> </span><span id="40" class="l"><a class="l" href="#40">40: </a> <span class="php-comment">/** </span></span><span id="41" class="l"><a class="l" href="#41">41: </a><span class="php-comment"> * @Type(&quot;string&quot;) </span></span><span id="42" class="l"><a class="l" href="#42">42: </a><span class="php-comment"> * @XmlElement(namespace=&quot;http://foo.example.org&quot;) </span></span><span id="43" class="l"><a class="l" href="#43">43: </a><span class="php-comment"> */</span> </span><span id="44" class="l"><a class="l" href="#44">44: </a> <span class="php-keyword1">public</span> <span class="php-var"><a id="$baz" href="#$baz">$baz</a></span>; </span><span id="45" class="l"><a class="l" href="#45">45: </a> </span><span id="46" class="l"><a class="l" href="#46">46: </a> <span class="php-comment">/** </span></span><span id="47" class="l"><a class="l" href="#47">47: </a><span class="php-comment"> * @Type(&quot;string&quot;) </span></span><span id="48" class="l"><a class="l" href="#48">48: </a><span class="php-comment"> * @XmlElement(namespace=&quot;http://new.foo.example.org&quot;) </span></span><span id="49" class="l"><a class="l" href="#49">49: </a><span class="php-comment"> */</span> </span><span id="50" class="l"><a class="l" href="#50">50: </a> <span class="php-keyword1">public</span> <span class="php-var"><a id="$qux" href="#$qux">$qux</a></span>; </span><span id="51" class="l"><a class="l" href="#51">51: </a> </span><span id="52" class="l"><a class="l" href="#52">52: </a>} </span><span id="53" class="l"><a class="l" href="#53">53: </a></span></code></pre> <div id="footer"> seip API documentation generated by <a href="http://apigen.org">ApiGen 2.8.0</a> </div> </div> </div> </body> </html>
{'content_hash': '8b6024f105b831c881873bb4700da85c', 'timestamp': '', 'source': 'github', 'line_count': 3418, 'max_line_length': 185, 'avg_line_length': 47.90784084259801, 'alnum_prop': 0.6513749702288258, 'repo_name': 'Tecnocreaciones/VzlaGovernmentTemplateDeveloperSeed', 'id': '7f717b551b15c8379dd2345b1efc9de8d0c6e3a4', 'size': '165732', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'api/source-class-JMS.Serializer.Tests.Fixtures.SimpleSubClassObject.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '10864'}, {'name': 'JavaScript', 'bytes': '131316'}, {'name': 'PHP', 'bytes': '211008'}, {'name': 'Perl', 'bytes': '2621'}]}
 using System; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; namespace XenAdmin.Controls { public class ShadowPanel : Panel { private Color _panelColor = Color.Transparent; public Color PanelColor { get { return _panelColor; } set { _panelColor = value; } } private Color _borderColor = Color.Transparent; public Color BorderColor { get { return _borderColor; } set { _borderColor = value; } } private int shadowSize = 5; private int shadowMargin = 2; // static for good perfomance private static Image shadowDownRight = Images.StaticImages.tshadowdownright; private static Image shadowDownLeft = Images.StaticImages.tshadowdownleft; private static Image shadowDown = Images.StaticImages.tshadowdown; private static Image shadowRight = Images.StaticImages.tshadowright; private static Image shadowTopRight = Images.StaticImages.tshadowtopright; public ShadowPanel() { this.DoubleBuffered = true; SetStyle(ControlStyles.OptimizedDoubleBuffer, true); } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); // Get the graphics object. We need something to draw with ;-) Graphics g = e.Graphics; // Create tiled brushes for the shadow on the right and at the bottom. TextureBrush shadowRightBrush = new TextureBrush(shadowRight, WrapMode.Tile); TextureBrush shadowDownBrush = new TextureBrush(shadowDown, WrapMode.Tile); // Translate (move) the brushes so the top or left of the image matches the top or left of the // area where it's drawed. If you don't understand why this is necessary, comment it out. // Hint: The tiling would start at 0,0 of the control, so the shadows will be offset a little. shadowDownBrush.TranslateTransform(0, Height - shadowSize); shadowRightBrush.TranslateTransform(Width - shadowSize, 0); // Define the rectangles that will be filled with the brush. // (where the shadow is drawn) Rectangle shadowDownRectangle = new Rectangle( shadowSize + shadowMargin, // X Height - shadowSize, // Y Width - (shadowSize * 2 + shadowMargin), // width (stretches) shadowSize // height ); Rectangle shadowRightRectangle = new Rectangle( Width - shadowSize, // X shadowSize + shadowMargin, // Y shadowSize, // width Height - (shadowSize * 2 + shadowMargin) // height (stretches) ); // And draw the shadow on the right and at the bottom. g.FillRectangle(shadowDownBrush, shadowDownRectangle); g.FillRectangle(shadowRightBrush, shadowRightRectangle); // Now for the corners, draw the 3 5x5 pixel images. g.DrawImage(shadowTopRight, new Rectangle(Width - shadowSize, shadowMargin, shadowSize, shadowSize)); g.DrawImage(shadowDownRight, new Rectangle(Width - shadowSize, Height - shadowSize, shadowSize, shadowSize)); g.DrawImage(shadowDownLeft, new Rectangle(shadowMargin, Height - shadowSize, shadowSize, shadowSize)); // Fill the area inside with the color in the PanelColor property. // 1 pixel is added to everything to make the rectangle smaller. // This is because the 1 pixel border is actually drawn outside the rectangle. Rectangle fullRectangle = new Rectangle( 1, // X 1, // Y Width - (shadowSize + 2), // Width Height - (shadowSize + 2) // Height ); if (PanelColor != Color.Transparent) { using (SolidBrush bgBrush = new SolidBrush(_panelColor)) g.FillRectangle(bgBrush, fullRectangle); } // Draw a nice 1 pixel border it a BorderColor is specified if (_borderColor != Color.Transparent) { using (Pen borderPen = new Pen(BorderColor)) g.DrawRectangle(borderPen, fullRectangle); } // Memory efficiency shadowDownBrush.Dispose(); shadowRightBrush.Dispose(); shadowDownBrush = null; shadowRightBrush = null; } // Correct resizing protected override void OnResize(EventArgs e) { base.Invalidate(); base.OnResize(e); } } }
{'content_hash': '8fdc2c874cfa5abdd7ff4f9b6a7c5183', 'timestamp': '', 'source': 'github', 'line_count': 125, 'max_line_length': 121, 'avg_line_length': 41.928, 'alnum_prop': 0.5451249761495898, 'repo_name': 'kc284/xenadmin', 'id': 'b9dd7b5b7f18dacc18afd3de40452a561202785c', 'size': '6701', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'XenAdmin/Controls/ShadowPanel.cs', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Batchfile', 'bytes': '14'}, {'name': 'C', 'bytes': '1956'}, {'name': 'C#', 'bytes': '18755144'}, {'name': 'C++', 'bytes': '21665'}, {'name': 'JavaScript', 'bytes': '829'}, {'name': 'PowerShell', 'bytes': '22452'}, {'name': 'Shell', 'bytes': '17122'}, {'name': 'VBScript', 'bytes': '11647'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in Am. J. Bot. 44(5): 433 (1957) #### Original name Sebacina fibrillosa Burt, 1926 ### Remarks null
{'content_hash': 'be878e1eaa219db136f7a5af22d81098', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 14.153846153846153, 'alnum_prop': 0.6847826086956522, 'repo_name': 'mdoering/backbone', 'id': 'e09a5d63809ab8cad0adbb79c8736ad166ad07a2', 'size': '255', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Fungi/Basidiomycota/Agaricomycetes/Auriculariales/Oliveonia/Oliveonia fibrillosa/ Syn. Heteromyces fibrillosus/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
#ifndef CDSLIB_THREADING_DETAILS_CXX11_MANAGER_H #define CDSLIB_THREADING_DETAILS_CXX11_MANAGER_H #include <cds/threading/details/_common.h> #ifndef CDS_CXX11_THREAD_LOCAL_SUPPORT # error "The compiler does not support C++11 thread_local keyword. You cannot use CDS_THREADING_CXX11 threading model." #endif //@cond namespace cds { namespace threading { //@cond struct cxx11_internal { typedef unsigned char ThreadDataPlaceholder[ sizeof(ThreadData) ]; static thread_local ThreadDataPlaceholder CDS_DATA_ALIGNMENT(8) s_threadData; static thread_local ThreadData * s_pThreadData; }; //@endcond /// cds::threading::Manager implementation based on c++11 thread_local declaration CDS_CXX11_INLINE_NAMESPACE namespace cxx11 { /// Thread-specific data manager based on c++11 thread_local feature class Manager { private : //@cond static ThreadData * _threadData() { return cxx11_internal::s_pThreadData; } static ThreadData * create_thread_data() { if ( !cxx11_internal::s_pThreadData ) { cxx11_internal::s_pThreadData = new (cxx11_internal::s_threadData) ThreadData(); } return cxx11_internal::s_pThreadData; } static void destroy_thread_data() { if ( cxx11_internal::s_pThreadData ) { ThreadData * p = cxx11_internal::s_pThreadData; cxx11_internal::s_pThreadData = nullptr; p->ThreadData::~ThreadData(); } } //@endcond public: /// Initialize manager (empty function) /** This function is automatically called by cds::Initialize */ static void init() {} /// Terminate manager (empty function) /** This function is automatically called by cds::Terminate */ static void fini() {} /// Checks whether current thread is attached to \p libcds feature or not. static bool isThreadAttached() { return _threadData() != nullptr; } /// This method must be called in beginning of thread execution static void attachThread() { create_thread_data()->init(); } /// This method must be called in end of thread execution static void detachThread() { assert( _threadData()); if ( _threadData()->fini()) destroy_thread_data(); } /// Returns ThreadData pointer for the current thread static ThreadData * thread_data() { ThreadData * p = _threadData(); assert( p ); return p; } /// Get gc::HP thread GC implementation for current thread /** The object returned may be uninitialized if you did not call attachThread in the beginning of thread execution or if you did not use gc::HP. To initialize gc::HP GC you must constuct cds::gc::HP object in the beginning of your application */ static gc::HP::thread_gc_impl& getHZPGC() { assert( _threadData()->m_hpManager != nullptr ); return *(_threadData()->m_hpManager); } /// Get gc::DHP thread GC implementation for current thread /** The object returned may be uninitialized if you did not call attachThread in the beginning of thread execution or if you did not use gc::DHP. To initialize gc::DHP GC you must constuct cds::gc::DHP object in the beginning of your application */ static gc::DHP::thread_gc_impl& getDHPGC() { assert( _threadData()->m_dhpManager != nullptr ); return *(_threadData()->m_dhpManager); } //@cond static size_t fake_current_processor() { return _threadData()->fake_current_processor(); } //@endcond }; } // namespace cxx11 }} // namespace cds::threading //@endcond #endif // #ifndef CDSLIB_THREADING_DETAILS_CXX11_MANAGER_H
{'content_hash': '894d778b88f4a9dea38f1aaadce1b474', 'timestamp': '', 'source': 'github', 'line_count': 135, 'max_line_length': 126, 'avg_line_length': 33.74814814814815, 'alnum_prop': 0.5342405618964003, 'repo_name': 'eugenyk/libcds', 'id': '9bac49412429bbc878b1df3b91789f91b8de68e9', 'size': '6127', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'cds/threading/details/cxx11_manager.h', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Batchfile', 'bytes': '649'}, {'name': 'C', 'bytes': '133185'}, {'name': 'C++', 'bytes': '9230672'}, {'name': 'CMake', 'bytes': '61927'}, {'name': 'HTML', 'bytes': '466'}, {'name': 'Perl', 'bytes': '874'}, {'name': 'Shell', 'bytes': '16'}]}
<?php class Array_helper_test extends CI_TestCase { public $my_array = array( 'foo' => 'bar', 'sally' => 'jim', 'maggie' => 'bessie', 'herb' => 'cook' ); public function set_up() { $this->helper('array'); } // ------------------------------------------------------------------------ public function test_element_with_existing_item() { $this->assertEquals(FALSE, element('testing', $this->my_array)); $this->assertEquals('not set', element('testing', $this->my_array, 'not set')); $this->assertEquals('bar', element('foo', $this->my_array)); } // ------------------------------------------------------------------------ public function test_random_element() { // Send a string, not an array to random_element $this->assertEquals('my string', random_element('my string')); // Test sending an array $this->assertContains(random_element($this->my_array), $this->my_array); } // ------------------------------------------------------------------------ public function test_elements() { $this->assertEquals('array', gettype(elements('test', $this->my_array))); $this->assertEquals('array', gettype(elements('foo', $this->my_array))); } }
{'content_hash': '6fe7c0b243a621f62d7fe7a8a1ea497e', 'timestamp': '', 'source': 'github', 'line_count': 45, 'max_line_length': 81, 'avg_line_length': 26.533333333333335, 'alnum_prop': 0.5159128978224455, 'repo_name': 'bcit-ci/CodeIgniter', 'id': 'f4e34467360ccb4af07ee87664e6d70ab71fe47e', 'size': '1194', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'tests/codeigniter/helpers/array_helper_test.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2486'}, {'name': 'HTML', 'bytes': '27434'}, {'name': 'JavaScript', 'bytes': '6513'}, {'name': 'Makefile', 'bytes': '4614'}, {'name': 'PHP', 'bytes': '1980300'}, {'name': 'Python', 'bytes': '11567'}, {'name': 'Shell', 'bytes': '1899'}]}
using System.Linq; using System.Threading.Tasks; using FluentAssertions; using IdentityServer4.Configuration; using IdentityServer4.Endpoints.Results; using IdentityServer4.Validation; using Microsoft.AspNetCore.Http; using Xunit; namespace IdentityServer.UnitTests.Endpoints.EndSession { public class EndSessionCallbackResultTests { private const string Category = "End Session Callback Result"; private readonly EndSessionCallbackValidationResult _validationResult; private readonly IdentityServerOptions _options; private readonly EndSessionCallbackResult _subject; public EndSessionCallbackResultTests() { _validationResult = new EndSessionCallbackValidationResult() { IsError = false, }; _options = new IdentityServerOptions(); _subject = new EndSessionCallbackResult(_validationResult, _options); } [Fact] public async Task default_options_should_emit_frame_src_csp_headers() { _validationResult.FrontChannelLogoutUrls = new[] { "http://foo" }; var ctx = new DefaultHttpContext(); ctx.Request.Method = "GET"; await _subject.ExecuteAsync(ctx); ctx.Response.Headers["Content-Security-Policy"].First().Should().Contain("frame-src http://foo"); } [Fact] public async Task relax_csp_options_should_prevent_frame_src_csp_headers() { _options.Authentication.RequireCspFrameSrcForSignout = false; _validationResult.FrontChannelLogoutUrls = new[] { "http://foo" }; var ctx = new DefaultHttpContext(); ctx.Request.Method = "GET"; await _subject.ExecuteAsync(ctx); ctx.Response.Headers["Content-Security-Policy"].FirstOrDefault().Should().BeNull(); } } }
{'content_hash': 'ccef3bbc80ffd1aa9c4aa3157c409188', 'timestamp': '', 'source': 'github', 'line_count': 57, 'max_line_length': 109, 'avg_line_length': 33.35087719298246, 'alnum_prop': 0.6522882693319305, 'repo_name': 'MienDev/IdentityServer4', 'id': 'a4671c999ad35c2cc0618399ebb5da5c728a72e3', 'size': '2079', 'binary': False, 'copies': '2', 'ref': 'refs/heads/ids-dev', 'path': 'src/IdentityServer4/test/IdentityServer.UnitTests/Endpoints/EndSession/EndSessionCallbackResultTests.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '1647'}, {'name': 'C#', 'bytes': '3033883'}, {'name': 'CSS', 'bytes': '1491'}, {'name': 'HTML', 'bytes': '74820'}, {'name': 'JavaScript', 'bytes': '807'}, {'name': 'PowerShell', 'bytes': '1832'}, {'name': 'SCSS', 'bytes': '638544'}, {'name': 'Shell', 'bytes': '1080'}, {'name': 'TSQL', 'bytes': '17480'}]}
[Traefik](http://traefik.io/) is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease. ## Introduction This chart bootstraps Traefik as a Kubernetes ingress controller with optional support for SSL and Let's Encrypt. __NOTE:__ Operators will typically wish to install this component into the `kube-system` namespace where that namespace's default service account will ensure adequate privileges to watch `Ingress` resources _cluster-wide_. ## Prerequisites - Kubernetes 1.4+ with Beta APIs enabled - Kubernetes 1.6+ if you want to enable RBAC - You are deploying the chart to a cluster with a cloud provider capable of provisioning an external load balancer (e.g. AWS or GKE) - You control DNS for the domain(s) you intend to route through Traefik - __Suggested:__ PV provisioner support in the underlying infrastructure ## A Quick Note on Versioning Up until version 1.2.1-b of this chart, the semantic version of the chart was kept in-sync with the semantic version of the (default) version of Traefik installed by the chart. A dash and a letter were appended to Traefik's semantic version to indicate incrementally improved versions of the chart itself. For example, chart version 1.2.1-a and 1.2.1-b _both_ provide Traefik 1.2.1, but 1.2.1-b is a chart that is incrementally improved in some way from its immediate predecessor-- 1.2.1-a. This convention, in practice, suffered from a few problems, not the least of which was that it defied what was permitted by [semver 2.0.0](http://semver.org/spec/v2.0.0.html). This, in turn, lead to some difficulty in Helm understanding the versions of this chart. Beginning with version 1.3.0 of this chart, the version references _only_ the revision of the chart itself. The `appVersion` field in `chart.yaml` now conveys information regarding the revision of Traefik that the chart provides. ## Installing the Chart To install the chart with the release name `my-release`: ```bash $ helm install stable/traefik --name my-release --namespace kube-system ``` After installing the chart, create DNS records for applicable domains to direct inbound traffic to the load balancer. You can use the commands below to find the load balancer's IP/hostname: __NOTE:__ It may take a few minutes for this to become available. You can watch the status by running: ```bash $ kubectl get svc my-release-traefik --namespace kube-system -w ``` Once `EXTERNAL-IP` is no longer `<pending>`: ```bash $ kubectl describe service my-release-traefik -n kube-system | grep Ingress | awk '{print $3}' ``` __NOTE:__ If ACME support is enabled, it is only _after_ this step is complete that Traefik will be able to successfully use the ACME protocol to obtain certificates from Let's Encrypt. ## Uninstalling the Chart To uninstall/delete the `my-release` deployment: ```bash $ helm delete my-release ``` The command removes all the Kubernetes components associated with the chart and deletes the release. ## Configuration The following tables lists the configurable parameters of the Traefik chart and their default values. | Parameter | Description | Default | | ------------------------------- | -------------------------------------------------------------------- | ----------------------------------------- | | `image` | Traefik image name | `traefik` | | `imageTag` | The version of the official Traefik image to use | `1.4.5` | | `serviceType` | A valid Kubernetes service type | `LoadBalancer` | | `loadBalancerIP` | An available static IP you have reserved on your cloud platform | None | | `loadBalancerSourceRanges` | list of IP CIDRs allowed access to load balancer (if supported) | None | | `replicas` | The number of replicas to run; __NOTE:__ Full Traefik clustering with leader election is not yet supported, which can affect any configured Let's Encrypt setup; see Clustering section | `1` | | `cpuRequest` | Initial share of CPU requested per Traefik pod | `100m` | | `memoryRequest` | Initial share of memory requested per Traefik pod | `20Mi` | | `cpuLimit` | CPU limit per Traefik pod | `200m` | | `memoryLimit` | Memory limit per Traefik pod | `30Mi` | | `rbac.enabled` | Whether to enable RBAC with a specific cluster role and binding for Traefik | `false` | | `nodeSelector` | Node labels for pod assignment | `{}` | | `tolerations` | List of node taints to tolerate | `[]` | | `debug.enabled` | Turn on/off Traefik's debug mode. Enabling it will override the logLevel to `DEBUG` and provide `/debug/vars` endpoint that allows Go runtime stats to be inspected, such as number of Goroutines and memory stats | `false` | | `ssl.enabled` | Whether to enable HTTPS | `false` | | `ssl.enforced` | Whether to redirect HTTP requests to HTTPS | `false` | | `ssl.defaultCert` | Base64 encoded default certficate | A self-signed certificate | | `ssl.defaultKey` | Base64 encoded private key for the certificate above | The private key for the certificate above | | `acme.enabled` | Whether to use Let's Encrypt to obtain certificates | `false` | | `acme.email` | Email address to be used in certificates obtained from Let's Encrypt | `[email protected]` | | `acme.staging` | Whether to get certs from Let's Encrypt's staging environment | `true` | | `acme.logging` | display debug log messages from the acme client library | `false` | | `acme.persistence.enabled` | Create a volume to store ACME certs (if ACME is enabled) | `true` | | `acme.persistence.storageClass` | Type of `StorageClass` to request-- will be cluster-specific | `nil` (uses alpha storage class annotation) | | `acme.persistence.accessMode` | `ReadWriteOnce` or `ReadOnly` | `ReadWriteOnce` | | `acme.persistence.size` | Minimum size of the volume requested | `1Gi` | | `dashboard.enabled` | Whether to enable the Traefik dashboard | `false` | | `dashboard.domain` | Domain for the Traefik dashboard | `traefik.example.com` | | `dashboard.service.annotations` | Annotations for the Traefik dashboard Service definition, specified as a map | None | | `dashboard.ingress.annotations` | Annotations for the Traefik dashboard Ingress definition, specified as a map | None | | `dashboard.ingress.labels` | Labels for the Traefik dashboard Ingress definition, specified as a map | None | | `dashboard.auth.basic` | Basic auth for the Traefik dashboard specified as a map, see Authentication section | unset by default; this means basic auth is disabled | | `dashboard.statistics.recentErrors` | Number of recent errors to show in the ‘Health’ tab | None | | `service.annotations` | Annotations for the Traefik Service definition, specified as a map | None | | `service.labels` | Additional labels for the Traefik Service definition, specified as a map | None | | `service.nodePorts.http` | Desired nodePort for service of type NodePort used for http requests | blank ('') - will assign a dynamic node port | | `service.nodePorts.https` | Desired nodePort for service of type NodePort used for https requests | blank ('') - will assign a dynamic node port | | `gzip.enabled` | Whether to use gzip compression | `true` | | `kubernetes.namespaces` | List of Kubernetes namespaces to watch | All namespaces | | `kubernetes.labelSelector` | Valid Kubernetes ingress label selector to watch (e.g `realm=public`)| No label filter | | `accessLogs.enabled` | Whether to enable Traefik's access logs | `false` | | `accessLogs.filePath` | The path to the log file. Logs to stdout if omitted | None | | `accessLogs.format` | What format the log entries should be in. Either `common` or `json` | `common` | | `metrics.prometheus.enabled` | Whether to enable the `/metrics` endpoint for metric collection by Prometheus. | `false` | | `metrics.prometheus.buckets` | A list of response times (in seconds) - for each list element, Traefik will report all response times less than the element. | `[0.1,0.3,1.2,5]` | | `metrics.datadog.enabled` | Whether to enable pushing metrics to Datadog. | `false` | | `metrics.datadog.address` | Datadog host in the format <hostname>:<port> | `localhost:8125` | | `metrics.datadog.pushInterval` | How often to push metrics to Datadog. | `10s` | | `metrics.statsd.enabled` | Whether to enable pushing metrics to Statsd. | `false` | | `metrics.statsd.address` | Statsd host in the format <hostname>:<port> | `localhost:8125` | | `metrics.statsd.pushInterval` | How often to push metrics to Statsd. | `10s` | | `deployment.podAnnotations` | Annotations for the Traefik pod definition | None | | `deployment.hostPort.httpEnabled` | Whether to enable hostPort binding to host for http. | `false` | | `deployment.hostPort.httpsEnabled` | Whether to enable hostPort binding to host for https. | `false` | | `deployment.hostPort.dashboardEnabled` | Whether to enable hostPort binding to host for dashboard. | `false` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example: ```bash $ helm install --name my-release --namespace kube-system \ --set dashboard.enabled=true,dashboard.domain=traefik.example.com stable/traefik ``` The above command enables the Traefik dashboard on the domain `traefik.example.com`. Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example: ```bash $ helm install --name my-release --namespace kube-system --values values.yaml stable/traefik ``` ### Clustering / High Availability Currently it is possible to specify the number of `replicas` but the implementation is naive. **Full Traefik clustering with leader election is not yet supported.** It is heavily advised to not set a value for `replicas` if you also have Let's Encrypt configured. While setting `replicas` will work for many cases, since no leader is elected it has the consequence that each node will end up requesting Let's Encrypt certificates if this is also configured. This will quickly cut into the very modest rate limit that Let's Encrypt enforces. [Basic auth](https://docs.traefik.io/toml/#api-backend) can be specified via `dashboard.auth.basic` as a map of usernames to passwords as below. See the linked Traefik documentation for accepted passwords encodings. It is advised to single quote passwords to avoid issues with special characters: ```bash $ helm install --name my-release --namespace kube-system \ --set dashboard.enabled=true,dashboard.auth.basic.test='$apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/' \ stable/traefik ``` Alternatively in YAML form: ```yaml dashboard: enabled: true domain: traefik.example.com auth: basic: test: $apr1$H6uskkkW$IgXLP6ewTrSuBkTrqE8wj/ ```
{'content_hash': '85d9f009d3ce1fcf176863fe5db9aa79', 'timestamp': '', 'source': 'github', 'line_count': 185, 'max_line_length': 375, 'avg_line_length': 74.96756756756757, 'alnum_prop': 0.5657942173192011, 'repo_name': 'samisms/charts', 'id': '535acc3f26347db71d5576ff78e527fba075b554', 'size': '13884', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'stable/traefik/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Go', 'bytes': '8156'}, {'name': 'Makefile', 'bytes': '1698'}, {'name': 'Python', 'bytes': '244'}, {'name': 'Shell', 'bytes': '20671'}, {'name': 'Smarty', 'bytes': '87859'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': 'd96e91a2dd355a47a0baea36f6d9decc', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': '14a5cb348b2d6baa02fa3958cebca264c29363d2', 'size': '181', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Fagales/Betulaceae/Corylus/Corylus avellana/ Syn. Corylus avellana peltata/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
(function() { function StartrekEnterprise() { var scene = null; var camera = null; var renderer = null; var mesh = null; function createDirectionalLight(options) { var directionalLight; directionalLight = new THREE.DirectionalLight(0xffffff, 0.7); directionalLight.position.set(options.position.x, options.position.y, options.position.z); return directionalLight; } this.initialize = function(canvas) { scene = new THREE.Scene(); camera = new THREE.PerspectiveCamera( 75, sample_defaults.width / sample_defaults.height, 1, 1000 ); camera.position.z = 100; scene.add(createDirectionalLight({ position: camera.position })); renderer = new THREE.WebGLRenderer({canvas: canvas, antialias: true}); renderer.setSize( sample_defaults.width * 3, sample_defaults.height * 3); var instance = { active: false }; function animate() { requestAnimationFrame( animate ); if(!sample_defaults.paused && instance.active) { mesh.rotation.y += 0.01; } mesh.material.wireframe = sample_defaults.wireframe; renderer.render( scene, camera ); } var loader = new THREE.JSONLoader(); loader.load("js/meshes/Startrek_Enterprise.js", function(geometry, materials) { mesh = new THREE.Mesh( geometry, materials[0] ); mesh.scale = new THREE.Vector3(20, 20, 20); scene.add( mesh ); animate(); }); return instance; }; } window.samples.load_startrek_enterprise = { initialize: function(canvas) { var startrek = new StartrekEnterprise(); return startrek.initialize(canvas); } }; })();
{'content_hash': '0710630d1cb0401015057089c955ef24', 'timestamp': '', 'source': 'github', 'line_count': 57, 'max_line_length': 106, 'avg_line_length': 29.92982456140351, 'alnum_prop': 0.6359906213364596, 'repo_name': 'dimroc/reveal.js-threejs', 'id': '5645533a76bf4291d1b66bc7e6983003bda265ab', 'size': '1706', 'binary': False, 'copies': '3', 'ref': 'refs/heads/gh-pages', 'path': 'js/samples/load_startrek_enterprise.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '52407'}, {'name': 'HTML', 'bytes': '48581'}, {'name': 'JavaScript', 'bytes': '1236666'}]}
This is "work in progress". It's my personal tool for merging PR using git and Github. The goal was to avoid using the GUI. It will merge the PR on GitHub for you, clean your local repo, tag it and add a comment on the PR to compare the previous and new tag.
{'content_hash': '8cb598d895003aebfab83b8d54c9d237', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 88, 'avg_line_length': 86.33333333333333, 'alnum_prop': 0.7606177606177607, 'repo_name': 'NevilleC/merging', 'id': '4f56619429746a62faa250f0d0129d053da8d94e', 'size': '270', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Go', 'bytes': '7486'}]}
<?php namespace Studiow\Properties\Test; use Studiow\Properties\PropertiesHolder; use Studiow\Properties\PropertiesHolderInterface; use PHPUnit_Framework_TestCase; class PropertiesHolderTest extends PHPUnit_Framework_TestCase { /** * * @return Studiow\Properties\PropertiesHolderInterface */ private function getPropertiesHolder() { return new PropertiesHolder(["foo" => "bar", "foo_2" => "bar_2"]); } public function testHasProperty() { $props = $this->getPropertiesHolder(); $this->assertTrue($props->has("foo")); $this->assertFalse($props->has("unknown_prop")); } public function testGetProperty() { $props = $this->getPropertiesHolder(); $this->assertEquals("bar", $props->get("foo", "default")); } public function testGetPropertyDefault() { $props = $this->getPropertiesHolder(); $this->assertEquals("default", $props->get("unknown_prop", "default")); } public function testAddSingle() { $props = $this->getPropertiesHolder(); $props->set("foo_3", "bar_3"); $this->assertTrue($props->has("foo_3")); $this->assertEquals("bar_3", $props->get("foo_3", "default")); } public function testAddMultiple() { $props = $this->getPropertiesHolder(); $props->set(["foo_3" => "bar_3", "foo_4" => "bar_4"]); $this->assertTrue($props->has("foo_3")); $this->assertEquals("bar_3", $props->get("foo_3", "default")); $this->assertTrue($props->has("foo_4")); $this->assertEquals("bar_4", $props->get("foo_4", "default")); } public function testUpdateSingle() { $props = $this->getPropertiesHolder(); $props->set("foo", "updated"); $this->assertEquals("updated", $props->get("foo", "default")); } public function testUpdateMultiple() { $props = $this->getPropertiesHolder(); $props->set(["foo" => "updated", "foo_2" => "updated_2"]); $this->assertEquals("updated", $props->get("foo", "default")); $this->assertEquals("updated_2", $props->get("foo_2", "default")); } public function testRemoveSingle() { $props = $this->getPropertiesHolder(); $props->remove("foo"); $this->assertFalse($props->has("foo")); } public function testRemoveMultiple() { $props = $this->getPropertiesHolder(); $props->remove(["foo", "foo_2"]); $this->assertFalse($props->has("foo")); $this->assertFalse($props->has("foo_2")); } public function testReturnForSet() { $props = $this->getPropertiesHolder(); $rv = $props->set("foo", "updated"); $this->assertInstanceOf(PropertiesHolderInterface::class, $rv); } public function testReturnForRemove() { $props = $this->getPropertiesHolder(); $rv = $props->remove("foo"); $this->assertInstanceOf(PropertiesHolderInterface::class, $rv); } }
{'content_hash': '803d87ad11bf6bf53027781a4e4505f5', 'timestamp': '', 'source': 'github', 'line_count': 107, 'max_line_length': 79, 'avg_line_length': 28.327102803738317, 'alnum_prop': 0.582975915539426, 'repo_name': 'studiowbe/properties', 'id': '9aa4fdd391ebbdf6abb9072587c90ccefcfa2314', 'size': '3031', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/PropertiesHolderTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PHP', 'bytes': '6864'}]}
<!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_12) on Sun Feb 08 17:26:50 PST 2009 --> <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <TITLE> TypeMap (PMD 4.2.5 API) </TITLE> <META NAME="date" CONTENT="2009-02-08"> <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="TypeMap (PMD 4.2.5 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>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TypeMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../net/sourceforge/pmd/util/SymbolTableViewer.html" title="class in net.sourceforge.pmd.util"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../net/sourceforge/pmd/util/UnaryFunction.html" title="interface in net.sourceforge.pmd.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?net/sourceforge/pmd/util/TypeMap.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TypeMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<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"> net.sourceforge.pmd.util</FONT> <BR> Class TypeMap</H2> <PRE> java.lang.Object <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>net.sourceforge.pmd.util.TypeMap</B> </PRE> <HR> <DL> <DT><PRE>public class <B>TypeMap</B><DT>extends java.lang.Object</DL> </PRE> <P> A specialized map that stores classes by both their full and short names. <P> <P> <DL> <DT><B>Author:</B></DT> <DD>Brian Remedios</DD> </DL> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_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>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#TypeMap(java.lang.Class...)">TypeMap</A></B>(java.lang.Class...&nbsp;types)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for TypeMap that takes in an initial set of types.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#TypeMap(int)">TypeMap</A></B>(int&nbsp;initialSize)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor for TypeMap.</TD> </TR> </TABLE> &nbsp; <!-- ========== 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>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#add(java.lang.Class...)">add</A></B>(java.lang.Class...&nbsp;types)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds an array of types to the receiver at once.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#add(java.lang.Class)">add</A></B>(java.lang.Class&nbsp;type)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a type to the receiver and stores it keyed by both its full and short names.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#contains(java.lang.Class)">contains</A></B>(java.lang.Class&nbsp;type)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the type is known to the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#contains(java.lang.String)">contains</A></B>(java.lang.String&nbsp;typeName)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns whether the typeName is known to the receiver.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;java.lang.Class</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../net/sourceforge/pmd/util/TypeMap.html#typeFor(java.lang.String)">typeFor</A></B>(java.lang.String&nbsp;typeName)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the type for the typeName specified.</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_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>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="TypeMap(int)"><!-- --></A><H3> TypeMap</H3> <PRE> public <B>TypeMap</B>(int&nbsp;initialSize)</PRE> <DL> <DD>Constructor for TypeMap. <P> <DL> <DT><B>Parameters:</B><DD><CODE>initialSize</CODE> - int</DL> </DL> <HR> <A NAME="TypeMap(java.lang.Class...)"><!-- --></A><H3> TypeMap</H3> <PRE> public <B>TypeMap</B>(java.lang.Class...&nbsp;types)</PRE> <DL> <DD>Constructor for TypeMap that takes in an initial set of types. <P> <DL> <DT><B>Parameters:</B><DD><CODE>types</CODE> - Class[]</DL> </DL> <!-- ============ 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="add(java.lang.Class)"><!-- --></A><H3> add</H3> <PRE> public void <B>add</B>(java.lang.Class&nbsp;type)</PRE> <DL> <DD>Adds a type to the receiver and stores it keyed by both its full and short names. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>type</CODE> - Class</DL> </DD> </DL> <HR> <A NAME="contains(java.lang.Class)"><!-- --></A><H3> contains</H3> <PRE> public boolean <B>contains</B>(java.lang.Class&nbsp;type)</PRE> <DL> <DD>Returns whether the type is known to the receiver. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>type</CODE> - Class <DT><B>Returns:</B><DD>boolean</DL> </DD> </DL> <HR> <A NAME="contains(java.lang.String)"><!-- --></A><H3> contains</H3> <PRE> public boolean <B>contains</B>(java.lang.String&nbsp;typeName)</PRE> <DL> <DD>Returns whether the typeName is known to the receiver. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>typeName</CODE> - String <DT><B>Returns:</B><DD>boolean</DL> </DD> </DL> <HR> <A NAME="typeFor(java.lang.String)"><!-- --></A><H3> typeFor</H3> <PRE> public java.lang.Class <B>typeFor</B>(java.lang.String&nbsp;typeName)</PRE> <DL> <DD>Returns the type for the typeName specified. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>typeName</CODE> - String <DT><B>Returns:</B><DD>Class</DL> </DD> </DL> <HR> <A NAME="add(java.lang.Class...)"><!-- --></A><H3> add</H3> <PRE> public void <B>add</B>(java.lang.Class...&nbsp;types)</PRE> <DL> <DD>Adds an array of types to the receiver at once. <P> <DD><DL> <DT><B>Parameters:</B><DD><CODE>types</CODE> - Class[]</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>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TypeMap.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;<A HREF="../../../../net/sourceforge/pmd/util/SymbolTableViewer.html" title="class in net.sourceforge.pmd.util"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../net/sourceforge/pmd/util/UnaryFunction.html" title="interface in net.sourceforge.pmd.util"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?net/sourceforge/pmd/util/TypeMap.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="TypeMap.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright &copy; 2002-2009 InfoEther. All Rights Reserved. </BODY> </HTML>
{'content_hash': '642f09c1cf55f1b67e84dc51358cbcf7', 'timestamp': '', 'source': 'github', 'line_count': 374, 'max_line_length': 156, 'avg_line_length': 37.29679144385027, 'alnum_prop': 0.6306545272062514, 'repo_name': 'deleidos/digitaledge-platform', 'id': '2b0178e8f599d81e88b1857e07cf634df4e5a29d', 'size': '13949', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'commons/buildtools/pmd/docs/apidocs/net/sourceforge/pmd/util/TypeMap.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '16315580'}, {'name': 'Batchfile', 'bytes': '15678'}, {'name': 'C', 'bytes': '26042'}, {'name': 'CSS', 'bytes': '846559'}, {'name': 'Groovy', 'bytes': '93743'}, {'name': 'HTML', 'bytes': '36583222'}, {'name': 'Java', 'bytes': '33127586'}, {'name': 'JavaScript', 'bytes': '2030589'}, {'name': 'Nginx', 'bytes': '3934'}, {'name': 'Perl', 'bytes': '330290'}, {'name': 'Python', 'bytes': '54288'}, {'name': 'Ruby', 'bytes': '5133'}, {'name': 'Shell', 'bytes': '2482631'}, {'name': 'XSLT', 'bytes': '978664'}]}
package edu.umass.cs.ciir.waltz.phrase; import edu.umass.cs.ciir.waltz.postings.extents.Span; import edu.umass.cs.ciir.waltz.postings.positions.PositionsList; import edu.umass.cs.ciir.waltz.postings.positions.SimplePositionsList; import org.junit.Assert; import org.junit.Test; import java.util.Arrays; import static org.junit.Assert.assertEquals; public class UnorderedWindowTest { @Test public void testCountPositions() throws Exception { PositionsList a = SimplePositionsList.of(1, 7, 11, 15, 30, 100); PositionsList b = SimplePositionsList.of( 6, 14, 99); Assert.assertEquals(4, UnorderedWindow.countPositions(Arrays.asList(a, b), 4)); Assert.assertEquals(Arrays.asList( Span.of(6, 8), Span.of(11, 15), Span.of(14, 16), Span.of(99, 101) ), UnorderedWindow.calculateSpans( Arrays.asList(a.getSpanIterator(), b.getSpanIterator()), 4)); } }
{'content_hash': '94b1c59f27dd7f36d4f6989e8621cb5c', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 83, 'avg_line_length': 31.866666666666667, 'alnum_prop': 0.6872384937238494, 'repo_name': 'jjfiv/waltz', 'id': '3aef7a4776a40b781f6845c309728b3b1ec87613', 'size': '956', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'base/src/test/java/edu/umass/cs/ciir/waltz/phrase/UnorderedWindowTest.java', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Java', 'bytes': '442735'}]}
export class TestData { public static FLYER_LAYOUTS: any[] = [ { 'name': 'Flyer' }, { 'name': 'Doorhanger' }, <<<<<<< HEAD { 'name': 'Postcard' } ======= <<<<<<< HEAD { 'name': 'Postcard' } ======= { 'name': 'Posted' } >>>>>>> e1cced73d3485e668476c69e2647e07f39757310 >>>>>>> 84256d1d8f10d470bc10ebbbfb1a8e094fe53f33 ] public static SIDEBAR_ELEMENTS: any[] = [ { 'name': 'Still', 'class': 'drp-flyer-element drp_stills ui-draggable ui-draggable-handle', 'icon': 'photo' }, { 'name': 'Text', 'class': 'drp-flyer-element drp_text ui-draggable ui-draggable-handle', 'icon': 'title' }, { 'name': 'Textarea', 'class': 'drp-flyer-element drp_textarea ui-draggable ui-draggable-handle', 'icon': 'text_fields' }, { 'name': 'Static', 'class': 'drp-flyer-element drp_static ui-draggable ui-draggable-handle', 'icon': 'crop_square' }, { 'name': 'Agent Picture', 'class': 'drp-flyer-element drp_agent_pic ui-draggable ui-draggable-handle', 'icon': 'portrait' }, { 'name': 'Logo', 'class': 'drp-flyer-element drp_logo ui-draggable ui-draggable-handle', 'icon': 'wallpaper' }, { 'name': 'Realtor', 'class': 'drp-flyer-element drp_realtor ui-draggable ui-draggable-handle', 'icon': 'card_travel' }, { 'name': 'Eho', 'class': 'drp-flyer-element drp_eho ui-draggable ui-draggable-handle', 'icon': 'home' }, { 'name': 'QRCode', 'class': 'drp-flyer-element drp_qr ui-draggable ui-draggable-handle', 'icon': 'line_style' }, { 'name': 'Bullet', 'class': 'drp-flyer-element drp_bullet ui-draggable ui-draggable-handle', 'icon': 'brightness_1' } ] public static LOREM_IPSUM = 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum'; }
{'content_hash': 'e0c87853e8df4daff99fb3104b5bb97b', 'timestamp': '', 'source': 'github', 'line_count': 31, 'max_line_length': 606, 'avg_line_length': 72.29032258064517, 'alnum_prop': 0.6711289602855868, 'repo_name': 'circplepix-demoapps/flyer-builder', 'id': '579a29b158d69a54807d1f131612a5fbefc276c0', 'size': '2241', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'flyerbuilder/src/app/helpers/testData.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '18287'}, {'name': 'HTML', 'bytes': '12908'}, {'name': 'JavaScript', 'bytes': '369478'}, {'name': 'TypeScript', 'bytes': '820779'}]}
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <title>Digital Land Charges</title> <head> <link rel="stylesheet" href="/public/stylesheets/styles.css"> <link href='https://fonts.googleapis.com/css?family=Roboto:300,400,700' rel='stylesheet' type='text/css'> </head> <body> {{>includes/header}} <div id="content"> <div class="spacer_10"></div> <h1 class="title_36">Bankruptcy registration</h1> <div class="spacer_10"></div> <div class="text_16_gray"> <a href="br_step1" class="link_16 no_link_style">1. Input court details</a> &nbsp;&nbsp; <a href="br_step2" class="link_16 no_link_style">2. Input debtor details</a> &nbsp;&nbsp; <span class="text_16_bold">3. Check and verify details</span> &nbsp;&nbsp; 4. Key number </div> <div class="spacer_30"></div> <div class="grid-row"> <div class="column-form"> <table class="review_table"> <tr> <th colspan="2" class="table_text_black"><span class="text_19_gray">Re-key debtor details</span></th> <th colspan="1" class="table_text_black link_16_right"> <a class="link_16_right" href="br_step2_edit">Change</a> </th> </tr> <tr> <td width="50%"><span class="text_review_table_bold">Forename</span></td> <td width="50%"><input class="form_textfield_review" type="text" id="forename" onkeyup="checkForename()" autofocus></td> </tr> <tr> <td colspan="1"><span class="text_review_table_bold">Surname</span></td> <td colspan="2"><input class="form_textfield_review" type="text" id="surname" value="Jones"></td> </tr> <tr> <td colspan="1"><span class="text_review_table_bold">Occupation</span></td> <td colspan="2"><span class="text_review_table">Gardener</span></td> </tr> <tr> <td colspan="1" valign="top"><span class="text_review_table_bold">Address</span></td> <td colspan="2"><span class="text_review_table">123 New Street<br>Middlebrook<br>Winchester</span></td> </tr> <tr> <td colspan="1"><span class="text_review_table_bold">County</span></td> <td colspan="2"><span class="text_review_table">Hampshire</span></td> </tr> <tr> <td colspan="1"><span class="text_review_table_bold">Postcode</span></td> <td colspan="2"><span class="text_review_table">SO14 1AA</span></td> </tr> </table> <div class="spacer_30"></div> <table class="review_table"> <tr> <th colspan="2" class="table_text_black"><span class="text_19_gray">Particulars of court</span></th> <th colspan="1" class="table_text_black link_16_right"> <a class="link_16_right" href="br_step1_edit">Change</a> </th> </tr> <tr> <td width="50%"><span class="text_review_table_bold">Court name</span></td> <td width="50%"><input class="form_textfield_review" type="text" id="court" style="width: 200px" value="County Court at Portsmouth"></td> </tr> <tr> <td colspan="1"><span class="text_review_table_bold">Court reference no.</span></td> <td colspan="2"><span class="text_review_table">998 of 2015</span></td> </tr> <tr> <td colspan="1"><span class="text_review_table_bold">Year</span></td> <td colspan="2"><span class="text_review_table">2015</span></td> </tr> </table> <div class="spacer_30"></div> <div> <table> <tr> <td width="50%" class="no-line"> <a href="br_step4"><input type="button" id="btn" value="Continue" class="form_button" disabled></a> </td> <!-- </td> <td width="50%" class="custom_3"> <a href="#" class="link_16">Reject application</a> </td> --> </tr> </table> </div> </div> <!-- ///////////////////////////////// Script for page 1 in two columns ///////////////////////////////// --> <!-- ///////////////////////////////// Script for page 1 in two columns ///////////////////////////////// --> <div id="page1"> <div id="zoomIn"> <div class="column-scan"> <div> <table> <tr> <td class="magnify_glass"> <a href="javascript:show('zoomOut')"><img src="../../../../../public/images/MGlass_1.png" alt="Zoom in"></a> </td> <td class="pagination_scanned_pages custom_2"> <span>Page 1 of 2 &nbsp; <a class="link_14" href="javascript:show('page2')">Next</a></span> </td> </tr> </table> </div> <a href="javascript:show('zoomOut')"> <img class="img_resize_big" src="../../../../../public/images/WOB.jpg" alt="WOB document"> </a> </div> <div class="column-scan-small"> <div class="spacer_30"></div> <div class="spacer_5"></div> <img class="img_resize_small_selected" src="../../../../../public/images/WOB.jpg" alt="WOB document"> <div class="spacer_10"></div> <div> <img onclick="show('page2');" class="img_resize_small" src="../../../../../public/images/WOB_page2.jpg" alt="WOB document"> </div> </div> </div> <div id="zoomOut"> <div class="column-scan"> <div> <table> <tr> <td class="magnify_glass"> <a href="javascript:show('zoomIn')"><img src="../../../../../public/images/MGlass_2.png" alt="Zoom 0ut"></a> </td> <td class="pagination_scanned_pages custom_2"> <span>Page 1 of 2 &nbsp; <a class="link_14" href="javascript:show('page2')">Next</a></span> </td> </tr> </table> </div> <a href="javascript:show('zoomIn')"> <img class="img_resize_big_magnified" src="../../../../../public/images/WOB1zoom.jpg" alt="WOB document"> </a> </div> <div class="column-scan-small"> <div class="spacer_30"></div> <div class="spacer_5"></div> <div style="position:relative"> <img class="img_resize_small_selected" src="../../../../../public/images/WOB.jpg" alt="WOB document"> <div class="selected_area_1"></div> </div> <div class="spacer_10"></div> <div > <img onclick="show('page2');" class="img_resize_small" src="../../../../../public/images/WOB_page2.jpg" alt="WOB document"> </div> </div> </div> </div> <!-- ///////////////////////////////// End of script for page 1 in two columns ///////////////////////////////// --> <!-- ///////////////////////////////// Script for page 2 in two columns ///////////////////////////////// --> <div id="page2"> <div id="zoomInp2"> <div class="column-scan"> <div> <table> <tr> <td class="magnify_glass"> <a href="javascript:show('zoomOut')"><img src="../../../../../public/images/MGlass_1.png" alt="Zoom in"></a> </td> <td class="pagination_scanned_pages custom_2"> <span>Page 2 of 2 &nbsp; <a class="link_14" href="javascript:show('page1')">Previous</a></span> </td> </tr> </table> </div> <a href="javascript:show('zoomOut')"> <img class="img_resize_big" src="../../../../../public/images/WOB_page2.jpg" alt="WOB document"> </a> </div> <div class="column-scan-small"> <div class="spacer_30"></div> <div class="spacer_5"></div> <img onclick="show('page1');" class="img_resize_small" src="../../../../../public/images/WOB.jpg" alt="WOB document"> <div class="spacer_10"></div> <div > <img class="img_resize_small_selected" src="../../../../../public/images/WOB_page2.jpg" alt="WOB document"> </div> </div> </div> <div id="zoomOutp2"> <div class="column-scan"> <div> <table> <tr> <td class="magnify_glass"> <a href="javascript:show('zoomIn')"><img src="../../../../../public/images/MGlass_2.png" alt="Zoom 0ut"></a> </td> <td class="pagination_scanned_pages custom_2"> <span>Page 2 of 2 &nbsp; <a class="link_14" href="javascript:show('page1')">Previous</a></span> </td> </tr> </table> </div> <a href="javascript:show('zoomIn')"> <img class="img_resize_big_magnified" src="../../../../../public/images/WOB_page2.jpg" alt="WOB document"> </a> </div> <div class="column-scan-small"> <div class="spacer_30"></div> <div class="spacer_5"></div> <img onclick="show('page1');" class="img_resize_small" src="../../../../../public/images/WOB.jpg" alt="WOB document"> <div class="spacer_10"></div> <div style="position:relative"> <img class="img_resize_small_selected" src="../../../../../public/images/WOB_page2.jpg" alt="WOB document"> <div class="selected_area_10"></div> </div> </div> </div> </div> <!-- ///////////////////////////////// End of script for page 2 in two columns ///////////////////////////////// --> </div> </div> {{>includes/footer}} </body> <script> function checkForename() { var checked = (document.getElementById("forename").value != ""); if (checked) { document.getElementById('btn').disabled = false; } else { document.getElementById('btn').disabled = true; } } </script> <script> function show(column) { if (column == 'zoomIn'){ document.getElementById("zoomIn").style.display = 'block'; document.getElementById("zoomOut").style.display = 'none'; document.getElementById("zoomInp2").style.display = 'block'; document.getElementById("zoomOutp2").style.display = 'none'; } else if (column == 'zoomOut'){ document.getElementById("zoomOut").style.display = 'block'; document.getElementById("zoomIn").style.display = 'none'; document.getElementById("zoomOutp2").style.display = 'block'; document.getElementById("zoomInp2").style.display = 'none'; } else if (column == 'page1'){ document.getElementById("page1").style.display = 'block'; document.getElementById("page2").style.display = 'none'; show('zoomIn'); } else if (column == 'page2'){ document.getElementById("page2").style.display = 'block'; document.getElementById("page1").style.display = 'none'; show('zoomIn'); } } document.getElementById("zoomOut").style.display = 'none'; document.getElementById("page2").style.display = 'none'; </script> </html>
{'content_hash': '76f18a24e8accfb5fdea51ba393bc189', 'timestamp': '', 'source': 'github', 'line_count': 325, 'max_line_length': 142, 'avg_line_length': 31.61846153846154, 'alnum_prop': 0.5521603736862593, 'repo_name': 'LandRegistry/lc-prototype', 'id': '62fcb81a53a1adb097ede8d82014f31e770e941b', 'size': '10276', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'app/views/projects/digital_land_charges/beta/sprint5v2/br_step3_pre-complete.html', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '178796'}, {'name': 'HTML', 'bytes': '13266475'}, {'name': 'JavaScript', 'bytes': '83794'}, {'name': 'Ruby', 'bytes': '299'}]}
package org.apache.camel.impl.engine; import java.time.Duration; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.TreeSet; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; import org.apache.camel.CamelContext; import org.apache.camel.ExtendedStartupListener; import org.apache.camel.FailedToStartRouteException; import org.apache.camel.NamedNode; import org.apache.camel.NonManagedService; import org.apache.camel.Route; import org.apache.camel.RuntimeCamelException; import org.apache.camel.ServiceStatus; import org.apache.camel.StartupSummaryLevel; import org.apache.camel.spi.HasId; import org.apache.camel.spi.RouteController; import org.apache.camel.spi.RouteError; import org.apache.camel.spi.RoutePolicy; import org.apache.camel.spi.RoutePolicyFactory; import org.apache.camel.spi.SupervisingRouteController; import org.apache.camel.support.PatternHelper; import org.apache.camel.support.RoutePolicySupport; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.URISupport; import org.apache.camel.util.backoff.BackOff; import org.apache.camel.util.backoff.BackOffTimer; import org.apache.camel.util.function.ThrowingConsumer; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * A supervising capable {@link RouteController} that delays the startup of the routes after the camel context startup * and takes control of starting the routes in a safe manner. This controller is able to retry starting failing routes, * and have various options to configure settings for backoff between restarting routes. * * @see DefaultRouteController */ public class DefaultSupervisingRouteController extends DefaultRouteController implements SupervisingRouteController { private static final Logger LOG = LoggerFactory.getLogger(DefaultSupervisingRouteController.class); private final Object lock; private final AtomicBoolean contextStarted; private final AtomicInteger routeCount; private final Set<RouteHolder> routes; private final Set<String> nonSupervisedRoutes; private final RouteManager routeManager; private volatile CamelContextStartupListener listener; private volatile BackOffTimer timer; private volatile ScheduledExecutorService executorService; private volatile BackOff backOff; private String includeRoutes; private String excludeRoutes; private int threadPoolSize = 1; private long initialDelay; private long backOffDelay = 2000; private long backOffMaxDelay; private long backOffMaxElapsedTime; private long backOffMaxAttempts; private double backOffMultiplier = 1.0d; private boolean unhealthyOnExhausted; public DefaultSupervisingRouteController() { this.lock = new Object(); this.contextStarted = new AtomicBoolean(); this.routeCount = new AtomicInteger(); this.routes = new TreeSet<>(); this.nonSupervisedRoutes = new HashSet<>(); this.routeManager = new RouteManager(); } // ********************************* // Properties // ********************************* public String getIncludeRoutes() { return includeRoutes; } public void setIncludeRoutes(String includeRoutes) { this.includeRoutes = includeRoutes; } public String getExcludeRoutes() { return excludeRoutes; } public void setExcludeRoutes(String excludeRoutes) { this.excludeRoutes = excludeRoutes; } public int getThreadPoolSize() { return threadPoolSize; } public void setThreadPoolSize(int threadPoolSize) { this.threadPoolSize = threadPoolSize; } public long getInitialDelay() { return initialDelay; } public void setInitialDelay(long initialDelay) { this.initialDelay = initialDelay; } public long getBackOffDelay() { return backOffDelay; } public void setBackOffDelay(long backOffDelay) { this.backOffDelay = backOffDelay; } public long getBackOffMaxDelay() { return backOffMaxDelay; } public void setBackOffMaxDelay(long backOffMaxDelay) { this.backOffMaxDelay = backOffMaxDelay; } public long getBackOffMaxElapsedTime() { return backOffMaxElapsedTime; } public void setBackOffMaxElapsedTime(long backOffMaxElapsedTime) { this.backOffMaxElapsedTime = backOffMaxElapsedTime; } public long getBackOffMaxAttempts() { return backOffMaxAttempts; } public void setBackOffMaxAttempts(long backOffMaxAttempts) { this.backOffMaxAttempts = backOffMaxAttempts; } public double getBackOffMultiplier() { return backOffMultiplier; } public void setBackOffMultiplier(double backOffMultiplier) { this.backOffMultiplier = backOffMultiplier; } public boolean isUnhealthyOnExhausted() { return unhealthyOnExhausted; } public void setUnhealthyOnExhausted(boolean unhealthyOnExhausted) { this.unhealthyOnExhausted = unhealthyOnExhausted; } protected BackOff getBackOff(String id) { // currently all routes use the same backoff return backOff; } // ********************************* // Lifecycle // ********************************* @Override protected void doInit() throws Exception { this.listener = new CamelContextStartupListener(); // prevent routes from automatic being started by default CamelContext context = getCamelContext(); context.setAutoStartup(false); // use route policy to supervise the routes context.addRoutePolicyFactory(new ManagedRoutePolicyFactory()); // use startup listener to hook into camel context to let this begin supervising routes after context is started context.addStartupListener(this.listener); } @Override protected void doStart() throws Exception { this.backOff = new BackOff( Duration.ofMillis(backOffDelay), backOffMaxDelay > 0 ? Duration.ofMillis(backOffMaxDelay) : null, backOffMaxElapsedTime > 0 ? Duration.ofMillis(backOffMaxElapsedTime) : null, backOffMaxAttempts > 0 ? backOffMaxAttempts : Long.MAX_VALUE, backOffMultiplier); CamelContext context = getCamelContext(); if (threadPoolSize == 1) { executorService = context.getExecutorServiceManager().newSingleThreadScheduledExecutor(this, "SupervisingRouteController"); } else { executorService = context.getExecutorServiceManager().newScheduledThreadPool(this, "SupervisingRouteController", threadPoolSize); } timer = new BackOffTimer(executorService); } @Override protected void doStop() throws Exception { if (getCamelContext() != null && executorService != null) { getCamelContext().getExecutorServiceManager().shutdown(executorService); executorService = null; timer = null; } } // ********************************* // Route management // ********************************* @Override public void startRoute(String routeId) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. super.startRoute(routeId); } else { doStartRoute(route.get(), true, r -> super.startRoute(routeId)); } } @Override public void stopRoute(String routeId) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. super.stopRoute(routeId); } else { doStopRoute(route.get(), true, r -> super.stopRoute(routeId)); } } @Override public void stopRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. super.stopRoute(routeId, timeout, timeUnit); } else { doStopRoute(route.get(), true, r -> super.stopRoute(r.getId(), timeout, timeUnit)); } } @Override public boolean stopRoute(String routeId, long timeout, TimeUnit timeUnit, boolean abortAfterTimeout) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. return super.stopRoute(routeId, timeout, timeUnit, abortAfterTimeout); } else { final AtomicBoolean result = new AtomicBoolean(); doStopRoute(route.get(), true, r -> result.set(super.stopRoute(r.getId(), timeout, timeUnit, abortAfterTimeout))); return result.get(); } } @Override public void suspendRoute(String routeId) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. super.suspendRoute(routeId); } else { doStopRoute(route.get(), true, r -> super.suspendRoute(r.getId())); } } @Override public void suspendRoute(String routeId, long timeout, TimeUnit timeUnit) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. super.suspendRoute(routeId, timeout, timeUnit); } else { doStopRoute(route.get(), true, r -> super.suspendRoute(r.getId(), timeout, timeUnit)); } } @Override public void resumeRoute(String routeId) throws Exception { final Optional<RouteHolder> route = routes.stream().filter(r -> r.getId().equals(routeId)).findFirst(); if (!route.isPresent()) { // This route is unknown to this controller, apply default behaviour // from super class. super.resumeRoute(routeId); } else { doStartRoute(route.get(), true, r -> super.startRoute(routeId)); } } @Override public Collection<Route> getControlledRoutes() { return routes.stream() .map(RouteHolder::get) .collect(Collectors.toList()); } @Override public Collection<Route> getRestartingRoutes() { return routeManager.routes.keySet().stream() .map(RouteHolder::get) .collect(Collectors.toList()); } @Override public Collection<Route> getExhaustedRoutes() { return routeManager.exhausted.keySet().stream() .map(RouteHolder::get) .collect(Collectors.toList()); } @Override public Set<String> getNonControlledRouteIds() { return Collections.unmodifiableSet(nonSupervisedRoutes); } @Override public BackOffTimer.Task getRestartingRouteState(String routeId) { return routeManager.getBackOffContext(routeId).orElse(null); } @Override public Throwable getRestartException(String routeId) { return routeManager.exceptions.get(routeId); } // ********************************* // Helpers // ********************************* private void doStopRoute(RouteHolder route, boolean checker, ThrowingConsumer<RouteHolder, Exception> consumer) throws Exception { synchronized (lock) { if (checker) { // remove it from checked routes so the route don't get started // by the routes manager task as a manual operation on the routes // indicates that the route is then managed manually routeManager.release(route); } LOG.debug("Route {} has been requested to stop", route.getId()); // Mark the route as un-managed route.get().setRouteController(null); consumer.accept(route); } } private void doStartRoute(RouteHolder route, boolean checker, ThrowingConsumer<RouteHolder, Exception> consumer) throws Exception { synchronized (lock) { // If a manual start is triggered, then the controller should take // care that the route is started route.get().setRouteController(this); try { if (checker) { // remove it from checked routes as a manual start may trigger // a new back off task if start fails routeManager.release(route); } consumer.accept(route); } catch (Exception e) { if (checker) { // if start fails the route is moved to controller supervision // so its get (eventually) restarted routeManager.start(route); } throw e; } } } private void startNonSupervisedRoutes() throws Exception { if (!isRunAllowed()) { return; } final List<String> routeList; synchronized (lock) { routeList = routes.stream() .filter(r -> r.getStatus() == ServiceStatus.Stopped) .filter(r -> !isSupervised(r.route)) .map(RouteHolder::getId) .collect(Collectors.toList()); } for (String route : routeList) { try { // let non supervising controller start the route by calling super LOG.debug("Starting non-supervised route {}", route); super.startRoute(route); } catch (Exception e) { throw new FailedToStartRouteException(route, e.getMessage(), e); } } } private void startSupervisedRoutes() { if (!isRunAllowed()) { return; } final List<String> routeList; synchronized (lock) { routeList = routes.stream() .filter(r -> r.getStatus() == ServiceStatus.Stopped) .filter(r -> isSupervised(r.route)) .map(RouteHolder::getId) .collect(Collectors.toList()); } LOG.debug("Starting {} supervised routes", routeList.size()); for (String route : routeList) { try { startRoute(route); } catch (Exception e) { // ignored, exception handled by startRoute } } if (getCamelContext().getStartupSummaryLevel() != StartupSummaryLevel.Off && getCamelContext().getStartupSummaryLevel() != StartupSummaryLevel.Oneline) { // log after first round of attempts logRouteStartupSummary(); } } private void logRouteStartupSummary() { int started = 0; int total = 0; int restarting = 0; int exhausted = 0; List<String> lines = new ArrayList<>(); List<String> configs = new ArrayList<>(); for (RouteHolder route : routes) { String id = route.getId(); String status = getRouteStatus(id).name(); if (ServiceStatus.Started.name().equals(status)) { // only include started routes as we pickup restarting/exhausted in the following total++; started++; // use basic endpoint uri to not log verbose details or potential sensitive data String uri = route.get().getEndpoint().getEndpointBaseUri(); uri = URISupport.sanitizeUri(uri); lines.add(String.format(" %s %s (%s)", status, id, uri)); String cid = route.get().getConfigurationId(); if (cid != null) { configs.add(String.format(" %s (%s)", id, cid)); } } } for (RouteHolder route : routeManager.routes.keySet()) { total++; restarting++; String id = route.getId(); String status = "Restarting"; // use basic endpoint uri to not log verbose details or potential sensitive data String uri = route.get().getEndpoint().getEndpointBaseUri(); uri = URISupport.sanitizeUri(uri); BackOff backOff = getBackOff(id); lines.add(String.format(" %s %s (%s) with %s", status, id, uri, backOff)); String cid = route.get().getConfigurationId(); if (cid != null) { configs.add(String.format(" %s (%s)", id, cid)); } } for (RouteHolder route : routeManager.exhausted.keySet()) { total++; exhausted++; String id = route.getId(); String status = "Exhausted"; // use basic endpoint uri to not log verbose details or potential sensitive data String uri = route.get().getEndpoint().getEndpointBaseUri(); uri = URISupport.sanitizeUri(uri); lines.add(String.format(" %s %s (%s)", status, id, uri)); String cid = route.get().getConfigurationId(); if (cid != null) { configs.add(String.format(" %s (%s)", id, cid)); } } if (restarting == 0 && exhausted == 0) { LOG.info("Routes startup (total:{} started:{})", total, started); } else { LOG.info("Routes startup (total:{} started:{} restarting:{} exhausted:{})", total, started, restarting, exhausted); } if (getCamelContext().getStartupSummaryLevel() == StartupSummaryLevel.Default || getCamelContext().getStartupSummaryLevel() == StartupSummaryLevel.Verbose) { for (String line : lines) { LOG.info(line); } if (getCamelContext().getStartupSummaryLevel() == StartupSummaryLevel.Verbose) { LOG.info("Routes configuration:"); for (String line : configs) { LOG.info(line); } } } } private boolean isSupervised(Route route) { return !nonSupervisedRoutes.contains(route.getId()); } // ********************************* // RouteChecker // ********************************* private class RouteManager { private final Logger logger; private final ConcurrentMap<RouteHolder, BackOffTimer.Task> routes; private final ConcurrentMap<RouteHolder, BackOffTimer.Task> exhausted; private final ConcurrentMap<String, Throwable> exceptions; RouteManager() { this.logger = LoggerFactory.getLogger(RouteManager.class); this.routes = new ConcurrentHashMap<>(); this.exhausted = new ConcurrentHashMap<>(); this.exceptions = new ConcurrentHashMap<>(); } void start(RouteHolder route) { route.get().setRouteController(DefaultSupervisingRouteController.this); routes.computeIfAbsent( route, r -> { BackOff backOff = getBackOff(r.getId()); logger.debug("Supervising route: {} with back-off: {}", r.getId(), backOff); BackOffTimer.Task task = timer.schedule(backOff, context -> { final BackOffTimer.Task state = getBackOffContext(r.getId()).orElse(null); long attempt = state != null ? state.getCurrentAttempts() : 0; try { logger.info("Restarting route: {} attempt: {}", r.getId(), attempt); doStartRoute(r, false, rx -> DefaultSupervisingRouteController.super.startRoute(rx.getId())); logger.info("Route: {} started after {} attempts", r.getId(), attempt); return false; } catch (Exception e) { exceptions.put(r.getId(), e); String cause = e.getClass().getName() + ": " + e.getMessage(); logger.info("Failed restarting route: {} attempt: {} due: {} (stacktrace in debug log level)", r.getId(), attempt, cause); logger.debug(" Error restarting route caused by: " + e.getMessage(), e); return true; } }); task.whenComplete((backOffTask, throwable) -> { if (backOffTask == null || backOffTask.getStatus() != BackOffTimer.Task.Status.Active) { // This indicates that the task has been cancelled // or that back-off retry is exhausted thus if the // route is not started it is moved out of the // supervisor control. synchronized (lock) { final ServiceStatus status = route.getStatus(); final boolean stopped = status.isStopped() || status.isStopping(); if (backOffTask != null && backOffTask.getStatus() == BackOffTimer.Task.Status.Exhausted && stopped) { LOG.warn( "Restarting route: {} is exhausted after {} attempts. No more attempts will be made" + " and the route is no longer supervised by this route controller and remains as stopped.", route.getId(), backOffTask.getCurrentAttempts() - 1); r.get().setRouteController(null); // remember exhausted routes routeManager.exhausted.put(r, task); if (unhealthyOnExhausted) { // store as last error on route as it was exhausted Throwable t = getRestartException(route.getId()); if (t != null) { DefaultRouteError.set(getCamelContext(), r.getId(), RouteError.Phase.START, t, true); } } } } } routes.remove(r); }); return task; }); } boolean release(RouteHolder route) { exceptions.remove(route.getId()); BackOffTimer.Task task = routes.remove(route); if (task != null) { LOG.debug("Cancelling restart task for route: {}", route.getId()); task.cancel(); } return task != null; } public Optional<BackOffTimer.Task> getBackOffContext(String id) { Optional<BackOffTimer.Task> answer = routes.entrySet().stream() .filter(e -> ObjectHelper.equal(e.getKey().getId(), id)) .findFirst() .map(Map.Entry::getValue); if (!answer.isPresent()) { answer = exhausted.entrySet().stream() .filter(e -> ObjectHelper.equal(e.getKey().getId(), id)) .findFirst() .map(Map.Entry::getValue); } return answer; } } // ********************************* // // ********************************* private static class RouteHolder implements HasId, Comparable<RouteHolder> { private final int order; private final Route route; RouteHolder(Route route, int order) { this.route = route; this.order = order; } @Override public String getId() { return this.route.getId(); } public Route get() { return this.route; } public ServiceStatus getStatus() { return route.getCamelContext().getRouteController().getRouteStatus(getId()); } int getInitializationOrder() { return order; } public int getStartupOrder() { Integer order = route.getStartupOrder(); if (order == null) { order = Integer.MAX_VALUE; } return order; } @Override public int compareTo(RouteHolder o) { int answer = Integer.compare(getStartupOrder(), o.getStartupOrder()); if (answer == 0) { answer = Integer.compare(getInitializationOrder(), o.getInitializationOrder()); } return answer; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } return this.route.equals(((RouteHolder) o).route); } @Override public int hashCode() { return route.hashCode(); } } // ********************************* // Policies // ********************************* private class ManagedRoutePolicyFactory implements RoutePolicyFactory { private final RoutePolicy policy = new ManagedRoutePolicy(); @Override public RoutePolicy createRoutePolicy(CamelContext camelContext, String routeId, NamedNode route) { return policy; } } private class ManagedRoutePolicy extends RoutePolicySupport implements NonManagedService { // we dont want this policy to be registered in JMX private void startRoute(RouteHolder holder) { try { DefaultSupervisingRouteController.this.doStartRoute( holder, true, r -> DefaultSupervisingRouteController.super.startRoute(r.getId())); } catch (Exception e) { throw new RuntimeCamelException(e); } } @Override public void onInit(Route route) { if (!route.isAutoStartup()) { LOG.info("Route: {} will not be supervised (Reason: has explicit auto-startup flag set to false)", route.getId()); return; } // exclude takes precedence if (excludeRoutes != null) { for (String part : excludeRoutes.split(",")) { String id = route.getRouteId(); String uri = route.getEndpoint().getEndpointUri(); boolean exclude = PatternHelper.matchPattern(id, part) || PatternHelper.matchPattern(uri, part); if (exclude) { LOG.debug("Route: {} excluded from being supervised", route.getId()); RouteHolder holder = new RouteHolder(route, routeCount.incrementAndGet()); if (routes.add(holder)) { nonSupervisedRoutes.add(route.getId()); holder.get().setRouteController(DefaultSupervisingRouteController.this); // this route should be started holder.get().setAutoStartup(true); } return; } } } if (includeRoutes != null) { boolean include = false; for (String part : includeRoutes.split(",")) { String id = route.getRouteId(); String uri = route.getEndpoint().getEndpointUri(); include = PatternHelper.matchPattern(id, part) || PatternHelper.matchPattern(uri, part); if (include) { break; } } if (!include) { LOG.debug("Route: {} excluded from being supervised", route.getId()); RouteHolder holder = new RouteHolder(route, routeCount.incrementAndGet()); if (routes.add(holder)) { nonSupervisedRoutes.add(route.getId()); holder.get().setRouteController(DefaultSupervisingRouteController.this); // this route should be started holder.get().setAutoStartup(true); } return; } } RouteHolder holder = new RouteHolder(route, routeCount.incrementAndGet()); if (routes.add(holder)) { holder.get().setRouteController(DefaultSupervisingRouteController.this); holder.get().setAutoStartup(false); if (contextStarted.get()) { LOG.debug("Context is already started: attempt to start route {}", route.getId()); // Eventually delay the startup of the route a later time if (initialDelay > 0) { LOG.debug("Route {} will be started in {} millis", holder.getId(), initialDelay); executorService.schedule(() -> startRoute(holder), initialDelay, TimeUnit.MILLISECONDS); } else { startRoute(holder); } } else { LOG.debug("CamelContext is not yet started. Deferring staring route: {}", holder.getId()); } } } @Override public void onRemove(Route route) { synchronized (lock) { routes.removeIf( r -> ObjectHelper.equal(r.get(), route) || ObjectHelper.equal(r.getId(), route.getId())); } } } private class CamelContextStartupListener implements ExtendedStartupListener { @Override public void onCamelContextStarting(CamelContext context, boolean alreadyStarted) throws Exception { // noop } @Override public void onCamelContextStarted(CamelContext context, boolean alreadyStarted) throws Exception { // noop } @Override public void onCamelContextFullyStarted(CamelContext context, boolean alreadyStarted) throws Exception { if (alreadyStarted) { // Invoke it only if the context was already started as this // method is not invoked at last event as documented but after // routes warm-up so this is useful for routes deployed after // the camel context has been started-up. For standard routes // configuration the notification of the camel context started // is provided by EventNotifier. // // We should check why this callback is not invoked at latest // stage, or maybe rename it as it is misleading and provide a // better alternative for intercept camel events. onCamelContextStarted(); } } private void onCamelContextStarted() throws Exception { // Start managing the routes only when the camel context is started // so start/stop of managed routes do not clash with CamelContext // startup if (contextStarted.compareAndSet(false, true)) { // start non supervised routes first as if they fail then // camel context fails to start which is the behaviour of non-supervised routes startNonSupervisedRoutes(); // Eventually delay the startup of the routes a later time if (initialDelay > 0) { LOG.debug("Supervised routes will be started in {} millis", initialDelay); executorService.schedule(DefaultSupervisingRouteController.this::startSupervisedRoutes, initialDelay, TimeUnit.MILLISECONDS); } else { startSupervisedRoutes(); } } } } }
{'content_hash': 'e3cf6c18556b33a07989abc283960dbe', 'timestamp': '', 'source': 'github', 'line_count': 878, 'max_line_length': 141, 'avg_line_length': 38.92027334851936, 'alnum_prop': 0.5582348121268875, 'repo_name': 'pax95/camel', 'id': 'a70ace45fbb3acc1c1ac5db3371f80c78eda2ada', 'size': '34974', 'binary': False, 'copies': '1', 'ref': 'refs/heads/CAMEL-17322', 'path': 'core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultSupervisingRouteController.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Apex', 'bytes': '6519'}, {'name': 'Batchfile', 'bytes': '1518'}, {'name': 'CSS', 'bytes': '30373'}, {'name': 'Elm', 'bytes': '10852'}, {'name': 'FreeMarker', 'bytes': '11410'}, {'name': 'Groovy', 'bytes': '54390'}, {'name': 'HTML', 'bytes': '190919'}, {'name': 'Java', 'bytes': '68575773'}, {'name': 'JavaScript', 'bytes': '90399'}, {'name': 'Makefile', 'bytes': '513'}, {'name': 'PLSQL', 'bytes': '1419'}, {'name': 'Python', 'bytes': '36'}, {'name': 'Ruby', 'bytes': '4802'}, {'name': 'Scala', 'bytes': '323702'}, {'name': 'Shell', 'bytes': '17107'}, {'name': 'Tcl', 'bytes': '4974'}, {'name': 'Thrift', 'bytes': '6979'}, {'name': 'XQuery', 'bytes': '546'}, {'name': 'XSLT', 'bytes': '284638'}]}
#include <Rcpp.h> using namespace Rcpp; #include "hclust_util.h" // Hclust extensions #include "ANN_util.h" // matrixToANNpointArray #include "simple_structs.h" // edge structs #include "metrics.h" // Computes the connection radius, i.e. the linkage criterion double getConnectionRadius(double dist_ij, double radius_i, double radius_j, double alpha, const int type) { // Only admit edges with finite weight if the neighborhood radii allow // Note that RSL will always form a complete hierarchy, so returning the numerical // limits maximum isn't necessary. double R; switch(type){ // Robust Single Linkage from 2010 paper case 0: return std::max(dist_ij / alpha, std::max(radius_i, radius_j)); break; // kNN graph from Algorithm 2 from Luxburgs 2014 paper case 1: R = alpha * std::max(radius_i, radius_j); return dist_ij <= R ? R : std::numeric_limits<double>::max(); break; // mutual kNN graph from Algorithm 2 from Luxburgs 2014 paper case 2: R = alpha * std::min(radius_i, radius_j); return dist_ij <= R ? R : std::numeric_limits<double>::max(); break; default: Rcpp::stop("Not a valid neighborhood query type"); } return std::numeric_limits<double>::max(); } // // Use the dual tree boruvka approach to compute the cluster tree // List dtbRSL(const NumericMatrix& x, const NumericVector& r_k, const double alpha, const int type, SEXP metric_ptr){ // const int d = x.ncol(); // const int n = x.nrow(); // // // Copy data over to ANN point array // // ANNkd_tree* kd_treeQ, *kd_treeR; // ANNpointArray x_ann = matrixToANNpointArray(x); // // // Construct the dual tree KNN instance // Metric& metric = getMetric(metric_ptr); // const NumericMatrix& q_x, Metric& m, NumericMatrix& r_x = emptyMatrix, List config = List::create() // DTB_CT dtb_setup = DTB_CT(x, metric, emptyMatrix, alpha); // // // Construct the tree // ANNkd_tree* kd_tree = dtb_setup.ConstructTree(x_ann, x.nrow(), x.ncol(), 30, ANN_KD_SUGGEST); // // // With the tree(s) created, setup DTB-specific bounds, assign trees, etc. // dtb_setup.setup(kd_tree, kd_tree); // // // Run the dual tree boruvka algorithm (w/ augmented distance function) // List mst = dtb_setup.DTB(x); // // return mst; // } /* * Compute MST using variant of Prim's, constrained by the radius of the Balls around each x_i. * Requires several array-type or indicator variables, namely: * v_selected := array of indicators of spanning tree membership (-1 implies non-membership) * c_i := index of current (head) node (relative to r_k) * t_i := index of node to test against (relative to r_k) * d_i := index of distance from current node to test node (relative to r) */ inline double maxToNA(double x) { return x == std::numeric_limits<double>::max() ? NA_REAL : x; } // [[Rcpp::export]] NumericMatrix primsCtree(const NumericVector r, const NumericVector r_k, const int n, const double alpha, const int type){ // Set up resulting MST NumericMatrix mst = NumericMatrix(n - 1, 3); // Data structures for prims std::vector<int> v_selected = std::vector<int>(n, -1); // -1 to indicate node is not in MST std::vector<edge> fringe = std::vector<edge>(n, edge(-1, std::numeric_limits<double>::infinity())); double min = std::numeric_limits<double>::infinity(), priority = 0.0; int c_i = 0, min_id = n - 1; for (int n_edges = 0; n_edges < n - 1; n_edges++) { if (n_edges % 1000 == 0) Rcpp::checkUserInterrupt(); min = std::numeric_limits<double>::infinity(); // Reset so new edge is always chosen // Compare all the new edge weights w/ the "current best" edge weights for (int t_i = 0; t_i < n; ++t_i) { // Graph subset step: ensure both c_i and t_i have neighborhood radii at least as big as the current radius if (t_i == c_i) continue; int d_i = t_i > c_i ? INDEX_TF(n, c_i, t_i) : INDEX_TF(n, t_i, c_i); // bigger index always on the right // MST step, make sure node isn't already in the spanning tree if (v_selected[t_i] < 0) { // Generic RSL step priority = getConnectionRadius(r[d_i], r_k[c_i], r_k[t_i], alpha, type); if (priority < fringe[t_i].weight) { // using max above implicitly ensures c_i and t_i are connected // Rcout << "Updating fringe " << t_i << "w/ radii (" << r_k[c_i] << ", " << r_k[t_i] << ")" << std::endl; // Rcout << "current: " << c_i << ", to: " << t_i << std::endl; fringe[t_i].weight = priority; fringe[t_i].from = c_i; // t_i indexes the 'from' node } // An edge 'on the fringe' might be less than any of the current nodes weights if (fringe[t_i].weight < min) { min = fringe[t_i].weight, min_id = t_i; } } } // Rcout << "Adding edge: (" << min_id << ", " << c_i << ") [" << min << "]" << std::endl; mst(n_edges, _) = NumericVector::create(fringe[min_id].from+1, min_id+1, min); v_selected[c_i] = 1; c_i = min_id; } std::transform(mst.column(2).begin(), mst.column(2).end(), mst.column(2).begin(), maxToNA); return(mst); } // [[Rcpp::export]] NumericMatrix naive_clustertree(const NumericVector& dist_x, const NumericVector& r_k, const int k, const double alpha, const int type = 0) { std::string message = "naive_clustertree expects a 'dist' object."; if (!dist_x.hasAttribute("class") || as<std::string>(dist_x.attr("class")) != "dist") { stop(message); } if (!dist_x.hasAttribute("method")) { stop(message); } if (!dist_x.hasAttribute("Size")){ stop(message); } // Get sorted radii const int n = as<int>(dist_x.attr("Size")); NumericVector sorted_x = Rcpp::clone(dist_x).sort(false); NumericMatrix mst = NumericMatrix(n - 1, 3); // Get order of original; use R order function to get consistent ordering Function order = Function("order"); IntegerVector r_order = as<IntegerVector>(order(dist_x)) - 1; // Create disjoint-set data structure to track components UnionFind components = UnionFind(n); int i = 0, crow = 0; double r = 0; for (NumericVector::const_iterator dist_ij = sorted_x.begin(); dist_ij != sorted_x.end(); ++dist_ij, ++i) { // Retrieve index of x_i and x_j int x_i = INDEX_TO(i, n), x_j = INDEX_FROM(i, n, x_i); r = *dist_ij / alpha; Rcout << "Comparing: " << x_i << ", " << x_j << " (r = " << r << ")" << std::endl; if (r_k[x_i] <= r && r_k[x_j] <= r){ // if admitted Rcout << "Checking: " << x_i << "(r_k = " << r_k[x_i] << "), " << x_j << "(r_k = " << r_k[x_j] << ") against " << r << std::endl; if (components.Find(x_i) != components.Find(x_j)){ Rcout << "Connecting: " << x_i << ", " << x_j << " @r = " << r << std::endl; mst(crow++, _) = NumericVector::create(x_i, x_j, r); // Use r to index cluster tree } components.Union(x_i, x_j); } } return mst; }
{'content_hash': '3e63c212d17435aade9a37e9da0db4ab', 'timestamp': '', 'source': 'github', 'line_count': 159, 'max_line_length': 141, 'avg_line_length': 43.22012578616352, 'alnum_prop': 0.6167054714784633, 'repo_name': 'peekxc/clustertree', 'id': '358d1751759f2699cc338e2a6f40e1f549346364', 'size': '6872', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/R_clustertree.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '14297'}, {'name': 'C++', 'bytes': '276456'}, {'name': 'R', 'bytes': '34689'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': '0a14f9218e7e3113c849b5ddb4236933', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'a380a78b332a6ae4e7189fd78c1a83dc39c29360', 'size': '187', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Campanulaceae/Lobelia/Lobelia camporum/ Syn. Lobelia camporum lundiana/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
/* $NetBSD: fpgetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Neil A. Carson and Mark Brinicombe * * 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. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS 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 THE FOUNDATION OR 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. */ #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) __RCSID("$NetBSD: fpgetmask.c,v 1.4 2008/04/28 20:23:00 martin Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include <ieeefp.h> #ifdef SOFTFLOAT_FOR_GCC #include "softfloat-for-gcc.h" #endif #include "milieu.h" #include "softfloat.h" #ifdef __weak_alias __weak_alias(fpgetmask,_fpgetmask) #endif fp_except fpgetmask(void) { return float_exception_mask; }
{'content_hash': 'b3c0f3885598f93510b322f64c37d99b', 'timestamp': '', 'source': 'github', 'line_count': 55, 'max_line_length': 78, 'avg_line_length': 37.872727272727275, 'alnum_prop': 0.7253960633701392, 'repo_name': 'MattDevo/edk2', 'id': 'fe0f6236962250b95bcc36e8a65d7e68fdd17392', 'size': '2083', 'binary': False, 'copies': '4', 'ref': 'refs/heads/master', 'path': 'StdLib/LibC/Softfloat/fpgetmask.c', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Assembly', 'bytes': '4545237'}, {'name': 'Batchfile', 'bytes': '93042'}, {'name': 'C', 'bytes': '94289702'}, {'name': 'C++', 'bytes': '20170310'}, {'name': 'CSS', 'bytes': '1905'}, {'name': 'DIGITAL Command Language', 'bytes': '13695'}, {'name': 'GAP', 'bytes': '698245'}, {'name': 'GDB', 'bytes': '96'}, {'name': 'HTML', 'bytes': '472114'}, {'name': 'Lua', 'bytes': '249'}, {'name': 'Makefile', 'bytes': '231845'}, {'name': 'NSIS', 'bytes': '2229'}, {'name': 'Objective-C', 'bytes': '4147834'}, {'name': 'PHP', 'bytes': '674'}, {'name': 'PLSQL', 'bytes': '24782'}, {'name': 'Perl', 'bytes': '6218'}, {'name': 'Python', 'bytes': '27130096'}, {'name': 'R', 'bytes': '21094'}, {'name': 'Roff', 'bytes': '28192'}, {'name': 'Shell', 'bytes': '104362'}, {'name': 'SourcePawn', 'bytes': '29427'}, {'name': 'Visual Basic', 'bytes': '494'}]}
#ifndef SDK_OBJC_FRAMEWORK_NATIVE_API_VIDEO_ENCODER_FACTORY_H_ #define SDK_OBJC_FRAMEWORK_NATIVE_API_VIDEO_ENCODER_FACTORY_H_ #include <memory> #import "WebRTC/RTCVideoCodecFactory.h" #include BOSS_WEBRTC_U_api__video_codecs__video_encoder_factory_h //original-code:"api/video_codecs/video_encoder_factory.h" namespace webrtc { std::unique_ptr<VideoEncoderFactory> ObjCToNativeVideoEncoderFactory( id<RTCVideoEncoderFactory> objc_video_encoder_factory); } // namespace webrtc #endif // SDK_OBJC_FRAMEWORK_NATIVE_API_VIDEO_ENCODER_FACTORY_H_
{'content_hash': 'c9bad518e6cd2885ce6d9ab1ee95ab14', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 124, 'avg_line_length': 29.263157894736842, 'alnum_prop': 0.7823741007194245, 'repo_name': 'koobonil/Boss2D', 'id': 'fae95db807da0949b39668addb7e87b959ab204b', 'size': '964', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Boss2D/addon/webrtc-jumpingyang001_for_boss/sdk/objc/Framework/Native/api/video_encoder_factory.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '4820445'}, {'name': 'Awk', 'bytes': '4272'}, {'name': 'Batchfile', 'bytes': '89930'}, {'name': 'C', 'bytes': '119747922'}, {'name': 'C#', 'bytes': '87505'}, {'name': 'C++', 'bytes': '272329620'}, {'name': 'CMake', 'bytes': '1199656'}, {'name': 'CSS', 'bytes': '42679'}, {'name': 'Clojure', 'bytes': '1487'}, {'name': 'Cuda', 'bytes': '1651996'}, {'name': 'DIGITAL Command Language', 'bytes': '239527'}, {'name': 'Dockerfile', 'bytes': '9638'}, {'name': 'Emacs Lisp', 'bytes': '15570'}, {'name': 'Go', 'bytes': '858185'}, {'name': 'HLSL', 'bytes': '3314'}, {'name': 'HTML', 'bytes': '2958385'}, {'name': 'Java', 'bytes': '2921052'}, {'name': 'JavaScript', 'bytes': '178190'}, {'name': 'Jupyter Notebook', 'bytes': '1833654'}, {'name': 'LLVM', 'bytes': '6536'}, {'name': 'M4', 'bytes': '775724'}, {'name': 'MATLAB', 'bytes': '74606'}, {'name': 'Makefile', 'bytes': '3941551'}, {'name': 'Meson', 'bytes': '2847'}, {'name': 'Module Management System', 'bytes': '2626'}, {'name': 'NSIS', 'bytes': '4505'}, {'name': 'Objective-C', 'bytes': '4090702'}, {'name': 'Objective-C++', 'bytes': '1702390'}, {'name': 'PHP', 'bytes': '3530'}, {'name': 'Perl', 'bytes': '11096338'}, {'name': 'Perl 6', 'bytes': '11802'}, {'name': 'PowerShell', 'bytes': '38571'}, {'name': 'Python', 'bytes': '24123805'}, {'name': 'QMake', 'bytes': '18188'}, {'name': 'Roff', 'bytes': '1261269'}, {'name': 'Ruby', 'bytes': '5890'}, {'name': 'Scala', 'bytes': '5683'}, {'name': 'Shell', 'bytes': '2879948'}, {'name': 'TeX', 'bytes': '243507'}, {'name': 'TypeScript', 'bytes': '1593696'}, {'name': 'Verilog', 'bytes': '1215'}, {'name': 'Vim Script', 'bytes': '3759'}, {'name': 'Visual Basic', 'bytes': '16186'}, {'name': 'eC', 'bytes': '9705'}]}
from datetime import datetime, timedelta from django import forms from django.conf import settings from django.contrib.auth.models import User from django.db.models import Q from django.utils._os import safe_join from geoevents.core.forms import StyledModelForm from geoevents.maps.models import Map from geoevents.operations.models import Service, Event, Deployment, LessonLearned, SitRep class DeploymentForm(StyledModelForm): class Meta: exclude = ('point', 'closed') model = Deployment class NewDeploymentForm(DeploymentForm): def __init__(self, *args, **kwargs): super(NewDeploymentForm, self).__init__(*args, **kwargs) self.fields['event'].queryset = Event.objects.filter(status=1) self.fields['deployers'].queryset = User.objects.filter(is_active=True).order_by('username') class EventForm(StyledModelForm): def __init__(self, *args, **kwargs): super(EventForm, self).__init__(*args, **kwargs) self.fields['map'].initial = Map.objects.filter(title='Base Map').get() class Meta: exclude = ['point', 'slug', 'closed'] model = Event class ServiceForm(StyledModelForm): form_title = 'test' class Meta: model = Service class LessonLearnedBasicForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(LessonLearnedBasicForm, self).__init__(*args, **kwargs) self.fields['description'].label = '' self.fields['name'].label = '' class Meta: fields = (['name', 'description']) model = LessonLearned widgets = { 'description': forms.Textarea(attrs={'style': 'width:95%', 'placeholder': 'Enter the lesson learned here. '}), 'name': forms.TextInput(attrs={'style': 'width:95%', 'placeholder': 'Enter a title here. '}), } class LessonLearnedForm(StyledModelForm): def __init__(self, *args, **kwargs): super(LessonLearnedForm, self).__init__(*args, **kwargs) self.fields['event'].queryset = Event.objects.filter( Q(closed__gte=datetime.now() + timedelta(days=-90)) | Q(status=1)) ## Filter event dropdown to show events closed w/in the last 90 days and active incidents class Meta: exclude = ('closed', 'submitted_by') order = ['name'] model = LessonLearned widgets = {'due': forms.DateTimeInput(attrs={'class': 'date-pick'}), } class SitRepForm(StyledModelForm): def __init__(self, *args, **kwargs): super(SitRepForm, self).__init__(*args, **kwargs) self.fields['event'].queryset = Event.objects.filter(status=1) ## Filter event dropdown to show active events class Meta: exclude = ('date_closed') fields = ['name', 'content', 'event'] model = SitRep widgets = {'name': forms.TextInput(attrs={'placeholder': 'Title of SitRep'}), }
{'content_hash': 'c025cbf0adde2ce72038d5b35523804f', 'timestamp': '', 'source': 'github', 'line_count': 83, 'max_line_length': 119, 'avg_line_length': 34.68674698795181, 'alnum_prop': 0.6411948593261549, 'repo_name': 'ngageoint/geoevents', 'id': '205ab826d17a6a53f9b94f01dad94b0864ab51e4', 'size': '3086', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'geoevents/operations/forms.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '7006'}, {'name': 'CSS', 'bytes': '169395'}, {'name': 'JavaScript', 'bytes': '10629452'}, {'name': 'Python', 'bytes': '1589774'}, {'name': 'Shell', 'bytes': '4212'}]}
package com.google.common.collect; import static com.google.common.collect.BoundType.CLOSED; import static com.google.common.collect.BoundType.OPEN; import static com.google.common.collect.DiscreteDomains.integers; import static com.google.common.testing.SerializableTester.reserializeAndAssert; import static java.util.Arrays.asList; import com.google.common.annotations.GwtCompatible; import com.google.common.base.Predicate; import com.google.common.collect.testing.Helpers; import com.google.common.testing.EqualsTester; import junit.framework.TestCase; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; /** * Unit test for {@link Range}. * * @author Kevin Bourrillion */ @GwtCompatible public class RangeTest extends TestCase { public void testOpen() { Range<Integer> range = Range.open(4, 8); checkContains(range); assertTrue(range.hasLowerBound()); assertEquals(4, (int) range.lowerEndpoint()); assertEquals(OPEN, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(8, (int) range.upperEndpoint()); assertEquals(OPEN, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("(4\u20258)", range.toString()); reserializeAndAssert(range); } public void testOpen_invalid() { try { Range.open(4, 3); fail(); } catch (IllegalArgumentException expected) { } try { Range.open(3, 3); fail(); } catch (IllegalArgumentException expected) { } } public void testClosed() { Range<Integer> range = Range.closed(5, 7); checkContains(range); assertTrue(range.hasLowerBound()); assertEquals(5, (int) range.lowerEndpoint()); assertEquals(CLOSED, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(7, (int) range.upperEndpoint()); assertEquals(CLOSED, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("[5\u20257]", range.toString()); reserializeAndAssert(range); } public void testClosed_invalid() { try { Range.closed(4, 3); fail(); } catch (IllegalArgumentException expected) { } } public void testOpenClosed() { Range<Integer> range = Range.openClosed(4, 7); checkContains(range); assertTrue(range.hasLowerBound()); assertEquals(4, (int) range.lowerEndpoint()); assertEquals(OPEN, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(7, (int) range.upperEndpoint()); assertEquals(CLOSED, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("(4\u20257]", range.toString()); reserializeAndAssert(range); } public void testClosedOpen() { Range<Integer> range = Range.closedOpen(5, 8); checkContains(range); assertTrue(range.hasLowerBound()); assertEquals(5, (int) range.lowerEndpoint()); assertEquals(CLOSED, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(8, (int) range.upperEndpoint()); assertEquals(OPEN, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("[5\u20258)", range.toString()); reserializeAndAssert(range); } public void testIsConnected() { assertTrue(Range.closed(3, 5).isConnected(Range.open(5, 6))); assertTrue(Range.closed(3, 5).isConnected(Range.openClosed(5, 5))); assertTrue(Range.open(3, 5).isConnected(Range.closed(5, 6))); assertTrue(Range.closed(3, 7).isConnected(Range.open(6, 8))); assertTrue(Range.open(3, 7).isConnected(Range.closed(5, 6))); assertFalse(Range.closed(3, 5).isConnected(Range.closed(7, 8))); assertFalse(Range.closed(3, 5).isConnected(Range.closedOpen(7, 7))); } private static void checkContains(Range<Integer> range) { assertFalse(range.contains(4)); assertTrue(range.contains(5)); assertTrue(range.contains(7)); assertFalse(range.contains(8)); } public void testSingleton() { Range<Integer> range = Range.closed(4, 4); assertFalse(range.contains(3)); assertTrue(range.contains(4)); assertFalse(range.contains(5)); assertTrue(range.hasLowerBound()); assertEquals(4, (int) range.lowerEndpoint()); assertEquals(CLOSED, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(4, (int) range.upperEndpoint()); assertEquals(CLOSED, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("[4\u20254]", range.toString()); reserializeAndAssert(range); } public void testEmpty1() { Range<Integer> range = Range.closedOpen(4, 4); assertFalse(range.contains(3)); assertFalse(range.contains(4)); assertFalse(range.contains(5)); assertTrue(range.hasLowerBound()); assertEquals(4, (int) range.lowerEndpoint()); assertEquals(CLOSED, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(4, (int) range.upperEndpoint()); assertEquals(OPEN, range.upperBoundType()); assertTrue(range.isEmpty()); assertEquals("[4\u20254)", range.toString()); reserializeAndAssert(range); } public void testEmpty2() { Range<Integer> range = Range.openClosed(4, 4); assertFalse(range.contains(3)); assertFalse(range.contains(4)); assertFalse(range.contains(5)); assertTrue(range.hasLowerBound()); assertEquals(4, (int) range.lowerEndpoint()); assertEquals(OPEN, range.lowerBoundType()); assertTrue(range.hasUpperBound()); assertEquals(4, (int) range.upperEndpoint()); assertEquals(CLOSED, range.upperBoundType()); assertTrue(range.isEmpty()); assertEquals("(4\u20254]", range.toString()); reserializeAndAssert(range); } public void testLessThan() { Range<Integer> range = Range.lessThan(5); assertTrue(range.contains(Integer.MIN_VALUE)); assertTrue(range.contains(4)); assertFalse(range.contains(5)); assertUnboundedBelow(range); assertTrue(range.hasUpperBound()); assertEquals(5, (int) range.upperEndpoint()); assertEquals(OPEN, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("(-\u221e\u20255)", range.toString()); reserializeAndAssert(range); } public void testGreaterThan() { Range<Integer> range = Range.greaterThan(5); assertFalse(range.contains(5)); assertTrue(range.contains(6)); assertTrue(range.contains(Integer.MAX_VALUE)); assertTrue(range.hasLowerBound()); assertEquals(5, (int) range.lowerEndpoint()); assertEquals(OPEN, range.lowerBoundType()); assertUnboundedAbove(range); assertFalse(range.isEmpty()); assertEquals("(5\u2025+\u221e)", range.toString()); reserializeAndAssert(range); } public void testAtLeast() { Range<Integer> range = Range.atLeast(6); assertFalse(range.contains(5)); assertTrue(range.contains(6)); assertTrue(range.contains(Integer.MAX_VALUE)); assertTrue(range.hasLowerBound()); assertEquals(6, (int) range.lowerEndpoint()); assertEquals(CLOSED, range.lowerBoundType()); assertUnboundedAbove(range); assertFalse(range.isEmpty()); assertEquals("[6\u2025+\u221e)", range.toString()); reserializeAndAssert(range); } public void testAtMost() { Range<Integer> range = Range.atMost(4); assertTrue(range.contains(Integer.MIN_VALUE)); assertTrue(range.contains(4)); assertFalse(range.contains(5)); assertUnboundedBelow(range); assertTrue(range.hasUpperBound()); assertEquals(4, (int) range.upperEndpoint()); assertEquals(CLOSED, range.upperBoundType()); assertFalse(range.isEmpty()); assertEquals("(-\u221e\u20254]", range.toString()); reserializeAndAssert(range); } public void testAll() { Range<Integer> range = Range.all(); assertTrue(range.contains(Integer.MIN_VALUE)); assertTrue(range.contains(Integer.MAX_VALUE)); assertUnboundedBelow(range); assertUnboundedAbove(range); assertFalse(range.isEmpty()); assertEquals("(-\u221e\u2025+\u221e)", range.toString()); reserializeAndAssert(range); } private static void assertUnboundedBelow(Range<Integer> range) { assertFalse(range.hasLowerBound()); try { range.lowerEndpoint(); fail(); } catch (IllegalStateException expected) { } try { range.lowerBoundType(); fail(); } catch (IllegalStateException expected) { } } private static void assertUnboundedAbove(Range<Integer> range) { assertFalse(range.hasUpperBound()); try { range.upperEndpoint(); fail(); } catch (IllegalStateException expected) { } try { range.upperBoundType(); fail(); } catch (IllegalStateException expected) { } } public void testOrderingCuts() { Cut<Integer> a = Range.lessThan(0).lowerBound; Cut<Integer> b = Range.atLeast(0).lowerBound; Cut<Integer> c = Range.greaterThan(0).lowerBound; Cut<Integer> d = Range.atLeast(1).lowerBound; Cut<Integer> e = Range.greaterThan(1).lowerBound; Cut<Integer> f = Range.greaterThan(1).upperBound; Helpers.testCompareToAndEquals(ImmutableList.of(a, b, c, d, e, f)); } public void testContainsAll() { Range<Integer> range = Range.closed(3, 5); assertTrue(range.containsAll(asList(3, 3, 4, 5))); assertFalse(range.containsAll(asList(3, 3, 4, 5, 6))); // We happen to know that natural-order sorted sets use a different code // path, so we test that separately assertTrue(range.containsAll(ImmutableSortedSet.of(3, 3, 4, 5))); assertTrue(range.containsAll(ImmutableSortedSet.of(3))); assertTrue(range.containsAll(ImmutableSortedSet.<Integer>of())); assertFalse(range.containsAll(ImmutableSortedSet.of(3, 3, 4, 5, 6))); assertTrue(Range.openClosed(3, 3).containsAll( Collections.<Integer>emptySet())); } public void testEncloses_open() { Range<Integer> range = Range.open(2, 5); assertTrue(range.encloses(range)); assertTrue(range.encloses(Range.open(2, 4))); assertTrue(range.encloses(Range.open(3, 5))); assertTrue(range.encloses(Range.closed(3, 4))); assertFalse(range.encloses(Range.openClosed(2, 5))); assertFalse(range.encloses(Range.closedOpen(2, 5))); assertFalse(range.encloses(Range.closed(1, 4))); assertFalse(range.encloses(Range.closed(3, 6))); assertFalse(range.encloses(Range.greaterThan(3))); assertFalse(range.encloses(Range.lessThan(3))); assertFalse(range.encloses(Range.atLeast(3))); assertFalse(range.encloses(Range.atMost(3))); assertFalse(range.encloses(Range.<Integer>all())); } public void testEncloses_closed() { Range<Integer> range = Range.closed(2, 5); assertTrue(range.encloses(range)); assertTrue(range.encloses(Range.open(2, 5))); assertTrue(range.encloses(Range.openClosed(2, 5))); assertTrue(range.encloses(Range.closedOpen(2, 5))); assertTrue(range.encloses(Range.closed(3, 5))); assertTrue(range.encloses(Range.closed(2, 4))); assertFalse(range.encloses(Range.open(1, 6))); assertFalse(range.encloses(Range.greaterThan(3))); assertFalse(range.encloses(Range.lessThan(3))); assertFalse(range.encloses(Range.atLeast(3))); assertFalse(range.encloses(Range.atMost(3))); assertFalse(range.encloses(Range.<Integer>all())); } public void testIntersection_empty() { Range<Integer> range = Range.closedOpen(3, 3); assertEquals(range, range.intersection(range)); try { range.intersection(Range.open(3, 5)); fail(); } catch (IllegalArgumentException expected) { } try { range.intersection(Range.closed(0, 2)); fail(); } catch (IllegalArgumentException expected) { } } public void testIntersection_deFactoEmpty() { Range<Integer> range = Range.open(3, 4); assertEquals(range, range.intersection(range)); assertEquals(Range.openClosed(3, 3), range.intersection(Range.atMost(3))); assertEquals(Range.closedOpen(4, 4), range.intersection(Range.atLeast(4))); try { range.intersection(Range.lessThan(3)); fail(); } catch (IllegalArgumentException expected) { } try { range.intersection(Range.greaterThan(4)); fail(); } catch (IllegalArgumentException expected) { } range = Range.closed(3, 4); assertEquals(Range.openClosed(4, 4), range.intersection(Range.greaterThan(4))); } public void testIntersection_singleton() { Range<Integer> range = Range.closed(3, 3); assertEquals(range, range.intersection(range)); assertEquals(range, range.intersection(Range.atMost(4))); assertEquals(range, range.intersection(Range.atMost(3))); assertEquals(range, range.intersection(Range.atLeast(3))); assertEquals(range, range.intersection(Range.atLeast(2))); assertEquals(Range.closedOpen(3, 3), range.intersection(Range.lessThan(3))); assertEquals(Range.openClosed(3, 3), range.intersection(Range.greaterThan(3))); try { range.intersection(Range.atLeast(4)); fail(); } catch (IllegalArgumentException expected) { } try { range.intersection(Range.atMost(2)); fail(); } catch (IllegalArgumentException expected) { } } public void testIntersection_general() { Range<Integer> range = Range.closed(4, 8); // separate below try { range.intersection(Range.closed(0, 2)); fail(); } catch (IllegalArgumentException expected) { } // adjacent below assertEquals(Range.closedOpen(4, 4), range.intersection(Range.closedOpen(2, 4))); // overlap below assertEquals(Range.closed(4, 6), range.intersection(Range.closed(2, 6))); // enclosed with same start assertEquals(Range.closed(4, 6), range.intersection(Range.closed(4, 6))); // enclosed, interior assertEquals(Range.closed(5, 7), range.intersection(Range.closed(5, 7))); // enclosed with same end assertEquals(Range.closed(6, 8), range.intersection(Range.closed(6, 8))); // equal assertEquals(range, range.intersection(range)); // enclosing with same start assertEquals(range, range.intersection(Range.closed(4, 10))); // enclosing with same end assertEquals(range, range.intersection(Range.closed(2, 8))); // enclosing, exterior assertEquals(range, range.intersection(Range.closed(2, 10))); // overlap above assertEquals(Range.closed(6, 8), range.intersection(Range.closed(6, 10))); // adjacent above assertEquals(Range.openClosed(8, 8), range.intersection(Range.openClosed(8, 10))); // separate above try { range.intersection(Range.closed(10, 12)); fail(); } catch (IllegalArgumentException expected) { } } public void testSpan_general() { Range<Integer> range = Range.closed(4, 8); // separate below assertEquals(Range.closed(0, 8), range.span(Range.closed(0, 2))); assertEquals(Range.atMost(8), range.span(Range.atMost(2))); // adjacent below assertEquals(Range.closed(2, 8), range.span(Range.closedOpen(2, 4))); assertEquals(Range.atMost(8), range.span(Range.lessThan(4))); // overlap below assertEquals(Range.closed(2, 8), range.span(Range.closed(2, 6))); assertEquals(Range.atMost(8), range.span(Range.atMost(6))); // enclosed with same start assertEquals(range, range.span(Range.closed(4, 6))); // enclosed, interior assertEquals(range, range.span(Range.closed(5, 7))); // enclosed with same end assertEquals(range, range.span(Range.closed(6, 8))); // equal assertEquals(range, range.span(range)); // enclosing with same start assertEquals(Range.closed(4, 10), range.span(Range.closed(4, 10))); assertEquals(Range.atLeast(4), range.span(Range.atLeast(4))); // enclosing with same end assertEquals(Range.closed(2, 8), range.span(Range.closed(2, 8))); assertEquals(Range.atMost(8), range.span(Range.atMost(8))); // enclosing, exterior assertEquals(Range.closed(2, 10), range.span(Range.closed(2, 10))); assertEquals(Range.<Integer>all(), range.span(Range.<Integer>all())); // overlap above assertEquals(Range.closed(4, 10), range.span(Range.closed(6, 10))); assertEquals(Range.atLeast(4), range.span(Range.atLeast(6))); // adjacent above assertEquals(Range.closed(4, 10), range.span(Range.openClosed(8, 10))); assertEquals(Range.atLeast(4), range.span(Range.greaterThan(8))); // separate above assertEquals(Range.closed(4, 12), range.span(Range.closed(10, 12))); assertEquals(Range.atLeast(4), range.span(Range.atLeast(10))); } public void testApply() { Predicate<Integer> predicate = Range.closed(2, 3); assertFalse(predicate.apply(1)); assertTrue(predicate.apply(2)); assertTrue(predicate.apply(3)); assertFalse(predicate.apply(4)); } public void testEquals() { new EqualsTester() .addEqualityGroup(Range.open(1, 5), Range.range(1, OPEN, 5, OPEN)) .addEqualityGroup(Range.greaterThan(2), Range.greaterThan(2)) .addEqualityGroup(Range.all(), Range.all()) .addEqualityGroup("Phil") .testEquals(); } public void testLegacyComparable() { Range<LegacyComparable> range = Range.closed(LegacyComparable.X, LegacyComparable.Y); } private static final DiscreteDomain<Integer> UNBOUNDED_DOMAIN = new DiscreteDomain<Integer>() { @Override public Integer next(Integer value) { return DiscreteDomains.integers().next(value); } @Override public Integer previous(Integer value) { return DiscreteDomains.integers().previous(value); } @Override public long distance(Integer start, Integer end) { return DiscreteDomains.integers().distance(start, end); } }; public void testAsSet_noMin() { Range<Integer> range = Range.lessThan(0); try { range.asSet(UNBOUNDED_DOMAIN); fail(); } catch (IllegalArgumentException expected) {} } public void testAsSet_noMax() { Range<Integer> range = Range.greaterThan(0); try { range.asSet(UNBOUNDED_DOMAIN); fail(); } catch (IllegalArgumentException expected) {} } public void testAsSet_empty() { assertEquals(ImmutableSet.of(), Range.closedOpen(1, 1).asSet(integers())); assertEquals(ImmutableSet.of(), Range.openClosed(5, 5).asSet(integers())); assertEquals(ImmutableSet.of(), Range.lessThan(Integer.MIN_VALUE).asSet(integers())); assertEquals(ImmutableSet.of(), Range.greaterThan(Integer.MAX_VALUE).asSet(integers())); } public void testCanonical() { assertEquals(Range.closedOpen(1, 5), Range.closed(1, 4).canonical(integers())); assertEquals(Range.closedOpen(1, 5), Range.open(0, 5).canonical(integers())); assertEquals(Range.closedOpen(1, 5), Range.closedOpen(1, 5).canonical(integers())); assertEquals(Range.closedOpen(1, 5), Range.openClosed(0, 4).canonical(integers())); assertEquals(Range.closedOpen(Integer.MIN_VALUE, 0), Range.closedOpen(Integer.MIN_VALUE, 0).canonical(integers())); assertEquals(Range.closedOpen(Integer.MIN_VALUE, 0), Range.lessThan(0).canonical(integers())); assertEquals(Range.closedOpen(Integer.MIN_VALUE, 1), Range.atMost(0).canonical(integers())); assertEquals(Range.atLeast(0), Range.atLeast(0).canonical(integers())); assertEquals(Range.atLeast(1), Range.greaterThan(0).canonical(integers())); assertEquals(Range.atLeast(Integer.MIN_VALUE), Range.<Integer>all().canonical(integers())); } public void testCanonical_unboundedDomain() { assertEquals(Range.lessThan(0), Range.lessThan(0).canonical(UNBOUNDED_DOMAIN)); assertEquals(Range.lessThan(1), Range.atMost(0).canonical(UNBOUNDED_DOMAIN)); assertEquals(Range.atLeast(0), Range.atLeast(0).canonical(UNBOUNDED_DOMAIN)); assertEquals(Range.atLeast(1), Range.greaterThan(0).canonical(UNBOUNDED_DOMAIN)); assertEquals(Range.all(), Range.<Integer>all().canonical(UNBOUNDED_DOMAIN)); } public void testEncloseAll() { assertEquals(Range.closed(0, 0), Range.encloseAll(Arrays.asList(0))); assertEquals(Range.closed(-3, 5), Range.encloseAll(Arrays.asList(5, -3))); assertEquals(Range.closed(-3, 5), Range.encloseAll(Arrays.asList(1, 2, 2, 2, 5, -3, 0, -1))); } public void testEncloseAll_empty() { try { Range.encloseAll(ImmutableSet.<Integer>of()); fail(); } catch (NoSuchElementException expected) {} } public void testEncloseAll_nullValue() { List<Integer> nullFirst = Lists.newArrayList(null, 0); try { Range.encloseAll(nullFirst); fail(); } catch (NullPointerException expected) {} List<Integer> nullNotFirst = Lists.newArrayList(0, null); try { Range.encloseAll(nullNotFirst); fail(); } catch (NullPointerException expected) {} } public void testEquivalentFactories() { new EqualsTester() .addEqualityGroup(Range.all()) .addEqualityGroup( Range.atLeast(1), Range.downTo(1, CLOSED)) .addEqualityGroup( Range.greaterThan(1), Range.downTo(1, OPEN)) .addEqualityGroup( Range.atMost(7), Range.upTo(7, CLOSED)) .addEqualityGroup( Range.lessThan(7), Range.upTo(7, OPEN)) .addEqualityGroup( Range.open(1, 7), Range.range(1, OPEN, 7, OPEN)) .addEqualityGroup( Range.openClosed(1, 7), Range.range(1, OPEN, 7, CLOSED)) .addEqualityGroup( Range.closed(1, 7), Range.range(1, CLOSED, 7, CLOSED)) .addEqualityGroup( Range.closedOpen(1, 7), Range.range(1, CLOSED, 7, OPEN)) .testEquals(); } }
{'content_hash': 'af8d5c48721ccfea62223e85f7de3cf8', 'timestamp': '', 'source': 'github', 'line_count': 649, 'max_line_length': 97, 'avg_line_length': 33.69337442218798, 'alnum_prop': 0.673709242237161, 'repo_name': 'lowasser/guava-experimental', 'id': '73170316fabbaff289274b2e97af8553c0ef8b9e', 'size': '22467', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'guava-tests/test/com/google/common/collect/RangeTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '8854301'}, {'name': 'Shell', 'bytes': '1443'}]}
package network::cisco::callmanager::snmp::mode::ctiusage; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng); sub custom_status_output { my ($self, %options) = @_; return 'status: ' . $self->{result_values}->{status}; } sub custom_status_calc { my ($self, %options) = @_; $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_ccmCTIDeviceStatus'}; $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_ccmCTIDeviceName'}; return 0; } sub prefix_cti_output { my ($self, %options) = @_; return "Cti '" . $options{instance_value}->{ccmCTIDeviceName} . "' "; } sub prefix_global_output { my ($self, %options) = @_; return 'Total '; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'global', type => 0, cb_prefix_output => 'prefix_global_output' }, { name => 'cti', type => 1, cb_prefix_output => 'prefix_cti_output', message_multiple => 'All ctis are ok' } ]; $self->{maps_counters}->{cti} = [ { label => 'status', type => 2, critical_default => '%{status} !~ /^registered/', set => { key_values => [ { name => 'ccmCTIDeviceStatus' }, { name => 'ccmCTIDeviceName' } ], closure_custom_calc => $self->can('custom_status_calc'), closure_custom_output => $self->can('custom_status_output'), closure_custom_perfdata => sub { return 0; }, closure_custom_threshold_check => \&catalog_status_threshold_ng } } ]; my @map = ( ['total-registered', 'registered: %s', 'registered'], ['total-unregistered', 'unregistered: %s', 'unregistered'], ['total-rejected', 'rejected: %s', 'rejected'], ['total-unknown', 'unknown: %s', 'unknown'], ['total-partiallyregistered', 'partially registered: %s', 'partiallyregistered'] ); $self->{maps_counters}->{global} = []; foreach (@map) { push @{$self->{maps_counters}->{global}}, { label => $_->[0], nlabel => 'cti.devices.total.' . $_->[2] . '.count', set => { key_values => [ { name => $_->[2] } ], output_template => $_->[1], perfdatas => [ { value => $_->[2] , template => '%s', min => 0 } ] } }; } } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; $self->{version} = '1.0'; $options{options}->add_options(arguments => { }); return $self; } my %mapping_status = ( 1 => 'unknown', 2 => 'registered', 3 => 'unregistered', 4 => 'rejected', 5 => 'partiallyregistered' ); my $mapping = { ccmCTIDeviceName => { oid => '.1.3.6.1.4.1.9.9.156.1.8.1.1.2' }, ccmCTIDeviceStatus => { oid => '.1.3.6.1.4.1.9.9.156.1.8.1.1.5', map => \%mapping_status } }; my $oid_ccmCtiEntry = '.1.3.6.1.4.1.9.9.156.1.8.1.1'; sub manage_selection { my ($self, %options) = @_; my $snmp_result = $options{snmp}->get_table( oid => $oid_ccmCtiEntry, start => $mapping->{ccmCTIDeviceName}->{oid}, end => $mapping->{ccmCTIDeviceStatus}->{oid}, nothing_quit => 1 ); $self->{phone} = {}; $self->{global} = { unknown => 0, registered => 0, unregistered => 0, rejected => 0, partiallyregistered => 0 }; foreach my $oid (keys %$snmp_result) { next if ($oid !~ /^$mapping->{ccmCTIDeviceStatus}->{oid}\.(.*)/); my $instance = $1; my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $instance); $self->{phone}->{$instance} = $result; $self->{global}->{$result->{ccmCTIDeviceStatus}}++; } } 1; __END__ =head1 MODE Check cti usage. =over 8 =item B<--filter-counters> Only display some counters (regexp can be used). Example: --filter-counters='status' =item B<--warning-status> Set warning threshold for status (Default: ''). Can used special variables like: %{status}, %{display} =item B<--critical-status> Set critical threshold for status (Default: '%{status} !~ /^registered/'). Can used special variables like: %{status}, %{display} =item B<--warning-*> B<--critical-*> Thresholds. Can be: 'total-registered', 'total-unregistered', 'total-rejected', 'total-unknown', 'total-partiallyregistered'. =back =cut
{'content_hash': '618311c8b16548eef68598283293fe75', 'timestamp': '', 'source': 'github', 'line_count': 155, 'max_line_length': 119, 'avg_line_length': 29.870967741935484, 'alnum_prop': 0.5557235421166307, 'repo_name': 'centreon/centreon-plugins', 'id': '526b216ef9c7974c6083da2d71add3974bc10cd0', 'size': '5390', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'network/cisco/callmanager/snmp/mode/ctiusage.pm', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '719'}, {'name': 'Perl', 'bytes': '21731182'}]}
/* * Title: CMinusCodeGeneration * Author: Matthew Boyette * Date: 04/10/2017 - 04/14/2017 * * This class functions as a generic intermediate code generator for the C-Minus language. * * TODO: IF/ELSE/ELSE-IF */ package api.util.cminus; import java.util.LinkedList; import java.util.List; import api.util.cminus.CMinusSemantics.SymTab; import api.util.cminus.CMinusSemantics.SymTabRec; import api.util.datastructures.Token; public class CMinusCodeGeneration { public static class QuadrupleWriter { public static enum INSTRUCTION { ADD, ALLOC, ARG, ASSIGN, BR, BRE, BRG, BRGE, BRL, BRLE, BRNE, CALL, COMP, DISP, DIV, END, FUNC, MULT, PARAM, RETURN, SUB } public static class Quadruple implements Comparable<Quadruple> { private int statementIndex = 0; private String statementInstruction = null; private String statementOperandA = null; private String statementOperandB = null; private String statementResult = null; public Quadruple(final INSTRUCTION statementInstruction, final String statementResult) { this(statementInstruction, ( ( statementInstruction == INSTRUCTION.ALLOC ) ? "4" : "" ), "", statementResult); } public Quadruple(final INSTRUCTION statementInstruction, final String statementOperandA, final String statementOperandB, final String statementResult) { super(); this.statementIndex = CMinusCodeGeneration.statementCounter++; this.statementInstruction = statementInstruction.name().toLowerCase(); this.statementOperandA = statementOperandA; this.statementOperandB = statementOperandB; this.statementResult = statementResult; } @Override public int compareTo(Quadruple arg0) { return ( this.getStatementIndex() - arg0.getStatementIndex() ); } @Override public boolean equals(final Object obj) { if ( this == obj ) return true; if ( obj == null ) return false; if ( !( obj instanceof Quadruple ) ) return false; Quadruple other = (Quadruple) obj; if ( statementIndex != other.statementIndex ) return false; if ( statementInstruction != other.statementInstruction ) return false; if ( statementOperandA == null ) { if ( other.statementOperandA != null ) return false; } else if ( !statementOperandA.equals(other.statementOperandA) ) return false; if ( statementOperandB == null ) { if ( other.statementOperandB != null ) return false; } else if ( !statementOperandB.equals(other.statementOperandB) ) return false; if ( statementResult == null ) { if ( other.statementResult != null ) return false; } else if ( !statementResult.equals(other.statementResult) ) return false; return true; } public final int getStatementIndex() { return statementIndex; } public final String getStatementInstruction() { return statementInstruction; } public final String getStatementOperandA() { return statementOperandA; } public final String getStatementOperandB() { return statementOperandB; } public final String getStatementResult() { return statementResult; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + statementIndex; result = prime * result + ( ( statementInstruction == null ) ? 0 : statementInstruction.hashCode() ); result = prime * result + ( ( statementOperandA == null ) ? 0 : statementOperandA.hashCode() ); result = prime * result + ( ( statementOperandB == null ) ? 0 : statementOperandB.hashCode() ); result = prime * result + ( ( statementResult == null ) ? 0 : statementResult.hashCode() ); return result; } public final void setStatementResult(final String statementResult) { this.statementResult = statementResult; } @Override public final String toString() { return String.format("%-10d %-15s %-15s %-15s %-15s", this.statementIndex, this.statementInstruction, this.statementOperandA, this.statementOperandB, this.statementResult); } } public static final void writeAddOrSub(final boolean isAdd, final String op1, final String op2, final boolean isNewVar) { String _op1 = CMinusCodeGeneration.checkOperand(op1); String _op2 = CMinusCodeGeneration.checkOperand(op2); String result = ""; if ( isNewVar ) { result = CMinusCodeGeneration.getTempVar(true, -1); } else { result = CMinusCodeGeneration.getTempVar(true, 0); } if ( isAdd ) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.ADD, _op1, _op2, result)); } else { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.SUB, _op1, _op2, result)); } } public static final void writeArgument(final String result) { String _result = result; if ( _result != null ) { if ( _result.isEmpty() ) { _result = CMinusCodeGeneration.getTempVar(true, 0); } } CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.ARG, _result)); } public static final void writeArrayAlloc(final CMinusSemantics.ArrRec record) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.ALLOC, Integer.toString(4 * record.size), "", record.name)); } public static final void writeAssignment(final List<Token<CMinusLexer.TokenType>> variable, final List<Token<CMinusLexer.TokenType>> expression) { String op1 = "", result = ""; if ( expression.size() == 1 ) { // Operand1 is a single variable name op1 = expression.get(0).getData(); } else if ( expression.size() > 1 ) { // Operand1 is a new temporary variable if ( CMinusCodeGeneration.variableCounter < 0 ) { op1 = CMinusCodeGeneration.getTempVar(true, -1); } else // Operand1 is current temporary variable { op1 = CMinusCodeGeneration.getTempVar(true, 0); } } if ( variable.size() == 1 ) { // Result is a single variable name result = variable.get(0).getData(); } else if ( variable.size() > 1 ) { // Result is the current temporary variable result = CMinusCodeGeneration.getTempVar(true, 0); } CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.ASSIGN, op1, "", result)); } public static final void writeComparison(final String op1, final String op2, final String operator, final boolean isNewVar) { String _op1 = CMinusCodeGeneration.checkOperand(op1); String _op2 = CMinusCodeGeneration.checkOperand(op2); String result = ""; if ( isNewVar ) { result = CMinusCodeGeneration.getTempVar(true, -1); } else { result = CMinusCodeGeneration.getTempVar(true, 0); } CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.COMP, _op1, _op2, result)); if ( CMinusCodeGeneration.isInControlStmnt ) { CMinusCodeGeneration.QuadrupleWriter.writeConditionalBranch(operator); } } public static final void writeConditionalBranch(final String operator) { String op1 = CMinusCodeGeneration.getTempVar(true, 0); INSTRUCTION instruction = null; switch ( operator ) { case "<": instruction = INSTRUCTION.BRGE; break; case "<=": instruction = INSTRUCTION.BRG; break; case ">": instruction = INSTRUCTION.BRLE; break; case ">=": instruction = INSTRUCTION.BRL; break; case "==": instruction = INSTRUCTION.BRNE; break; case "!=": instruction = INSTRUCTION.BRE; break; default: instruction = INSTRUCTION.BR; break; } CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(instruction, op1, "", "$BP")); } public static final void writeDisplacement(final CMinusSemantics.ArrRec record, final String op2) { String _op2 = op2; if ( _op2 != null ) { if ( _op2.isEmpty() ) { _op2 = CMinusCodeGeneration.getTempVar(true, 1); } } CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.MULT, "4", _op2, CMinusCodeGeneration.getTempVar(true, -1))); CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.DISP, record.name, CMinusCodeGeneration.getTempVar(true, 0), CMinusCodeGeneration.getTempVar(true, -1))); } public static final void writeFunctionCall(final CMinusSemantics.FunRec functionRecord, final int argCount) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.CALL, functionRecord.name, Integer.toString(argCount), CMinusCodeGeneration.getTempVar(true, -1))); } public static final void writeFunctionStart(final CMinusSemantics.FunRec functionRecord) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.FUNC, functionRecord.name, functionRecord.type, Integer.toString(functionRecord.getNumParams()))); for ( CMinusSemantics.SymTabRec record : functionRecord.getParams() ) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.PARAM, "")); CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.ALLOC, record.name)); } } public static final void writeFunctionStop(final CMinusSemantics.FunRec functionRecord) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.END, INSTRUCTION.FUNC.name().toLowerCase(), functionRecord.name, "")); } public static final void writeMultOrDiv(final boolean isMult, final String op1, final String op2, final boolean isNewVar) { String _op1 = CMinusCodeGeneration.checkOperand(op1); String _op2 = CMinusCodeGeneration.checkOperand(op2); String result = ""; if ( isNewVar ) { result = CMinusCodeGeneration.getTempVar(true, -1); } else { result = CMinusCodeGeneration.getTempVar(true, 0); } if ( isMult ) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.MULT, _op1, _op2, result)); } else { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.DIV, _op1, _op2, result)); } } public static final void writeReturn(final String result) { String _result = result; if ( _result != null ) { if ( _result.isEmpty() ) { _result = CMinusCodeGeneration.getTempVar(true, 0); } } CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.RETURN, _result)); } public static final void writeUnconditionalBranch(final int statementIndex) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.BR, Integer.toString(statementIndex))); } public static final void writeVariableAlloc(final CMinusSemantics.VarRec record) { CMinusCodeGeneration.staticQuadBuffer.add(new Quadruple(INSTRUCTION.ALLOC, record.name)); } } public static boolean isInControlStmnt = false; public static int statementCounter = 0; protected static List<QuadrupleWriter.Quadruple> staticQuadBuffer = new LinkedList<QuadrupleWriter.Quadruple>(); protected static int variableCounter = -1; protected static final String checkOperand(final String operand) { if ( operand != null ) { if ( operand.isEmpty() ) { return CMinusCodeGeneration.getTempVar(true, 1); } } return operand; } protected static final String getTempVar(final boolean bIncrement, final int iFixFlag) { if ( bIncrement ) { if ( iFixFlag > 0 ) { return "_t" + Integer.toString(CMinusCodeGeneration.variableCounter++); } else if ( iFixFlag < 0 ) { return "_t" + Integer.toString( ++CMinusCodeGeneration.variableCounter); } else { return "_t" + Integer.toString(CMinusCodeGeneration.variableCounter); } } else { if ( iFixFlag > 0 ) { return "_t" + Integer.toString(CMinusCodeGeneration.variableCounter--); } else if ( iFixFlag < 0 ) { return "_t" + Integer.toString( --CMinusCodeGeneration.variableCounter); } else { return "_t" + Integer.toString(CMinusCodeGeneration.variableCounter); } } } public static final void reinitialize() { CMinusCodeGeneration.statementCounter = 0; CMinusCodeGeneration.staticQuadBuffer = new LinkedList<QuadrupleWriter.Quadruple>(); CMinusCodeGeneration.variableCounter = -1; CMinusCodeGeneration.isInControlStmnt = false; } private StringBuffer result = null; private SymTab<SymTabRec> symbolTables = null; private List<Token<CMinusLexer.TokenType>> tokens = null; public CMinusCodeGeneration(final List<Token<CMinusLexer.TokenType>> tokens, final SymTab<SymTabRec> symbolTables, final boolean silent) { super(); this.result = new StringBuffer(); this.codeGen(tokens, symbolTables, silent); } protected final boolean codeGen(final List<Token<CMinusLexer.TokenType>> tokens, final SymTab<SymTabRec> symbolTables, final boolean silent) { if ( ( ( tokens != null ) && ( symbolTables != null ) ) ) { this.setTokens(tokens); this.setSymbolTables(symbolTables); return this.setResult(true); } return this.setResult(false); } public final String getResult() { return this.result.toString(); } public final SymTab<SymTabRec> getSymbolTables() { return this.symbolTables; } public final List<Token<CMinusLexer.TokenType>> getTokens() { return this.tokens; } protected final boolean setResult(final boolean result) { for ( QuadrupleWriter.Quadruple quad : CMinusCodeGeneration.staticQuadBuffer ) { if ( ( this.result != null ) && ( quad != null ) ) { this.result.append(quad.toString() + "\n"); } } CMinusCodeGeneration.reinitialize(); return result; } protected final void setSymbolTables(final SymTab<SymTabRec> symbolTables) { this.symbolTables = symbolTables; } protected final void setTokens(final List<Token<CMinusLexer.TokenType>> tokens) { this.tokens = tokens; } }
{'content_hash': '9f2ddf0943e1a19c919c66b1ffa8187f', 'timestamp': '', 'source': 'github', 'line_count': 496, 'max_line_length': 188, 'avg_line_length': 35.028225806451616, 'alnum_prop': 0.5560607804765741, 'repo_name': 'Dyndrilliac/java-custom-api', 'id': '1c7a8ffdf2ca216cf14fc2bc3598d29f7153c143', 'size': '17374', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'api/util/cminus/CMinusCodeGeneration.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '391615'}]}
var fluxGen = require('../lib/fluxGen'); function getRand () { return +(Math.random() * 100).toFixed(0); } class Pizza { constructor (startingDate, quotes, ...pizzaProps) { this.startingDate = startingDate; [ this.ticker, this.name, this.startingQuote, this.variability = getRand(), this.positivity = getRand() ] = pizzaProps; this.quotes = quotes || [this.startingQuote]; } // private methods _addQuote (quote) { this.quotes.push(quote); } _getQuote (quoteIndex) { return this.quotes[quoteIndex]; } // public methods getNext () { var newQuote = fluxGen(this.getLast(), 1, this.variability, this.positivity)[0]; this._addQuote(newQuote); return newQuote; } getLast () { return this._getQuote(this.quotes.length - 1); } getDatedQuotes () { var quotesMap = {}, { startingDate: curDate } = this; for (const quote of this.quotes) { quotesMap[curDate] = quote; curDate.setDate(curDate.getDate() + 1); } return quotesMap; } } Pizza.hydrate = function (pizzaObj) { var newPizza = new Pizza( pizzaObj.startingDate, pizzaObj.quotes, pizzaObj.ticker, pizzaObj.name, pizzaObj.startingQuote, pizzaObj.variability, pizzaObj.positivity); newPizza.quotes = pizzaObj.quotes; return newPizza; }; module.exports = Pizza;
{'content_hash': '5618ffe4122cda7e3c67c08e1f111e87', 'timestamp': '', 'source': 'github', 'line_count': 67, 'max_line_length': 84, 'avg_line_length': 20.64179104477612, 'alnum_prop': 0.6341287057122198, 'repo_name': 'gusdewa/learn-node', 'id': '6e20de063573fb193b49e6fbdf9761d44a17aa57', 'size': '1383', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': 'Exercise Files/04_04/Finished/src/models/pizza.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '92226'}, {'name': 'HTML', 'bytes': '120631'}, {'name': 'JavaScript', 'bytes': '836459'}]}
#ifndef P2P_BASE_ASYNCSTUNTCPSOCKET_H_ #define P2P_BASE_ASYNCSTUNTCPSOCKET_H_ #include BOSS_WEBRTC_U_rtc_base__asynctcpsocket_h //original-code:"rtc_base/asynctcpsocket.h" #include BOSS_WEBRTC_U_rtc_base__constructormagic_h //original-code:"rtc_base/constructormagic.h" #include BOSS_WEBRTC_U_rtc_base__socketfactory_h //original-code:"rtc_base/socketfactory.h" namespace cricket { class AsyncStunTCPSocket : public rtc::AsyncTCPSocketBase { public: // Binds and connects |socket| and creates AsyncTCPSocket for // it. Takes ownership of |socket|. Returns NULL if bind() or // connect() fail (|socket| is destroyed in that case). static AsyncStunTCPSocket* Create( rtc::AsyncSocket* socket, const rtc::SocketAddress& bind_address, const rtc::SocketAddress& remote_address); AsyncStunTCPSocket(rtc::AsyncSocket* socket, bool listen); int Send(const void* pv, size_t cb, const rtc::PacketOptions& options) override; void ProcessInput(char* data, size_t* len) override; void HandleIncomingConnection(rtc::AsyncSocket* socket) override; private: // This method returns the message hdr + length written in the header. // This method also returns the number of padding bytes needed/added to the // turn message. |pad_bytes| should be used only when |is_turn| is true. size_t GetExpectedLength(const void* data, size_t len, int* pad_bytes); RTC_DISALLOW_COPY_AND_ASSIGN(AsyncStunTCPSocket); }; } // namespace cricket #endif // P2P_BASE_ASYNCSTUNTCPSOCKET_H_
{'content_hash': 'bdd927ddef11ef93ba26b6ae824351d6', 'timestamp': '', 'source': 'github', 'line_count': 42, 'max_line_length': 97, 'avg_line_length': 37.11904761904762, 'alnum_prop': 0.7222578576010263, 'repo_name': 'koobonil/Boss2D', 'id': 'a7ad77f639e567e59fc377d4eb94ee6f7125635e', 'size': '1967', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Boss2D/addon/_old/webrtc-qt5.11.2_for_boss/p2p/base/asyncstuntcpsocket.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '4820445'}, {'name': 'Awk', 'bytes': '4272'}, {'name': 'Batchfile', 'bytes': '89930'}, {'name': 'C', 'bytes': '119747922'}, {'name': 'C#', 'bytes': '87505'}, {'name': 'C++', 'bytes': '272329620'}, {'name': 'CMake', 'bytes': '1199656'}, {'name': 'CSS', 'bytes': '42679'}, {'name': 'Clojure', 'bytes': '1487'}, {'name': 'Cuda', 'bytes': '1651996'}, {'name': 'DIGITAL Command Language', 'bytes': '239527'}, {'name': 'Dockerfile', 'bytes': '9638'}, {'name': 'Emacs Lisp', 'bytes': '15570'}, {'name': 'Go', 'bytes': '858185'}, {'name': 'HLSL', 'bytes': '3314'}, {'name': 'HTML', 'bytes': '2958385'}, {'name': 'Java', 'bytes': '2921052'}, {'name': 'JavaScript', 'bytes': '178190'}, {'name': 'Jupyter Notebook', 'bytes': '1833654'}, {'name': 'LLVM', 'bytes': '6536'}, {'name': 'M4', 'bytes': '775724'}, {'name': 'MATLAB', 'bytes': '74606'}, {'name': 'Makefile', 'bytes': '3941551'}, {'name': 'Meson', 'bytes': '2847'}, {'name': 'Module Management System', 'bytes': '2626'}, {'name': 'NSIS', 'bytes': '4505'}, {'name': 'Objective-C', 'bytes': '4090702'}, {'name': 'Objective-C++', 'bytes': '1702390'}, {'name': 'PHP', 'bytes': '3530'}, {'name': 'Perl', 'bytes': '11096338'}, {'name': 'Perl 6', 'bytes': '11802'}, {'name': 'PowerShell', 'bytes': '38571'}, {'name': 'Python', 'bytes': '24123805'}, {'name': 'QMake', 'bytes': '18188'}, {'name': 'Roff', 'bytes': '1261269'}, {'name': 'Ruby', 'bytes': '5890'}, {'name': 'Scala', 'bytes': '5683'}, {'name': 'Shell', 'bytes': '2879948'}, {'name': 'TeX', 'bytes': '243507'}, {'name': 'TypeScript', 'bytes': '1593696'}, {'name': 'Verilog', 'bytes': '1215'}, {'name': 'Vim Script', 'bytes': '3759'}, {'name': 'Visual Basic', 'bytes': '16186'}, {'name': 'eC', 'bytes': '9705'}]}
<?php namespace App\Http\Requests\Backend\Access\User; use App\Http\Requests\Request; /** * Class EditUserRequest * @package App\Http\Requests\Backend\Access\User */ class EditUserRequest extends Request { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return access()->can('edit-users'); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ // ]; } }
{'content_hash': '5041f73670460d5597eb3f123216bc29', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 64, 'avg_line_length': 18.625, 'alnum_prop': 0.5771812080536913, 'repo_name': 'Lphmedia/youbloom', 'id': 'bb56cadb7fac30a71cd5e0a7dc53c213948aad34', 'size': '596', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'app/Http/Requests/Backend/Access/User/EditUserRequest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '39551'}, {'name': 'CSS', 'bytes': '103277'}, {'name': 'JavaScript', 'bytes': '100534'}, {'name': 'PHP', 'bytes': '517901'}]}
package android.marshi.nestedwebview; import android.content.Context; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import androidx.appcompat.widget.Toolbar; import androidx.coordinatorlayout.widget.CoordinatorLayout; import com.google.android.material.appbar.AppBarLayout; /** * */ @CoordinatorLayout.DefaultBehavior(NestedWebViewAppBarLayout.Behavior.class) public class NestedWebViewAppBarLayout extends AppBarLayout { public NestedWebViewAppBarLayout(Context context) { super(context); } public NestedWebViewAppBarLayout(Context context, AttributeSet attrs) { super(context, attrs); } public static class Behavior extends AppBarLayout.Behavior { private Toolbar toolbar; @Override public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child, View target, int dx, int dy, int[] consumed, int type) { if (this.toolbar == null) { this.toolbar = findToolbar(child); if (this.toolbar == null) { return; } } int[] toolbarLocation = new int[2]; toolbar.getLocationOnScreen(toolbarLocation); int[] targetLocation = new int[2]; target.getLocationOnScreen(targetLocation); int toolbarBottomY = toolbarLocation[1] + toolbar.getHeight(); int[] appbarLocation = new int[2]; int nestedScrollViewTopY = targetLocation[1]; child.getLocationOnScreen(appbarLocation); NestedWebView nestedWebView = (NestedWebView) target; if (nestedScrollViewTopY <= toolbarBottomY) { nestedWebView.onChangeCollapseToolbar(true, dy); } else { nestedWebView.onChangeCollapseToolbar(false, dy); } super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type); } protected Toolbar findToolbar(ViewGroup viewGroup) { for (int i = 0; i < viewGroup.getChildCount(); i++) { View view = viewGroup.getChildAt(i); if (view instanceof Toolbar) { return (Toolbar)view; } if (view instanceof ViewGroup) { return findToolbar((ViewGroup)view); } } return null; } } }
{'content_hash': '507c286ac96c8f12844899a59b7b4bc9', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 94, 'avg_line_length': 34.71830985915493, 'alnum_prop': 0.6178498985801217, 'repo_name': 'marshi/NestedWebView', 'id': 'd959bf6d1c32c61703f605c50ac31f7c87f7a4c2', 'size': '2465', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'library/src/main/java/android/marshi/nestedwebview/NestedWebViewAppBarLayout.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '9715'}]}
hexo-theme-aiki is the [theme](https://github.com/hexojs/hexo/wiki/Themes) for [Hexo](http://hexo.io/). # Demo * [Semantic Ui Explore](http://foreachsam.github.io/blog-framework-semantic-ui/) * [Windwalker Explore](http://foreachsam.github.io/blog-framework-windwalker/)
{'content_hash': 'c44cb8f38910789e5c3993745dd2b7e1', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 103, 'avg_line_length': 45.5, 'alnum_prop': 0.73992673992674, 'repo_name': 'foreachsam/hexo-theme-aiki', 'id': '24baf14c784cc8e84ea4ee448d5c57cb8ea43d1f', 'size': '292', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '14618'}, {'name': 'Shell', 'bytes': '1108'}]}
echo 'Running build command from development' cd client/development sencha app build testing cd .. echo 'Deleting contents of default...' rm -rf default/* cd default echo 'Copying testing build into client/default...' cp -R ../development/build/testing/FHSencha/* . echo 'Done...'
{'content_hash': '2e75f6ccba217660c1c62ea8cbc05f7f', 'timestamp': '', 'source': 'github', 'line_count': 10, 'max_line_length': 51, 'avg_line_length': 28.0, 'alnum_prop': 0.7535714285714286, 'repo_name': 'alanmoran/FHSenchaGuide', 'id': '4c51f82ee9c0ea9089ed826358bf11db8214a467', 'size': '292', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'buildscript.sh', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '3672557'}, {'name': 'JavaScript', 'bytes': '14306904'}, {'name': 'Ruby', 'bytes': '2164'}, {'name': 'Shell', 'bytes': '292'}]}
<?php include_once $_SERVER["DOCUMENT_ROOT"].'/system/repositories/SubjectRepository.php'; include_once $_SERVER["DOCUMENT_ROOT"].'/system/repositories/FilesRepository.php'; include_once $_SERVER["DOCUMENT_ROOT"].'/system/utils/UserHelper.php'; include_once $_SERVER["DOCUMENT_ROOT"].'/system/utils/FileUpload.php'; include_once $_SERVER["DOCUMENT_ROOT"].'/system/utils/Permissions.php'; Use \App\System\Helpers\UserHelper as UserHelper; Use \App\System\Helpers\FileUpload as FileUpload; Use \App\System\Helpers\Permissions as Permissions; Use \App\System\Repositories\FilesRepository as FilesRepository; Use \App\System\Repositories\SubjectRepository as SubjectRepository; $subjectRepository = new SubjectRepository(); $fileRepository = new FilesRepository(); $loggedUser = UserHelper::getLoggedUser(); if(UserHelper::loggedUserHasPermission(Permissions::SEE_ALL_SUBJECTS)){ $subjects = $subjectRepository->getAll(); }else{ $subjects = $subjectRepository->getSubjectsByTeacher($loggedUser['id']); } $editFile = array( 'description' => '', 'path' => '', 'id_user' => '', 'id_subject' => '', ); if ($file){ $editFile = $fileRepository->getById($file)[0]; } if (isset($_POST['description']) ){ $editFile = array( 'description' => $_POST['description'], 'id_user' => $loggedUser['id'], 'id_subject' => $_POST['id_subject'] ); if(isset($_FILES['path'])){ if($_FILES['path']['name'] != ''){ $editFile['path'] = FileUpload::uploadFile($_FILES["path"], '/files/'); } } if (isset($file) && $file != 0){ $editFile['id'] = $file; $fileRepository->update($editFile); header('Location: /admin/files'); }else{ $fileRepository->add($editFile); header('Location: /admin/files'); } } ?> <div class="row"> <div class="col s8"> <div class="row"> <form class="col s12" method="post" enctype="multipart/form-data"> <div class="row"> <div class="input-field col s12"> <input id="title" type="text" class="validate" name="description" value="<?php echo $editFile['description'] ?>"> <label for="title">Descripción</label> </div> </div> <div class="row"> <div class="input-field col s12"> <div class="file-field input-field"> <div class="btn"> <span>Archivo</span> <input type="file" name="path"> </div> <div class="file-path-wrapper"> <input class="file-path validate" type="text"> </div> </div> </div> </div> <div class="row valign-wrapper"> <div class="input-field col s12 valign"> <select class="teacher-selector" name="id_subject"> <option value="" disabled selected>Materia</option> <?php foreach ($subjects as $key => $subject) {?> <option value="<?php echo $subject['id'] ?>"><?php echo $subject['title'];?></option> <?php }?> </select> <label>Materia</label> </div> </div> <button type="submit" class=" modal-action modal-close waves-effect waves-green btn-flat">Guardar</button> </form> </div> </div> </div>
{'content_hash': '2abf663a9068bf177d642eb7e7c4bad5', 'timestamp': '', 'source': 'github', 'line_count': 98, 'max_line_length': 131, 'avg_line_length': 37.94897959183673, 'alnum_prop': 0.5224522721161603, 'repo_name': 'maximilianotulian/egfinal', 'id': '2a0b2ce684af7e229164d0a4d165dd6140b43099', 'size': '3720', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'admin/views/pages/files/edit.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '1786'}, {'name': 'CSS', 'bytes': '226226'}, {'name': 'JavaScript', 'bytes': '282973'}, {'name': 'PHP', 'bytes': '310830'}]}
package org.apache.spark.sql.execution import scala.collection.JavaConverters._ import org.apache.spark.internal.config.ConfigEntry import org.apache.spark.sql.SaveMode import org.apache.spark.sql.catalyst.TableIdentifier import org.apache.spark.sql.catalyst.analysis.{AnalysisTest, UnresolvedAlias, UnresolvedAttribute, UnresolvedRelation, UnresolvedStar} import org.apache.spark.sql.catalyst.catalog.{BucketSpec, CatalogStorageFormat, CatalogTable, CatalogTableType} import org.apache.spark.sql.catalyst.expressions.{Ascending, AttributeReference, Concat, SortOrder} import org.apache.spark.sql.catalyst.plans.logical._ import org.apache.spark.sql.execution.command._ import org.apache.spark.sql.execution.datasources.{CreateTable, RefreshResource} import org.apache.spark.sql.internal.{HiveSerDe, SQLConf, StaticSQLConf} import org.apache.spark.sql.types.{IntegerType, LongType, StringType, StructType} /** * Parser test cases for rules defined in [[SparkSqlParser]]. * * See [[org.apache.spark.sql.catalyst.parser.PlanParserSuite]] for rules * defined in the Catalyst module. */ class SparkSqlParserSuite extends AnalysisTest { import org.apache.spark.sql.catalyst.dsl.expressions._ val newConf = new SQLConf private lazy val parser = new SparkSqlParser(newConf) /** * Normalizes plans: * - CreateTable the createTime in tableDesc will replaced by -1L. */ override def normalizePlan(plan: LogicalPlan): LogicalPlan = { plan match { case CreateTable(tableDesc, mode, query) => val newTableDesc = tableDesc.copy(createTime = -1L) CreateTable(newTableDesc, mode, query) case _ => plan // Don't transform } } private def assertEqual(sqlCommand: String, plan: LogicalPlan): Unit = { val normalized1 = normalizePlan(parser.parsePlan(sqlCommand)) val normalized2 = normalizePlan(plan) comparePlans(normalized1, normalized2) } private def intercept(sqlCommand: String, messages: String*): Unit = interceptParseException(parser.parsePlan)(sqlCommand, messages: _*) test("Checks if SET/RESET can parse all the configurations") { // Force to build static SQL configurations StaticSQLConf ConfigEntry.knownConfigs.values.asScala.foreach { config => assertEqual(s"SET ${config.key}", SetCommand(Some(config.key -> None))) if (config.defaultValue.isDefined && config.defaultValueString != null) { assertEqual(s"SET ${config.key}=${config.defaultValueString}", SetCommand(Some(config.key -> Some(config.defaultValueString)))) } assertEqual(s"RESET ${config.key}", ResetCommand(Some(config.key))) } } test("Report Error for invalid usage of SET command") { assertEqual("SET", SetCommand(None)) assertEqual("SET -v", SetCommand(Some("-v", None))) assertEqual("SET spark.sql.key", SetCommand(Some("spark.sql.key" -> None))) assertEqual("SET spark.sql.key ", SetCommand(Some("spark.sql.key" -> None))) assertEqual("SET spark:sql:key=false", SetCommand(Some("spark:sql:key" -> Some("false")))) assertEqual("SET spark:sql:key=", SetCommand(Some("spark:sql:key" -> Some("")))) assertEqual("SET spark:sql:key= ", SetCommand(Some("spark:sql:key" -> Some("")))) assertEqual("SET spark:sql:key=-1 ", SetCommand(Some("spark:sql:key" -> Some("-1")))) assertEqual("SET spark:sql:key = -1", SetCommand(Some("spark:sql:key" -> Some("-1")))) assertEqual("SET 1.2.key=value", SetCommand(Some("1.2.key" -> Some("value")))) assertEqual("SET spark.sql.3=4", SetCommand(Some("spark.sql.3" -> Some("4")))) assertEqual("SET 1:2:key=value", SetCommand(Some("1:2:key" -> Some("value")))) assertEqual("SET spark:sql:3=4", SetCommand(Some("spark:sql:3" -> Some("4")))) assertEqual("SET 5=6", SetCommand(Some("5" -> Some("6")))) assertEqual("SET spark:sql:key = va l u e ", SetCommand(Some("spark:sql:key" -> Some("va l u e")))) assertEqual("SET `spark.sql. key`=value", SetCommand(Some("spark.sql. key" -> Some("value")))) assertEqual("SET `spark.sql. key`= v a lu e ", SetCommand(Some("spark.sql. key" -> Some("v a lu e")))) assertEqual("SET `spark.sql. key`= -1", SetCommand(Some("spark.sql. key" -> Some("-1")))) val expectedErrMsg = "Expected format is 'SET', 'SET key', or " + "'SET key=value'. If you want to include special characters in key, " + "please use quotes, e.g., SET `ke y`=value." intercept("SET spark.sql.key value", expectedErrMsg) intercept("SET spark.sql.key 'value'", expectedErrMsg) intercept("SET spark.sql.key \"value\" ", expectedErrMsg) intercept("SET spark.sql.key value1 value2", expectedErrMsg) intercept("SET spark. sql.key=value", expectedErrMsg) intercept("SET spark :sql:key=value", expectedErrMsg) intercept("SET spark . sql.key=value", expectedErrMsg) intercept("SET spark.sql. key=value", expectedErrMsg) intercept("SET spark.sql :key=value", expectedErrMsg) intercept("SET spark.sql . key=value", expectedErrMsg) } test("Report Error for invalid usage of RESET command") { assertEqual("RESET", ResetCommand(None)) assertEqual("RESET spark.sql.key", ResetCommand(Some("spark.sql.key"))) assertEqual("RESET spark.sql.key ", ResetCommand(Some("spark.sql.key"))) assertEqual("RESET 1.2.key ", ResetCommand(Some("1.2.key"))) assertEqual("RESET spark.sql.3", ResetCommand(Some("spark.sql.3"))) assertEqual("RESET 1:2:key ", ResetCommand(Some("1:2:key"))) assertEqual("RESET spark:sql:3", ResetCommand(Some("spark:sql:3"))) assertEqual("RESET `spark.sql. key`", ResetCommand(Some("spark.sql. key"))) val expectedErrMsg = "Expected format is 'RESET' or 'RESET key'. " + "If you want to include special characters in key, " + "please use quotes, e.g., RESET `ke y`." intercept("RESET spark.sql.key1 key2", expectedErrMsg) intercept("RESET spark. sql.key1 key2", expectedErrMsg) intercept("RESET spark.sql.key1 key2 key3", expectedErrMsg) intercept("RESET spark: sql:key", expectedErrMsg) intercept("RESET spark .sql.key", expectedErrMsg) intercept("RESET spark : sql:key", expectedErrMsg) intercept("RESET spark.sql: key", expectedErrMsg) intercept("RESET spark.sql .key", expectedErrMsg) intercept("RESET spark.sql : key", expectedErrMsg) } test("refresh resource") { assertEqual("REFRESH prefix_path", RefreshResource("prefix_path")) assertEqual("REFRESH /", RefreshResource("/")) assertEqual("REFRESH /path///a", RefreshResource("/path///a")) assertEqual("REFRESH pat1h/112/_1a", RefreshResource("pat1h/112/_1a")) assertEqual("REFRESH pat1h/112/_1a/a-1", RefreshResource("pat1h/112/_1a/a-1")) assertEqual("REFRESH path-with-dash", RefreshResource("path-with-dash")) assertEqual("REFRESH \'path with space\'", RefreshResource("path with space")) assertEqual("REFRESH \"path with space 2\"", RefreshResource("path with space 2")) intercept("REFRESH a b", "REFRESH statements cannot contain") intercept("REFRESH a\tb", "REFRESH statements cannot contain") intercept("REFRESH a\nb", "REFRESH statements cannot contain") intercept("REFRESH a\rb", "REFRESH statements cannot contain") intercept("REFRESH a\r\nb", "REFRESH statements cannot contain") intercept("REFRESH @ $a$", "REFRESH statements cannot contain") intercept("REFRESH ", "Resource paths cannot be empty in REFRESH statements") intercept("REFRESH", "Resource paths cannot be empty in REFRESH statements") } private def createTableUsing( table: String, database: Option[String] = None, tableType: CatalogTableType = CatalogTableType.MANAGED, storage: CatalogStorageFormat = CatalogStorageFormat.empty, schema: StructType = new StructType, provider: Option[String] = Some("parquet"), partitionColumnNames: Seq[String] = Seq.empty, bucketSpec: Option[BucketSpec] = None, mode: SaveMode = SaveMode.ErrorIfExists, query: Option[LogicalPlan] = None): CreateTable = { CreateTable( CatalogTable( identifier = TableIdentifier(table, database), tableType = tableType, storage = storage, schema = schema, provider = provider, partitionColumnNames = partitionColumnNames, bucketSpec = bucketSpec ), mode, query ) } private def createTable( table: String, database: Option[String] = None, tableType: CatalogTableType = CatalogTableType.MANAGED, storage: CatalogStorageFormat = CatalogStorageFormat.empty.copy( inputFormat = HiveSerDe.sourceToSerDe("textfile").get.inputFormat, outputFormat = HiveSerDe.sourceToSerDe("textfile").get.outputFormat, serde = Some("org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe")), schema: StructType = new StructType, provider: Option[String] = Some("hive"), partitionColumnNames: Seq[String] = Seq.empty, comment: Option[String] = None, mode: SaveMode = SaveMode.ErrorIfExists, query: Option[LogicalPlan] = None): CreateTable = { CreateTable( CatalogTable( identifier = TableIdentifier(table, database), tableType = tableType, storage = storage, schema = schema, provider = provider, partitionColumnNames = partitionColumnNames, comment = comment ), mode, query ) } test("create table - schema") { assertEqual("CREATE TABLE my_tab(a INT COMMENT 'test', b STRING) STORED AS textfile", createTable( table = "my_tab", schema = (new StructType) .add("a", IntegerType, nullable = true, "test") .add("b", StringType) ) ) assertEqual("CREATE TABLE my_tab(a INT COMMENT 'test', b STRING) " + "PARTITIONED BY (c INT, d STRING COMMENT 'test2')", createTable( table = "my_tab", schema = (new StructType) .add("a", IntegerType, nullable = true, "test") .add("b", StringType) .add("c", IntegerType) .add("d", StringType, nullable = true, "test2"), partitionColumnNames = Seq("c", "d") ) ) assertEqual("CREATE TABLE my_tab(id BIGINT, nested STRUCT<col1: STRING,col2: INT>) " + "STORED AS textfile", createTable( table = "my_tab", schema = (new StructType) .add("id", LongType) .add("nested", (new StructType) .add("col1", StringType) .add("col2", IntegerType) ) ) ) // Partitioned by a StructType should be accepted by `SparkSqlParser` but will fail an analyze // rule in `AnalyzeCreateTable`. assertEqual("CREATE TABLE my_tab(a INT COMMENT 'test', b STRING) " + "PARTITIONED BY (nested STRUCT<col1: STRING,col2: INT>)", createTable( table = "my_tab", schema = (new StructType) .add("a", IntegerType, nullable = true, "test") .add("b", StringType) .add("nested", (new StructType) .add("col1", StringType) .add("col2", IntegerType) ), partitionColumnNames = Seq("nested") ) ) intercept("CREATE TABLE my_tab(a: INT COMMENT 'test', b: STRING)", "no viable alternative at input") } test("describe query") { val query = "SELECT * FROM t" assertEqual("DESCRIBE QUERY " + query, DescribeQueryCommand(query, parser.parsePlan(query))) assertEqual("DESCRIBE " + query, DescribeQueryCommand(query, parser.parsePlan(query))) } test("query organization") { // Test all valid combinations of order by/sort by/distribute by/cluster by/limit/windows val baseSql = "select * from t" val basePlan = Project(Seq(UnresolvedStar(None)), UnresolvedRelation(TableIdentifier("t"))) assertEqual(s"$baseSql distribute by a, b", RepartitionByExpression(UnresolvedAttribute("a") :: UnresolvedAttribute("b") :: Nil, basePlan, None)) assertEqual(s"$baseSql distribute by a sort by b", Sort(SortOrder(UnresolvedAttribute("b"), Ascending) :: Nil, global = false, RepartitionByExpression(UnresolvedAttribute("a") :: Nil, basePlan, None))) assertEqual(s"$baseSql cluster by a, b", Sort(SortOrder(UnresolvedAttribute("a"), Ascending) :: SortOrder(UnresolvedAttribute("b"), Ascending) :: Nil, global = false, RepartitionByExpression(UnresolvedAttribute("a") :: UnresolvedAttribute("b") :: Nil, basePlan, None))) } test("pipeline concatenation") { val concat = Concat( Concat(UnresolvedAttribute("a") :: UnresolvedAttribute("b") :: Nil) :: UnresolvedAttribute("c") :: Nil ) assertEqual( "SELECT a || b || c FROM t", Project(UnresolvedAlias(concat) :: Nil, UnresolvedRelation(TableIdentifier("t")))) } test("database and schema tokens are interchangeable") { assertEqual("CREATE DATABASE foo", parser.parsePlan("CREATE SCHEMA foo")) assertEqual("DROP DATABASE foo", parser.parsePlan("DROP SCHEMA foo")) assertEqual("ALTER DATABASE foo SET DBPROPERTIES ('x' = 'y')", parser.parsePlan("ALTER SCHEMA foo SET DBPROPERTIES ('x' = 'y')")) assertEqual("DESC DATABASE foo", parser.parsePlan("DESC SCHEMA foo")) } test("manage resources") { assertEqual("ADD FILE abc.txt", AddFileCommand("abc.txt")) assertEqual("ADD FILE 'abc.txt'", AddFileCommand("abc.txt")) assertEqual("ADD FILE \"/path/to/abc.txt\"", AddFileCommand("/path/to/abc.txt")) assertEqual("LIST FILE abc.txt", ListFilesCommand(Array("abc.txt"))) assertEqual("LIST FILE '/path//abc.txt'", ListFilesCommand(Array("/path//abc.txt"))) assertEqual("LIST FILE \"/path2/abc.txt\"", ListFilesCommand(Array("/path2/abc.txt"))) assertEqual("ADD JAR /path2/_2/abc.jar", AddJarCommand("/path2/_2/abc.jar")) assertEqual("ADD JAR '/test/path_2/jar/abc.jar'", AddJarCommand("/test/path_2/jar/abc.jar")) assertEqual("ADD JAR \"abc.jar\"", AddJarCommand("abc.jar")) assertEqual("LIST JAR /path-with-dash/abc.jar", ListJarsCommand(Array("/path-with-dash/abc.jar"))) assertEqual("LIST JAR 'abc.jar'", ListJarsCommand(Array("abc.jar"))) assertEqual("LIST JAR \"abc.jar\"", ListJarsCommand(Array("abc.jar"))) assertEqual("ADD FILE /path with space/abc.txt", AddFileCommand("/path with space/abc.txt")) assertEqual("ADD JAR /path with space/abc.jar", AddJarCommand("/path with space/abc.jar")) } test("SPARK-32608: script transform with row format delimit") { assertEqual( """ |SELECT TRANSFORM(a, b, c) | ROW FORMAT DELIMITED | FIELDS TERMINATED BY ',' | COLLECTION ITEMS TERMINATED BY '#' | MAP KEYS TERMINATED BY '@' | LINES TERMINATED BY '\n' | NULL DEFINED AS 'null' | USING 'cat' AS (a, b, c) | ROW FORMAT DELIMITED | FIELDS TERMINATED BY ',' | COLLECTION ITEMS TERMINATED BY '#' | MAP KEYS TERMINATED BY '@' | LINES TERMINATED BY '\n' | NULL DEFINED AS 'NULL' |FROM testData """.stripMargin, ScriptTransformation( Seq('a, 'b, 'c), "cat", Seq(AttributeReference("a", StringType)(), AttributeReference("b", StringType)(), AttributeReference("c", StringType)()), UnresolvedRelation(TableIdentifier("testData")), ScriptInputOutputSchema( Seq(("TOK_TABLEROWFORMATFIELD", ","), ("TOK_TABLEROWFORMATCOLLITEMS", "#"), ("TOK_TABLEROWFORMATMAPKEYS", "@"), ("TOK_TABLEROWFORMATNULL", "null"), ("TOK_TABLEROWFORMATLINES", "\n")), Seq(("TOK_TABLEROWFORMATFIELD", ","), ("TOK_TABLEROWFORMATCOLLITEMS", "#"), ("TOK_TABLEROWFORMATMAPKEYS", "@"), ("TOK_TABLEROWFORMATNULL", "NULL"), ("TOK_TABLEROWFORMATLINES", "\n")), None, None, List.empty, List.empty, None, None, false))) } test("SPARK-32607: Script Transformation ROW FORMAT DELIMITED" + " `TOK_TABLEROWFORMATLINES` only support '\\n'") { // test input format TOK_TABLEROWFORMATLINES intercept( s""" |SELECT TRANSFORM(a, b, c, d, e) | ROW FORMAT DELIMITED | FIELDS TERMINATED BY ',' | LINES TERMINATED BY '@' | NULL DEFINED AS 'null' | USING 'cat' AS (value) | ROW FORMAT DELIMITED | FIELDS TERMINATED BY '&' | LINES TERMINATED BY '\n' | NULL DEFINED AS 'NULL' |FROM v """.stripMargin, "LINES TERMINATED BY only supports newline '\\n' right now") // test output format TOK_TABLEROWFORMATLINES intercept( s""" |SELECT TRANSFORM(a, b, c, d, e) | ROW FORMAT DELIMITED | FIELDS TERMINATED BY ',' | LINES TERMINATED BY '\n' | NULL DEFINED AS 'null' | USING 'cat' AS (value) | ROW FORMAT DELIMITED | FIELDS TERMINATED BY '&' | LINES TERMINATED BY '@' | NULL DEFINED AS 'NULL' |FROM v """.stripMargin, "LINES TERMINATED BY only supports newline '\\n' right now") } }
{'content_hash': 'a3d442867e1a5a86f5794801ed78ac58', 'timestamp': '', 'source': 'github', 'line_count': 397, 'max_line_length': 134, 'avg_line_length': 43.66750629722922, 'alnum_prop': 0.6444393170281495, 'repo_name': 'wzhfy/spark', 'id': 'af9088003f3b02ed1ca2d0d6da7750c1477ff700', 'size': '18136', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'sql/core/src/test/scala/org/apache/spark/sql/execution/SparkSqlParserSuite.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '50609'}, {'name': 'Batchfile', 'bytes': '25763'}, {'name': 'C', 'bytes': '1493'}, {'name': 'CSS', 'bytes': '24294'}, {'name': 'Dockerfile', 'bytes': '9556'}, {'name': 'HTML', 'bytes': '40561'}, {'name': 'HiveQL', 'bytes': '1890746'}, {'name': 'Java', 'bytes': '4213400'}, {'name': 'JavaScript', 'bytes': '218161'}, {'name': 'Jupyter Notebook', 'bytes': '31865'}, {'name': 'Makefile', 'bytes': '1591'}, {'name': 'PLSQL', 'bytes': '7715'}, {'name': 'PLpgSQL', 'bytes': '389551'}, {'name': 'PowerShell', 'bytes': '3879'}, {'name': 'Python', 'bytes': '3330124'}, {'name': 'R', 'bytes': '1238296'}, {'name': 'Roff', 'bytes': '36740'}, {'name': 'SQLPL', 'bytes': '9325'}, {'name': 'Scala', 'bytes': '34437552'}, {'name': 'Shell', 'bytes': '219852'}, {'name': 'TSQL', 'bytes': '483581'}, {'name': 'Thrift', 'bytes': '67584'}, {'name': 'q', 'bytes': '79845'}]}
Param ( [parameter(mandatory=$true)][string]$rec_recordingID ) #region Webex Login $WebExSiteName = "WebexSiteName" $WebExSiteID = "WebexSiteID" $WebExPartnerID = "WebexPartnerID" $WebExServiceAccountName = "WebexAdminID" $WebExServiceAccountPassword = "Password" #endregion #region XML Request # XML Body Request $XML =[xml]"<?xml version=""1.0"" encoding=""UTF-8"" ?> <serv:message xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:serv=""http://www.webex.com/schemas/2002/06/service""> <header> <securityContext> <webExID>$WebExServiceAccountName</webExID> <password>$WebExServiceAccountPassword</password> <siteID>$WebExSiteID</siteID> <partnerID>$WebExPartnerID</partnerID> </securityContext> </header> <body> <bodyContent xsi:type=""java:com.webex.service.binding.ep.DelRecording""> <recordingID>$rec_recordingID</recordingID> </bodyContent> </body> </serv:message>" # WebEx XML API URL $URL = "https://$WebExSiteName/WBXService/XMLService" # Send WebRequest and save to URLResponse try { $URLResponse = Invoke-WebRequest -Uri $URL -Method Post -ContentType "text/xml" -TimeoutSec 120 -Body $XML } catch { Write-Host "Webex: Unable to send XML request" } #endregion #region XML Response $XMLResponse = [xml]$URLResponse if ($XMLResponse.ChildNodes.header.response.result -eq "SUCCESS"){ Write-Host "Webex Result: "$XMLResponse.ChildNodes.header.response.result Write-Host "Webex: Removed recording [$rec_recordingID]" } else { Write-Host "Webex Result: "$XMLResponse.ChildNodes.header.response.result } if ($XMLResponse.ChildNodes.header.response.reason) { Write-Host "Webex Reason: "$XMLResponse.ChildNodes.header.response.reason } #endregion
{'content_hash': '29d5313e16cdda84e171caa4c75b3268', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 114, 'avg_line_length': 33.69491525423729, 'alnum_prop': 0.6413480885311871, 'repo_name': 'tonylanglet/powershell-webex', 'id': '2fbe1c570e8015e2994a81fdfeede393fb377e60', 'size': '1990', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'github-webex_delrecording.ps1', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'PowerShell', 'bytes': '20373'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': '4534e4e093c8e5459782d82b5e72ea9e', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'b55273c1c05adcab2989f9256be5337c1416ad7c', 'size': '181', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Liliopsida/Poales/Cyperaceae/Carex/Carex divisa/ Syn. Carex bertolonii/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
/** * \file * Defines the ERROR class for constants definitions. * * \author Alessandro Antonello <[email protected]> * \date Agosto 26, 2013 * \since Simple Framework 2.5 * * \par License * Apache v2 License. */ package sf.lang; /** * \ingroup sf_lang * Declares all error constants used in this library. * This library doesn't throw exceptions. Instead, all possible failures are * returned in the form of error codes. Error codes are always less than zero * to differentiate them from others results. * * If the application needs to define its own set of error codes pay attention * to the limit value of #USER. Any error code defined outside this * library must be less than this value. *//* --------------------------------------------------------------------- */ public interface ERROR { public static final int SUCCESS = 0; /**< Means success or no error. */ public static final int FAILED = -1; /**< Failure. Usually a exception. */ public static final int ACCESS = -2; /**< Access denied. */ public static final int NODATA = -3; /**< Invalid data. */ public static final int CRC = -4; /**< Bad CRC. */ public static final int LENGTH = -5; /**< Invalid array length. */ public static final int WRITE = -6; /**< I/O write failure. */ public static final int READ = -7; /**< I/O read failure. */ public static final int IO = -8; /**< General I/O failure. */ public static final int INDEX = -9; /**< Invalid array index. */ public static final int PARM = -10; /**< Invalid argument. */ public static final int ABORTED = -11; /**< Operation aborted. */ public static final int NOTFOUND = -12; /**< Item not found. */ public static final int FULL = -13; /**< Not enough storage space. */ public static final int EOF = -14; /**< End of file found. */ public static final int NOMEM = -15; /**< Not enough memory. */ public static final int EXISTS = -16; /**< Item already exists. */ public static final int POINTER = -17; /**< Invalid pointer address. */ public static final int EXPIRED = -18; /**< Timeout interval expired. */ public static final int ACTIVE = -19; /**< Operation still active. */ public static final int CHARSET = -20; /**< Invalid character set. */ public static final int EXCEPTION = -21; /**< Unknown exception. */ public static final int PORT = -22; /**< Invalid port number. */ public static final int ADDR = -23; /**< Invalid address or URL. */ public static final int SPACE = -24; /**< Insufficient buffer space. */ public static final int NORSRC = -25; /**< Resource not found. */ public static final int RCFILE = -26; /**< Invalid resource file. */ public static final int NOCONN = -27; /**< Not connected. */ public static final int UNREACH = -28; /**< Unreachable network. */ public static final int RUNNING = -29; /**< Thread already running. */ public static final int CLOSED = -30; /**< Operation is closed. */ public static final int SERVER = -31; /**< An internal server error. */ public static final int FORMAT = -32; /**< Invalid format. */ public static final int REFUSED = -33; /**< Connection refused. */ public static final int VERSION = -34; /**< Wrong version number. */ public static final int UNRESOLVED = -35; /**< Unresolved address. */ public static final int HOST = -36; /**< Host is unreachable. */ public static final int USER = -1000; /**< Start of user space. */ } // vim:syntax=java.doxygen
{'content_hash': '5d9818017b1031903d218d0017e6deb8', 'timestamp': '', 'source': 'github', 'line_count': 66, 'max_line_length': 81, 'avg_line_length': 58.5, 'alnum_prop': 0.5832685832685832, 'repo_name': 'aantonello/simple-java', 'id': 'f93a4f7b0d7953b729083f589794f32055c54e26', 'size': '3861', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/sf/lang/ERROR.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '24133'}, {'name': 'Java', 'bytes': '133863'}, {'name': 'VimL', 'bytes': '1123'}]}