|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
| Class Summary | |
|---|---|
| AbstractEJBProxy | Generic EJB proxy for stateless session beans. |
| DefaultImplementationBuilderImpl | Implemenation of DefaultImplementationBuilder . |
| EJBProxyFactory | An implementation of ServiceImplementationFactory
that can create a proxy to a stateless session EJB. |
| EJBProxyParameters | Parameters for the EJBProxyFactory . |
| MethodInterceptorFactory | A service interceptor factory supporting the AOP Alliance MethodInterceptor interface. |
| NameLookupImpl | Standard implementation of the NameLookup
service interface. |
| PlaceholderFactory | Wrapper around DefaultImplementationBuilder that is used to
create default implementations of services. |
| RemoteExceptionCoordinatorImpl | Core implementation of RemoteExceptionCoordinator . |
| ServicePropertyFactory | Factory that dynamically exposes a property of another service. |
| ServicePropertyFactoryParameter | Parameter object used with ServicePropertyFactory . |
| SpringBeanFactoryHolderImpl | Simple holder of a BeanFactory . |
| SpringBeanParameter | Parameter to SpringLookupFactory , containing a (required)
bean name to obtain, and an (optional) bean factory. |
| SpringLookupFactory | Implementation of ServiceImplementationFactory that doesn't create
beans, but instead it looks them up inside a Spring
BeanFactory . |
| SpringObjectProvider | Implementation of ObjectProvider mapped to the "spring:"
prefix. |
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


{% extends "base-with-no-nav.html" %} {% block content %} {% include "_nav2.html" %}
Hello dear Author
to book with title: ..............


| org.bouncycastle.asn1.ASN1Boolean(boolean)
use getInstance(boolean) method.
|
| org.bouncycastle.crypto.AsymmetricCipherKeyPair(CipherParameters, CipherParameters)
use AsymmetricKeyParameter
|
| org.bouncycastle.asn1.x509.AttributeCertificate(ASN1Sequence)
use getInstance() method.
|
| org.bouncycastle.asn1.x509.AuthorityKeyIdentifier(SubjectPublicKeyInfo)
create the extension using org.bouncycastle.cert.X509ExtensionUtils
|
| org.bouncycastle.asn1.x509.AuthorityKeyIdentifier(SubjectPublicKeyInfo, GeneralNames, BigInteger)
create the extension using org.bouncycastle.cert.X509ExtensionUtils
|
| org.bouncycastle.crypto.macs.BlockCipherMac(BlockCipher)
use CBCBlockCipherMac
|
| org.bouncycastle.crypto.macs.BlockCipherMac(BlockCipher, int)
use CBCBlockCipherMac
|
| org.bouncycastle.asn1.x509.CertificateList(ASN1Sequence)
use getInstance() method.
|
| org.bouncycastle.asn1.pkcs.CertificationRequestInfo(ASN1Sequence)
use getInstance().
|
| org.bouncycastle.asn1.pkcs.CertificationRequestInfo(X509Name, SubjectPublicKeyInfo, ASN1Set)
use X500Name method.
|
| org.bouncycastle.asn1.cmp.CMPCertificate(AttributeCertificate)
use (type. otherCert) constructor
|
| org.bouncycastle.asn1.cms.ContentInfo(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.math.ec.custom.djb.Curve25519Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.djb.Curve25519Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.asn1.DERBoolean(boolean)
use getInstance(boolean) method.
|
| org.bouncycastle.asn1.DEREncodableVector()
use ASN1EncodableVector instead.
|
| org.bouncycastle.asn1.DEREnumerated(BigInteger)
use ASN1Enumerated
|
| org.bouncycastle.asn1.DEREnumerated(int)
use ASN1Enumerated
|
| org.bouncycastle.asn1.DERNull()
use DERNull.INSTANCE
|
| org.bouncycastle.math.ec.ECFieldElement.F2m(int, int, BigInteger)
Use ECCurve.fromBigInteger to construct field elements
|
| org.bouncycastle.math.ec.ECFieldElement.F2m(int, int, int, int, BigInteger)
Use ECCurve.fromBigInteger to construct field elements
|
| org.bouncycastle.math.ec.ECFieldElement.Fp(BigInteger, BigInteger)
Use ECCurve.fromBigInteger to construct field elements
|
| org.bouncycastle.math.ec.ECPoint.F2m(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.ECPoint.F2m(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.ECPoint.Fp(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.ECPoint.Fp(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.asn1.sec.ECPrivateKey(BigInteger)
use constructor which takes orderBitLength to guarantee correct encoding.
|
| org.bouncycastle.asn1.sec.ECPrivateKey(BigInteger, ASN1Encodable)
use constructor which takes orderBitLength to guarantee correct encoding.
|
| org.bouncycastle.asn1.sec.ECPrivateKey(BigInteger, DERBitString, ASN1Encodable)
use constructor which takes orderBitLength to guarantee correct encoding.
|
| org.bouncycastle.asn1.cms.EnvelopedData(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.x509.ExtendedKeyUsage(Vector)
use KeyPurposeId[] constructor.
|
| org.bouncycastle.asn1.x509.GeneralName(X509Name)
use X500Name constructor.
|
| org.bouncycastle.asn1.cryptopro.GOST28147Parameters(ASN1Sequence)
use the getInstance() method. This constructor will vanish!
|
| org.bouncycastle.jce.spec.GOST28147ParameterSpec(byte[]) |
| org.bouncycastle.jce.spec.GOST28147ParameterSpec(byte[], byte[]) |
| org.bouncycastle.jce.spec.GOST28147ParameterSpec(String) |
| org.bouncycastle.jce.spec.GOST28147ParameterSpec(String, byte[]) |
| org.bouncycastle.asn1.cryptopro.GOST3410PublicKeyAlgParameters(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.cms.IssuerAndSerialNumber(ASN1Sequence)
use getInstance() method.
|
| org.bouncycastle.asn1.cms.IssuerAndSerialNumber(X509CertificateStructure)
use constructor taking Certificate
|
| org.bouncycastle.asn1.cms.IssuerAndSerialNumber(X509Name, ASN1Integer)
use X500Name constructor
|
| org.bouncycastle.asn1.cms.IssuerAndSerialNumber(X509Name, BigInteger)
use X500Name constructor
|
| org.bouncycastle.asn1.cms.KeyAgreeRecipientInfo(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.x509.KeyPurposeId(String)
use getInstance and an OID or one of the constants above.
|
| org.bouncycastle.asn1.cms.KeyTransRecipientInfo(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.crypto.macs.OldHMac(Digest)
uses incorrect pad for SHA-512 and SHA-384 use HMac.
|
| org.bouncycastle.asn1.cms.OriginatorIdentifierOrKey(ASN1OctetString)
use version taking a SubjectKeyIdentifier
|
| org.bouncycastle.asn1.cms.OriginatorIdentifierOrKey(ASN1Primitive)
use more specific version
|
| org.bouncycastle.asn1.cms.OriginatorPublicKey(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.cms.OtherKeyAttribute(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.cms.OtherRecipientInfo(ASN1Sequence)
use getInstance().
|
| org.bouncycastle.asn1.cms.PasswordRecipientInfo(ASN1Sequence)
use getInstance() method.
|
| org.bouncycastle.asn1.x509.PolicyMappings(Hashtable)
use CertPolicyId constructors.
|
| org.bouncycastle.asn1.x509.PolicyQualifierInfo(ASN1Sequence)
use PolicyQualifierInfo.getInstance()
|
| org.bouncycastle.asn1.pkcs.PrivateKeyInfo(ASN1Sequence)
use PrivateKeyInfo.getInstance()
|
| org.bouncycastle.asn1.cms.RecipientKeyIdentifier(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.ocsp.ResponseBytes(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.asn1.ocsp.ResponseData(ResponderID, ASN1GeneralizedTime, ASN1Sequence, X509Extensions)
use method taking Extensions
|
| org.bouncycastle.asn1.cmp.RevDetails(CertTemplate, X509Extensions)
use method taking Extensions
|
| org.bouncycastle.asn1.pkcs.RSAESOAEPparams(ASN1Sequence)
use getInstance()
|
| org.bouncycastle.math.ec.custom.sec.SecP128R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP128R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP160K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP160K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP160R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP160R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP160R2Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP160R2Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP192K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP192K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP192R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP192R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP224K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP224K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP224R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP224R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP256K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP256K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP256R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP256R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP384R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP384R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecP521R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecP521R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT113R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT113R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT113R2Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT113R2Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT131R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT131R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT131R2Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT131R2Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT163K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT163K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT163R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT163R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT163R2Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT163R2Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT193R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT193R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT193R2Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT193R2Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT233K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT233K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT233R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT233R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT239K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT239K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT283K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT283K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT283R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT283R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT409K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT409K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT409R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT409R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT571K1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT571K1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.math.ec.custom.sec.SecT571R1Point(ECCurve, ECFieldElement, ECFieldElement)
Use ECCurve.createPoint to construct points
|
| org.bouncycastle.math.ec.custom.sec.SecT571R1Point(ECCurve, ECFieldElement, ECFieldElement, boolean)
|
| org.bouncycastle.asn1.cms.SignerInfo(ASN1Sequence)
use getInstance() method.
|
| org.bouncycastle.asn1.ocsp.SingleResponse(CertID, CertStatus, ASN1GeneralizedTime, ASN1GeneralizedTime, X509Extensions)
use method taking ASN1GeneralizedTime and Extensions
|
| org.bouncycastle.asn1.x509.SubjectPublicKeyInfo(ASN1Sequence)
use SubjectPublicKeyInfo.getInstance()
|
| org.bouncycastle.asn1.ocsp.TBSRequest(GeneralName, ASN1Sequence, X509Extensions)
use method taking Extensions
|
| org.bouncycastle.asn1.cms.Time(ASN1Primitive)
use getInstance()
|
| org.bouncycastle.crypto.tls.TlsSRPKeyExchange(int, Vector, byte[], byte[])
Use constructor taking an explicit 'groupVerifier' argument
|
| org.bouncycastle.asn1.x509.V2Form(ASN1Sequence)
use getInstance().
|
| org.bouncycastle.asn1.x500.X500Name(X500NameStyle, X500Name)
use the getInstance() method that takes a style.
|
| org.bouncycastle.asn1.x509.X509Extensions(Vector, Hashtable)
use Extensions
|
| org.bouncycastle.asn1.x509.X509Extensions(Vector, Vector)
use Extensions
|
| org.bouncycastle.asn1.x509.X509Name(ASN1Sequence)
use X500Name.getInstance()
|
| org.bouncycastle.asn1.x509.X509Name(boolean, Hashtable, String)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(boolean, String)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(boolean, String, X509NameEntryConverter)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(Hashtable)
use an ordered constructor! The hashtable ordering is rarely correct
|
| org.bouncycastle.asn1.x509.X509Name(String)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(String, X509NameEntryConverter)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(Vector, Hashtable, X509NameEntryConverter)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(Vector, Vector)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x509.X509Name(Vector, Vector, X509NameEntryConverter)
use X500Name, X500NameBuilder
|
| org.bouncycastle.asn1.x9.X962Parameters(ASN1Primitive)
use getInstance()
|


checkWeatherCondition
Remember where I live
28°
Lagos, NG
C°
Clear Skies
Clear Skies
Feels like
29832
Humidity
29832
Pressure
29832
Min temp
29832
Max temp
29832


Build 2fafff1d46fc5010
Results:
Internal Failure
Task timed outInfraFailure bot_update
Execution:
- Source: Task 2fafff1d46fc5010
- Bot: vm517-m4
Steps and Logfiles:
-
recipe bootstrap ( 3 hrs )
-
setup_build ( 109 ms )running recipe: "infra_repo_trybot"
-
bot_update ( 3 hrs )
Build Properties:
| Name | Value | Source |
|---|---|---|
| Exit Code | -1 | Swarming |
| allow_milo | 1 | Swarming Tags |
Timing:
| Start | Tuesday, 28-Jun-16 13:23:16 UTC |
| End | Tuesday, 28-Jun-16 16:24:03 UTC |
| Elapsed | 3 hrs |


Before Change
// Define cost function based on which one was selected via set_loss_function
if self._loss_fn == "softmax cross entropy":
sf_logits = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=xx, labels=tf.argmax(y, 1))
self._graph_ops["cost"] = tf.add(tf.reduce_mean(tf.concat([sf_logits], axis=0)), l2_cost)
// For classification problems, we will compute the training accuracy as well; this is also used
// for Tensorboard
self.__class_predictions = tf.argmax(tf.nn.softmax(xx), 1)
After Change
self._add_layers_to_graph()
// Do the forward pass and training output calcs on possibly multiple GPUs
device_costs = []
device_accuracies = []
device_gradients = []
device_variables = []
for n, d in enumerate(self._get_device_list()): // Build a graph on either a CPU or all of the GPUs
with tf.device(d), tf.name_scope("tower_" + str(n)):
// Run the network operations
if self._has_moderation:
xx = self.forward_pass(x, deterministic=False, moderation_features=mod_w)
else:
xx = self.forward_pass(x, deterministic=False)
// Define regularization cost
self._log("Graph: Calculating loss and gradients...")
if self._reg_coeff is not None:
l2_cost = tf.squeeze(tf.reduce_sum(
[layer.regularization_coefficient * tf.nn.l2_loss(layer.weights) for layer in self._layers
if isinstance(layer, layers.fullyConnectedLayer)]))
else:
l2_cost = 0.0
// Define cost function based on which one was selected via set_loss_function
if self._loss_fn == "softmax cross entropy":
sf_logits = tf.nn.sparse_softmax_cross_entropy_with_logits(logits=xx, labels=tf.argmax(y, 1))
gpu_cost = tf.reduce_mean(tf.concat([sf_logits], axis=0)) + l2_cost
cost_sum = tf.reduce_sum(tf.concat([sf_logits], axis=0))
device_costs.append(cost_sum)
// self._graph_ops["cost"] = tf.add(tf.reduce_mean(tf.concat([sf_logits], axis=0)), l2_cost)
// For classification problems, we will compute the training accuracy as well; this is also used
// for Tensorboard
self.__class_predictions = tf.argmax(tf.nn.softmax(xx), 1)
correct_predictions = tf.equal(self.__class_predictions, tf.argmax(y, 1))
accuracy_sum = tf.reduce_sum(tf.cast(correct_predictions, tf.float32))
device_accuracies.append(accuracy_sum)
// self._graph_ops["accuracy"] = tf.reduce_mean(tf.cast(correct_predictions, tf.float32))
// Set the optimizer and get the gradients from it
gradients, variables, global_grad_norm = self._graph_get_gradients(gpu_cost, optimizer)
device_gradients.append(gradients)
device_variables.append(variables)
// Average the gradients from each GPU and apply them
average_gradients = self._graph_average_gradients(device_gradients)
opt_variables = device_variables[0]
self._graph_ops["optimizer"] = self._graph_apply_gradients(average_gradients, opt_variables, optimizer)
// Average the costs and accuracies from each GPU
self._graph_ops["cost"] = tf.reduce_sum(device_costs) / self._batch_size + l2_cost
self._graph_ops["accuracy"] = tf.reduce_sum(device_accuracies) / self._batch_size
// Calculate test and validation accuracy (on a single device)


Police: 2 people killed, another wounded in Cleveland
by EndPlayCLEVELAND (AP) - Cleveland police say two people have been killed and another person has been wounded in a shooting on the city's west side.
Police spokeswoman Sgt. Jennifer Ciaccia (CHAWCH') says all three victims were found shot in the head early Saturday.
Two males were pronounced dead at the scene. A female has been hospitalized. Her condition isn't known.
The shooting follows one Thursday afternoon at an abandoned home on the city's east side that killed a 16-year-old boy and a male whose age hasn't been made public. A 17-year-old boy was hospitalized with gunshot wounds.
Police haven't released additional details about either shooting.


Sprite Editor
Click and drag to draw.
Right-click and drag to erase.
Right-click and drag to erase.
Audio Editor
Enter a pattern of 16 bytes:Duration (1/60ths of a second):
Waveform Blending
Combine this waveform with the one above.Tone Generator
Freq. (Hz): Cutoff:
| 1 | 2 | 3 | C |
| 4 | 5 | 6 | D |
| 7 | 8 | 9 | E |
| A | 0 | B | F |
Open .ch8 Binary
Note that decompilation can be slow.Select a file to read into the text area below as a byte array. The byte array can then be pasted into an editor and decompiled with the "Octo: Decompile" command:
Copied!
File Output
register display.
stack display.


Conduct various innovation and entrepreneurship-related activities prescribed by Central MIC in time bound fashion.
Identify and reward innovations and share success stories.
Organize periodic workshops/ seminars/ interactions with entrepreneurs, investors, professionals and create a mentor pool for student innovators.
Network with peers and national entrepreneurship development organizations.
Create an Institution’s Innovation portal to highlight innovative projects carried out by institution’s faculty and students.
Organize Hackathons, idea competition, mini-challenges etc. with the involvement of industries.
VISIT


FlexLayout adds a nice Swift interface to the highly optimized Yoga flexbox implementation. Concise, intuitive & chainable syntax.
Flexbox is an incredible improvement over UIStackView. It is simpler to use, much more versatile and amazingly performant.
Yoga is a multiplatform CSS Flexbox implementation (iOS/Android/…). Yoga is also the layout engine of React Native.
Requirements
- iOS 9.0+
- Xcode 8.0+ / Xcode 9.0
- Swift 3.0+ / Swift 4.0
Content
- Introduction examples
- FlexLayout principles and philosophy
- Performance
- Documentation
- API Documentation
- Examples App
- FAQ
- Comments, ideas, suggestions, issues, ….
- Installation
:pushpin: FlexLayout is actively updated. So please come often to see latest changes. You can also Star it to be able to retrieve it easily later.
FlexLayout + PinLayout
FlexLayout is a companion of PinLayout. They share a similar syntax and method names. PinLayout is a layout framework greatly inspired by CSS absolute positioning, it is particularly useful for greater fine control and animations. It gives you full control by layouting one view at a time (simple to code and debug).
- A view can be layouted using FlexLayout, PinLayout, or both!
- PinLayout can layout anything, but in situations where you need to layout many views but don’t require PinLayout’s finest control nor complex animations, FlexLayout is best fitted.
- A view layouted using PinLayout can be embedded inside a FlexLayout’s container and reversely. You choose the best layout framework for your situation.
FlexLayout Introduction examples
Example 1:
This example will layout multiples views using column and row flexbox containers.
Two steps to use a flexbox container:
- Setup the container: Initialize your flexbox structure. Note that it is also possible to alter it later.
- Layout the container: The layout of the container should be done from
layoutSubviews()
(orwillTransition(to: UITraitCollection, ...)
andviewWillTransition(to: CGSize, ...)
).- First you must layout the flexbox container, i.e. position it and optionally set its size.
- Then layout the flexbox children using Flex method
layout()
.
fileprivate let rootFlexContainer = UIView()
init() {
super.init(frame: .zero)
addSubview(rootFlexContainer)
...
// Column container
rootFlexContainer.flex.direction(.column).padding(12).define { (flex) in
// Row container
flex.addItem().direction(.row).define { (flex) in
flex.addItem(imageView).width(100).aspectRatio(of: imageView)
// Column container
flex.addItem().direction(.column).paddingLeft(12).grow(1).define { (flex) in
flex.addItem(segmentedControl).marginBottom(12).grow(1)
flex.addItem(label)
}
}
flex.addItem().height(1).marginTop(12).backgroundColor(.lightGray)
flex.addItem(bottomLabel).marginTop(12)
}
}
override func layoutSubviews() {
super.layoutSubviews()
// 1) Layout the flex container. This example use PinLayout for that purpose, but it could be done
// also by setting the rootFlexContainer's frame:
// rootFlexContainer.frame = CGRect(x: 0, y: topLayoutGuide,
// width: frame.width, height: rootFlexContainer.height)
rootFlexContainer.pin.top().left().width(100%).marginTop(topLayoutGuide)
// 2) Then let the flexbox container layout itself. Here the container's height will be adjusted automatically.
rootFlexContainer.flex.layout(mode: .adjustHeight)
}
:pushpin: This example is available in the Examples App. See complete source code
Example 2:
The example implements the Ray Wenderlich Yoga Tutorial screen using FlexLayout.
init() {
...
rootFlexContainer.flex.define { (flex) in
// Image
flex.addItem(episodeImageView).grow(1).backgroundColor(.gray)
// Summary row
flex.addItem().direction(.row).padding(padding).define({ (flex) in
flex.addItem(summaryPopularityLabel).grow(1)
flex.addItem().direction(.row).justifyContent(.spaceBetween).grow(2).define({ (flex) in
flex.addItem(yearLabel)
flex.addItem(ratingLabel)
flex.addItem(lengthLabel)
})
flex.addItem().width(100).height(1).grow(1)
})
// Title row
flex.addItem().direction(.row).padding(padding).define({ (flex) in
flex.addItem(episodeIdLabel)
flex.addItem(episodeTitleLabel).marginLeft(20)
})
// Description section
flex.addItem().paddingHorizontal(paddingHorizontal).define({ (flex) in
flex.addItem(descriptionLabel)
flex.addItem(castLabel)
flex.addItem(creatorsLabel)
})
// Action row
flex.addItem().direction(.row).padding(padding).define({ (flex) in
flex.addItem(addActionView)
flex.addItem(shareActionView)
})
// Tabs row
flex.addItem().direction(.row).padding(padding).define({ (flex) in
flex.addItem(episodesTabView)
flex.addItem(moreTabView)
})
// Shows TableView
flex.addItem(showsTableView).grow(1)
}
}
override func layoutSubviews() {
super.layoutSubviews()
// 1) Layout the contentView & rootFlexContainer using PinLayout
contentView.pin.top().bottom().left().right()
rootFlexContainer.pin.top().left().right()
// 2) Let the flexbox container layout itself and adjust the height
rootFlexContainer.flex.layout(mode: .adjustHeight)
// 3) Adjust the scrollview contentSize
contentView.contentSize = rootFlexContainer.frame.size
}
:pushpin: This example is available in the Examples App. See complete source code
FlexLayout principles and philosophy
- Flexbox layouting is simple, powerful and fast.
- FlexLayout syntax is concise and chainable.
- FlexLayout/yoga is incredibly fast, it’s even faster than manual layout. See Performance.
- The source code structure matches the flexbox structure, making it easier to understand and modify. Flex containers are defined on one line, and its items (children) are imbricated. This makes the flexbox structure much more visual and easy to understand.
- Supports left-to-right (LTR) and right-to-left (RTL) languages.
NOTE: FlexLayout wraps facebook/yoga implementation and expose all its features. So note that on this documentation we will refer to FlexLayout, but this also applies to Yoga.
FlexLayout’s Performance
FlexLayout’s performance has been measured using the Layout Framework Benchmark. FlexLayout and PinLayout has been added to this benchmark to compare their performance.
As you can see in the following chart, FlexLayout and PinLayout’s performance are faster or equal to manual layouting. FlexLayout is between 8x and 11x faster than auto layout and PinLayout between 12x and 16x faster than auto layout, and this for all types of iPhone (5/6/6S/7)
These results also mean that FlexLayout and PinLayout are by far faster than any layout frameworks built over auto layout.
See here more complete details, results and explanation of the benchmark.
Tested on a iPhone 7 iOS 10.3.2
Variation from CSS flexbox
In many CSS methods and properties name, the keyword
flex
was added to control name conflicts. FlexLayout removed this keyword for being more concise and removed this unecessary keyword:FlexLayout Name CSS Name React Native Name direction
flex-direction
flexDirection
wrap
flex-wrap
flexWrap
grow
flex-grow
flexGrow
shrink
flex-shrink
flexShrink
basis
flex-basis
flexBasis
start
flex-start
flexStart
end
flex-end
flexEnd
FlexLayout default properties are sligthly different from CSS flexbox. This table resume these difference:
Property FlexLayout default value CSS default value React Native default value direction
column row column justifyContent
start start start alignItems
stretch stretch stretch alignSelf
auto auto auto alignContent
start stretch start grow
0 0 0 shrink
0 1 0 basis
0 auto 0 wrap
noWrap nowrap noWrap FlexLayout additions:
- addItem()
- define()
- layout()
- isIncludedInLayout()
- markDirty()
- intrinsicSize
- sizeThatFits()
NOTE: FlexLayout doesn’t support the flexbox order
property. The order is determined by the flex container’s UIView.subviews
array.
Documentation
Flexbox is pretty easy and straightforward to use. The defining aspect of the flexbox is the ability to alter its items, width, height to best fill the available space on any display device. A flex container expands its items to fill the available free space or shrinks them to prevent overflow.
The flex layout is constituted of parent container referred as flex container and its immediate children which are called flex items. A flex item can also be a flex container, i.e. it is possible to add other flex items to it.
| Flexbox term | Definition |
|---|---|
main-axis |
The main axis of a flex container is the primary axis along which flex items are laid out. The main-axis direction is set using the direction() property. |
cross-axis |
The axis perpendicular to the main axis is called the cross axis. Its direction depends on the main axis direction |
In the following sections we will see:
- How to create, modify and defines flex containers and items.
- Flexbox container’s properties
- Flexbox item’s properties
:pushpin: This document is a guide that explains how to use FlexLayout. You can also checks the FlexLayout’s API documentation.
1. Creation, modification and definition of flexbox items
addItem(:UIView)
- Applies to:
flex containers
Method:
addItem(_: UIView) -> Flex
This method adds a flex item (UIView) to a flex container. Internally this method adds the UIView as a subview and enables flexbox.
Usage examples:
view.flex.addItem(imageView).width(100).aspectRatio(1)
addItem()
- Applies to:
flex containers
Method:
addItem() -> Flex
This method is similar toaddItem(: UIView)
except that it also creates the flex item’s UIView. Internally the method creates a UIView, adds it as a subview and enables flexbox. This is useful to add a flex item/container easily when you don’t need to refer to it later.
Usage examples:
view.flex.addItem().direction(.row).padding(10)
define()
- Applies to:
flex containers
Method:
define(_ closure: (_ flex: Flex) -> Void)
This method is used to structure your code so that it matches the flexbox structure. The method has a closure parameter with a single parameter calledflex
. This parameter is in fact the view’s flex interface. It can be used to adds other flex items and containers.
Usage examples:
view.flex.addItem().define { (flex) in
flex.addItem(imageView).grow(1)
flex.addItem().direction(.row).define { (flex) in
flex.addItem(titleLabel).grow(1)
flex.addItem(priceLabel)
}
}
The same results can also be obtained without using the define()
method, but the result is not as elegant:
let columnContainer = UIView()
columnContainer.flex.addItem(imageView).grow(1)
view.flex.addItem(columnContainer)
let rowContainer = UIView()
rowContainer.flex.direction(.row)
rowContainer.flex.addItem(titleLabel).grow(1)
rowContainer.flex.addItem(priceLabel)
columnContainer.flex.addItem(rowContainer)
Advantages of using define()
:
- The source code structure matches the flexbox structure, making it easier to understand and modify.
- Changing a flex item order, it’s just moving up/down its line/block that defines it.
- Moving a flex item from one container to another is just moving line/block that defines it.
- The structure looks more similar to how HTML and React Native defines it.
- Inside the
define
‘s closure, you can do whatever you want to fill the flexbox container. You can usefor
loops, iterate arrays of data, call functions, …
Accessing flex item’s UIView
It is possible to access the flex items’s UIView using flex.view
. This is particularly usefull when using flex.define()
method.
Example:
This example creates a flexbox container and sets its alpha to 0.8.
flex.createBox().direction(.row).padding(20).alignItems(.center).define({ (flex) in
flex.createBox().width(50).height(50).define({ (flex) in
flex.view.alpha = 0.8
}}
})
Another possible solution:
flex.createBox().direction(.row).padding(20).alignItems(.center).define({ (flex) in
let container = UIView()
container.alpha = 0.8
flex.addChild(container).width(50).height(50)
})
layout()
- Applies to:
flex containers
- Values:
fitContainer
/adjustWidth
/adjustHeight
- Default value:
fitContainer
Method:
layout(mode: LayoutMode = . fitContainer)
The method will layout the flex container’s children.
Layout modes:
fitContainer
: This is the default mode when no parameter is specified. Children are layouted inside the container’s size (width and height).adjustHeight
: In this mode, children are layouted using only the container’s width. The container’s height will be adjusted to fit the flexbox’s childrenadjustWidth
: In this mode, children are layouted using only the container’s height. The container’s width will be adjusted to fit the flexbox’s children
Usage examples:
rootFlexContainer.flex.layout(mode: .adjustHeight)
2. Flexbox containers properties
This section describes all flex container’s properties.
direction()
- Applies to:
flex containers
- Values:
column
/columnReverse
/row
/rowReverse
- Default value:
column
- CSS name:
flex-direction
Method:
direction(_: Direction)
Thedirection
property establishes the main-axis, thus defining the direction flex items are placed in the flex container.
The direction
property specifies how flex items are laid out in the flex container, by setting the direction of the flex container’s main axis. They can be laid out in two main directions, like columns vertically or like rows horizontally.
Note that row and row-reverse are affected by the layout direction (see layoutDirection
property) of the flex container. If its text direction is LTR (left to right), row represents the horizontal axis oriented from left to right, and row-reverse from right to left; if the direction is rtl, it’s the opposite.
| Value | Result | Description |
|---|---|---|
| column (default) | Top to bottom | |
| columnReverse | Bottom to top | |
| row | Same as text direction | |
| rowReverse | opposite to text direction |
Usage examples:
view.flex.direction(.column) // Not required, defaut value.
view.flex.direction(.row)
Example 1:
This example center three views of 40 pixels tall with a padding of 10 pixels.
Example source code
rootFlexContainer.flex.justifyContent(.center).padding(10).define { (flex) in
flex.addItem(button1).height(40).marginTop(10)
flex.addItem(button2).height(40).marginTop(10)
flex.addItem(button3).height(40).marginTop(10)
}
justifyContent()
- Applies to:
flex containers
- Values:
start
/end
/center
/spaceBetween
/spaceAround
- Default value:
start
- CSS name:
justify-content
Method:
justifyContent(_: JustifyContent)
ThejustifyContent
property defines the alignment along the main-axis of the current line of the flex container. It helps distribute extra free space leftover when either all the flex items on a line have reached their maximum size. For example, if children are flowing vertically,justifyContent
controls how they align vertically.
| direction(.column) | direction(.row) | ||
|---|---|---|---|
| start (default) | Items are packed at the beginning of the main-axis. | ||
| end | Items are packed at the end of the main-axis. | ||
| center | items are centered along the main-axis. | ||
| spaceBetween | Items are evenly distributed in the main-axis; first item is at the beginning, last item at the end. | ||
| spaceAround | Items are evenly distributed in the main-axis with equal space around them. |
Usage examples:
view.flex.justifyContent(.start) // defaut value.
view.flex.justifyContent(.center)
alignItems()
- Applies to:
flex containers
- Values:
stretch
/start
/end
/center
/baseline
- Default value:
stretch
- CSS name:
align-items
Method:
alignItems(_: AlignItems)
ThealignItems
property defines how flex items are laid out along the cross axis on the current line. Similar tojustifyContent
but for the cross-axis (perpendicular to the main-axis). For example, if children are flowing vertically,alignItems
controls how they align horizontally.
| direction(.column) | direction(.row) | |
|---|---|---|
| stretch (default) | ||
| start | ||
| end | ||
| center | ||
| baseline |
alignSelf()
- Applies to:
flex containers
- Values:
auto
/stretch
/start
/end
/center
/baseline
- Default value:
auto
- CSS name:
align-self
Method:
alignSelf(_: AlignSelf)
ThealignSelf
property controls how a child aligns in the cross direction, overriding thealignItems
of the parent. For example, if children are flowing vertically,alignSelf
will control how the flex item will align horizontally.
The auto
value means use the flex container alignItems
property. See alignItems
for documentation of the other values.
wrap()
- Applies to:
flex containers
- Values:
noWrap
/wrap
/wrapReverse
- Default value:
noWrap
- CSS name:
flex-wrap
Method:
wrap(_: Wrap)
Thewrap
property controls whether the flex container is single-lined or multi-lined, and the direction of the cross-axis, which determines the direction in which the new lines are stacked in.
By default, the flex container fits all flex items into one line. Using this property we can change that. We can tell the container to lay out its items in single or multiple lines, and the direction the new lines are stacked in
Reminder: the cross axis is the axis perpendicular to the main axis. Its direction depends on the main axis direction.
| direction(.column) | direction(.row) | Description | |
|---|---|---|---|
| noWrap (default) | Single-line which may cause the container to overflow. NEW: Flex items are displayed in one row and by default they are shrunk to fit the flex container’s width | ||
| wrap | Multi-lines, direction is defined by direction() . NEW: Flex items are displayed in multiple rows if needed from left-to-right and top-to-bottom |
||
| wrapReverse | Multi-lines, opposite to direction defined by direction() . NEW: Flex items are displayed in multiple rows if needed from left-to-right and bottom-to-top |
Usage examples:
view.flex.wrap(.nowrap) // Not required, defaut value.
view.flex.wrap(.wrap)
alignContent()
- Applies to:
flex containers
- Values:
start
/end
/center
/stretch
/spaceBetween
/spaceAround
- Default value:
start
- CSS name:
align-content
Method:
alignContent(_: AlignContent)
The align-content property aligns a flex container’s lines within the flex container when there is extra space in the cross-axis, similar to how justifyContent aligns individual items within the main-axis.
Note, alignContent
has no effect when the flexbox has only a single line.
| direction(.column) | direction(.row) | |
|---|---|---|
| start (default) | ||
| end | ||
| center | ||
| stretch | ||
| spaceBetween | ||
| spaceAround |
layoutDirection()
FlexLayout supports left-to-right (LTR) and right-to-left (RTL) languages.
Using start
or end
properties, you can position views without having to think about whether your item will show up on the left or the right side of the screen (depending on the person’s language
Method:
layoutDirection(_: LayoutDirection)
ThelayoutDirection
property controls the flex container layout direction.
Values:
.inherit
Direction defaults to Inherit on all nodes except the root which defaults to LTR. It is up to you to detect the user’s preferred direction (most platforms have a standard way of doing this) and setting this direction on the root of your layout tree..ltr
: Layout views from left to right. (Default).rtl
: Layout views from right to left.
3. Flexbox items properties
This section describe all flex items’s properties.
:pushpin: Remembers that flex containers are also flex items, so all these properties also apply to containers.
grow
- Applies to:
flex items
- Default value: 0
- CSS name:
flex-grow
Method:
grow(_: CGFloat)
Thegrow
property defines the ability for a flex item to grow if necessary. It accepts a unitless value that serves as a proportion. It dictates what amount of the available space inside the flex container the item should take up.
A grow value of 0 (default value) keeps the view’s size in the main-axis direction. If you want the view to use the available space set a grow value > 0.
For example, if all items have grow
set to 1, every child will set to an equal size inside the container. If you were to give one of the children a value of 2, that child would take up twice as much space as the others.
shrink
- Applies to:
flex items
- Default value: 0
- CSS name:
flex-shrink
Method:
shrink(_: CGFloat)
It specifies theflex shrink factor
, which determines how much the flex item will shrink relative to the rest of the flex items in the flex container when there isn’t enough space on the main-axis.
When omitted, it is set to 0 and the flex shrink factor is multiplied by the flex basis
when distributing negative space.
A shrink value of 0 keeps the view’s size in the main-axis direction. Note that this may cause the view to overflow its flex container.
Shrink is about proportions. If an item has a shrink of 3, and the rest have a shrink of 1, the item will shrink 3x as fast as the rest.
basis
- Applies to:
flex items
- Default value: 0
- CSS name:
flex-basis
Method:
basis(_ : CGFloat?)
This property takes the same values as the width and height properties, and specifies the initial size of the flex item, before free space is distributed according to the grow and shrink factors.
Specifying nil
set the basis as auto
, which means the length is equal to the length of the item. If the item has no length specified, the length will be according to its content
isIncludedInLayout()
- Applies to:
flex items
Method:
isIncludedInLayout(_ value: Bool)
This property controls dynamically if a flexbox’s UIView is included or not in the flexbox layouting. When a flexbox’s UIView is excluded, FlexLayout won’t layout the view and its children views.
FlexLayout automatically includes the UIView when:
- The first time
UIView.flex
property is accessed - When a child view is added to a flexbox container using
addItem(:UIView)
oraddItem()
markDirty()
- Applies to:
flex items
Method:
markDirty()
The framework is so highly optimized, that flex item are layouted only when a flex property is changed and when flex container size change. In the event that you want to force FlexLayout to do a layout of a flex item, you can mark it as dirty usingmarkDirty()
.
Dirty flag propagates to the root of the flexbox tree ensuring that when any item is invalidated its whole subtree will be re-calculated.
Usage examples:
In the case where a UILabel’s text is updated, it is needed to mark the label as dirty and relayout the flex container.
// 1) Update UILabel's text
label.text = "I love FlexLayout"
// 2) Mark the UILabel as dirty
label.flex. markDirty()
// 3) Then force a relayout of the flex container.
rootFlexContainer.flex.layout()
OR
setNeedsLayout()
sizeThatFits()
- Applies to:
flex items
Method:
sizeThatFits()
Returns the item size when layouted in the specified frame size.
Usage Example:
Get the size of view when layouted in a container with a width of 200 pixels.
let layoutSize = viewA.flex.sizeThatFits(CGSize(width: 200, height: CGFloat.greatestFiniteMagnitude)
intrinsicSize
- Applies to:
flex items
Property:
intrinsicSize
Item natural size, considering only properties of the view itself. Independent of the item frame.
4. Absolute positioning
- Applies to:
flex items
Method:
position(_: Position)
The position property tells Flexbox how you want your item to be positioned within its parent. Position values:relative (default)
absolute
: The view is positioned using properties: top(), bottom(), left(), right(), start(), end().
Usage examples:
view.flex.position(.absolute).top(10).left(10).size(50)
top(), bottom(), left(), right(), start(), end()
A flex item which is position
is set to .absolute
is positioned absolutely in regards to its parent. This is done through 6 properties:
Methods:
top( value: CGFloat)
:
Controls the distance a child’s top edge is from the parent’s top edgebottom( value: CGFloat)
:
Controls the distance a child’s bottom edge is from the parent’s bottom edgeleft( value: CGFloat)
:
Controls the distance a child’s left edge is from the parent’s left edgeright( value: CGFloat)
:
Controls the distance a child’s right edge is from the parent’s right edgestart( value: CGFloat)
:
Controls the distance a child’s start edge is from the parent’s start edge. In left-to-right direction (LTR), it corresponds to theleft()
property and in RTL toright()
property.end( value: CGFloat)
:
Controls the distance a child’s end edge is from the parent’s end edge. In left-to-right direction (LTR), it corresponds to theright()
property and in RTL toleft()
property.
Using these properties you can control the size and position of an absolute item within its parent. Because absolutely positioned children don’t affect their sibling’s layout. Absolute position can be used to create overlays and stack children in the Z axis.
Usage examples:
view.flex.position(.absolute).top(10).right(10).width(100).height(50)
:pushpin: See the Yoga C
example in the Examples App. Source code
5. Adjusting the size
Width and height and size
FlexLayout has methods to set the view’s height and width.
Methods:
width(_ width: CGFloat?)
The value specifies the view’s width in pixels. The value must be non-negative. Callwidth(nil)
to reset the property.width(_ percent: FPercent)
The value specifies the view’s width in percentage of its container width. The value must be non-negative. Callwidth(nil)
to reset the property.height(_ height: CGFloat?)
The value specifies the view’s height in pixels. The value must be non-negative. Callheight(nil)
to reset the property.height(_ percent: FPercent)
The value specifies the view’s height in percentage of its container height. The value must be non-negative. Callheight(nil)
to reset the property.size(_ size: CGSize?)
The value specifies view’s width and the height in pixels. Values must be non-negative. Callsize(nil)
to reset the property.size(_ sideLength: CGFloat?)
The value specifies the width and the height of the view in pixels, creating a square view. Values must be non-negative. Callsize(nil)
to reset the property.
Usage examples:
view.flex.width(100)
view.flex.width(50%)
view.flex.height(200)
view.flex.size(250)
minWidth(), maxWidth(), minHeight(), maxHeight()
FlexLayout has methods to set the view’s minimum and maximum width, and minimum and maximum height.
Using minWidth, minHeight, maxWidth, and maxHeight gives you increased control over the final size of items in a layout. By mixing these properties with grow
, shrink
, and alignItems(.stretch)
, you are able to have items with dynamic size within a range which you control.
An example of when Max properties can be useful is if you are using alignItems(.stretch)
but you know that your item won’t look good after it increases past a certain point. In this case, your item will stretch to the size of its parent or until it is as big as specified in the Max property.
Same goes for the Min properties when using shrink
. For example, you may want children of a container to shrink to fit on one row, but if you specify a minimum width, they will break to the next line after a certain point (if you are using wrap(.wrap)
.
Another case where Min and Max dimension constraints are useful is when using aspectRatio
.
Methods:
minWidth(_ width: CGFloat?)
The value specifies the view’s minimum width of the view in pixels. The value must be non-negative. CallminWidth(nil)
to reset the property.minWidth(_ percent: FPercent)
The value specifies the view’s minimum width of the view in percentage of its container width. The value must be non-negative. CallminWidth(nil)
to reset the property..maxWidth(_ width: CGFloat?)
The value specifies the view’s maximum width of the view in pixels. The value must be non-negative. CallmaxWidth(nil)
to reset the property.maxWidth(_ percent: FPercent)
The value specifies the view’s maximum width of the view in percentage of its container width. The value must be non-negative. CallmaxWidth(nil)
to reset the property.minHeight(_ height: CGFloat?)
The value specifies the view’s minimum height of the view in pixels. The value must be non-negative. CallminHeight(nil)
to reset the property.minHeight(_ percent: FPercent)
The value specifies the view’s minimum height of the view in percentage of its container height. The value must be non-negative. CallminHeight(nil)
to reset the property.maxHeight(_ height: CGFloat?)
The value specifies the view’s maximum height of the view in pixels. The value must be non-negative. CallmaxHeight(nil)
to reset the property.maxHeight(_ percent: FPercent)
The value specifies the view’s maximum height of the view in percentage of its container height. The value must be non-negative. CallmaxHeight(nil)
to reset the property.
Usage examples:
view.flex.maxWidth(200)
view.flex.maxWidth(50%)
view.flex.width(of: view1).maxWidth(250)
view.flex.maxHeight(100)
view.flex.height(of: view1).maxHeight(30%)
aspectRatio()
AspectRatio is a property introduced by Yoga that don’t exist in CSS. AspectRatio solves the problem of knowing one dimension of an element and an aspect ratio, this is very common when it comes to images, videos, and other media types. AspectRatio accepts any floating point value > 0, the default is undefined.
- AspectRatio is defined as the ratio between the width and the height of a node e.g. if a node has an aspect ratio of 2 then its width is twice the size of its height.
- AspectRatio respects the Min and Max dimensions of an item.
- AspectRatio has higher priority than
grow
. - If AspectRatio, Width, and Height are set then the cross dimension is overridden
- Call
aspectRatio(nil)
to reset the property.
Usage examples:
imageView.flex.aspectRatio(16/9)
6. Margins
By applying Margin to an item you specify the offset a certain edge of the item should have from it’s closest sibling or parent.
Methods:
marginTop(_ value: CGFloat)
marginLeft(_ value: CGFloat)
marginBottom(_ value: CGFloat)
marginRight(_ value: CGFloat)
marginStart(_ value: CGFloat)
marginEnd(_ value: CGFloat)
marginHorizontal(_ value: CGFloat)
marginVertical(_ value: CGFloat)
margin(_ insets: UIEdgeInsets)
Set all margins using an UIEdgeInsets. This method is particularly useful to set all margins using iOS 11UIView.safeAreaInsets
.margin(_ insets: NSDirectionalEdgeInsets)
Set all margins using an NSDirectionalEdgeInsets.  Paddings
Padding specify the offset children should have from a certain edge on the container.
Methods:
paddingTop(_ value: CGFloat)
paddingLeft(_ value: CGFloat)
paddingBottom(_ value: CGFloat)
paddingRight(_ value: CGFloat)
paddingStart(_ value: CGFloat)
paddingEnd(_ value: CGFloat)
paddingHorizontal(_ value: CGFloat)
paddingVertical(_ value: CGFloat)
padding(_ insets: UIEdgeInsets)
Set all paddings using an UIEdgeInsets. This method is particularly useful to set all paddings using iOS 11UIView.safeAreaInsets
.padding(_ insets: NSDirectionalEdgeInsets)
Set all paddings using an NSDirectionalEdgeInsets.  Borders
Border behaves nearly identically to Padding and is only separate from Padding to make it easier to implement border effect such as color.
Methods:
borderLeft(_ value: CGFloat)
borderTop(_ value: CGFloat)
borderRight(_ value: CGFloat)
borderBottom(_ value: CGFloat)
borderStart(_ value: CGFloat)
borderEnd(_ value: CGFloat)
border(_ value: CGFloat)
9. Extra UIView methods
FlexLayout also adds methods to set common UIView properties.
Methods:
backgroundColor(_ color: UIColor)
Set the flex item’s UIView background color.
Usage examples:
// Create a gray column container and add a black horizontal line separator
flex.addItem().backgroundColor(.gray).define { (flex) in
flex.addItem().height(1).backgroundColor(.black)
}
FlexLayout API Documentation
The complete FlexLayout API is available here.
Example App
The FlexLayout’s Example App exposes some usage example of FlexLayout.
See the Example App section to get more information.
FAQ
Q: The flex item overflows or is bigger than its container?
A: By default the flex item’sshrink
value is 0, which keeps the item’s current size in the main-axis direction. So that may cause the item to overflow its flex container. To fix that you just have to specify ashrink
value bigger than 0:view.flex.shrink(1)
Q: How to keep the view size (width/height)?
A: By default view’s flex shrink value is set to 1, which reduce the size of the view if the view is bigger than its flex container in the main-axis direction. If the direction is column, the height is adjusted, if the direction is row, the width is adjusted. Setting this value to 0 will keep the view size in the main-axis direction.Q: How to apply percentage from a CGFloat, a Float or an Int value?
R: Few FlexLayout’s method has a parameter of typeFPercent
. You can easily specify this type of parameter simply by adding the%
operator to your value (eg:view.flex.width(25%)
. It is similar if you have a value of type CGFloat, Float or Int, simply adds the%
operator:let percentageValue: CGFloat = 50 view.flex.height(percentageValue%)
Flexbox interesting external links
- THE flexbox CSS reference: A Complete Guide to Flexbox
- Raywenderlich interesting Yoga tutorial
- An Introduction to Flexbox CSS
- Flex Cheatsheet: Test flexbox properties using CSS
- Mozialla: Advanced layouts with flexbox using CSS
Contributing, comments, ideas, suggestions, issues, ….
For any comments, ideas, suggestions, simply open an issue.
For issues, please have a look at Yoga’s issues. Your issue may have been already reported. If not, it may be a FlexLayout issue. In this case open an issue and we’ll let you know if the issue is related to Yoga’s implementation.
If you find FlexLayout interesting, thanks to Star it. You’ll be able to retrieve it easily later.
If you’d like to contribute, you’re welcome!
Installation
CocoaPods
To integrate FlexLayout into your Xcode project using CocoaPods, specify it in your Podfile
:
pod 'FlexLayout'
Then, run pod install
.
Carthage
To integrate FlexLayout into your Xcode project using Carthage:
Specify in your
Cartfile
:github "layoutBox/FlexLayout"
Run
carthage update
to build frameworks.Add built
FlexLayout.framework
andYogaKit.framework
frameworks in your Xcode project in the Embedded Binaries section. You should have this once it is done:Add the preprocessor macro
FLEXLAYOUT_USE_CARTHAGE
in your Xcode project. Target > Build Settings > Preprocessor Macros. addFLEXLAYOUT_USE_CARTHAGE
in the Debug and the Release entry.
Changelog
FlexLayout recent history is available in the are documented in the CHANGELOG.
License
BSD 3-Clause License


The following links use relative URL:
/Regions/Region1/Region1Page1.html
Regions/RegionIndex.html
UsingBase.html
The following links contain absolute URLs:
World Wide Web Consortium
Visual Studio Gallery


SEARCHING FOR BOBBY FISCHER A film review by Alex Lopez-Ortiz Copyright 1993 Alex Lopez-Ortiz
Starring: Joe Mantegna, Ben Kingsley, Max Pomeranc, Laurence Fishburne. Director/Screenwriter: Steven Zaillian.
SEARCHING FOR BOBBY FISCHER is a top contender for the best movie of the summer.
It is hard to imagine a more difficult topic for a movie than chess. It is not a popular game/sport, and as countless flicks have proven, sports movies are seldom a success. It seems that the battles of the field in a sports match are already cartoonish enough so as to tolerate another layer of dramatization in the big screen.
And even among the few sport movies that excel there is a common complain: the sports footage is completely unrealistic, thus making the movie insurmountable for sport aficionados.
Director Steven Zaillian took the challenge and passed with flying colours. SEARCHING FOR BOBBY FISCHER is a movie that appeals to a large audience and to chess experts alike. Technical assistance by the noted chess player Bruce Pandolfini paid handsomely.
The drama on the screen and on the board is real.
On a first approach, SEARCHING is a movie about the true story of chess prodigy Josh Waitzkin, and how he and his family adjust to having a wunderkind at home. Even if this is all what you get from the movie, it is worth your time and money to see it.
But there is more to SFBF than what meets the eye. Think about chess as a 8x8 mock up of life ordeals; suddenly it is not just a game. In fact, there is nothing more offending for a professional sportsmen than telling him/her that their sport in question is "just a game". You live and breath through playing.
From this perspective, SEARCHING is also about the extremes of chess (and life) so skillfully represented by Pandolfini, Vinnie, Josh's dad, mom, the chess parents, and Josh's opponent and his trainer.
-- Which one is you? -- What do you mean? -- I mean: Which one is you?
I mean: see the movie.
The last facet of this movie, which has been seldom mentioned in the reviews, is the search for the real Bobby Fischer, portrayed through some skillfully interspersed footage of Fischer during the 1960-1970's.
SEARCHING FOR BOBBY FISCHER is, in black and white, a search for the past.
-- What do you want? -- I want back what Bobby Fischer took away from chess.
America was strong. It had just beaten Russia in their national pasttime. Those were happier times: "we were young and we were strong". But all this is gone. It just disappeared.
SEARCHING is also about this search, we want back the innocence of our young years, we want back the security of the streets, we want back the comfort of a well paid job. We want our champion past back. Is Josh (this generation) the Prometheus of a new future? Pandolfini hopes it is so....
Rating: **** (out of five) (8.5 out of 10).
-- Alex Lopez-Ortiz<EMAIL_ADDRESS>Department of Computer Science University of Waterloo Waterloo, Ontario Canada
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Why this blocking? Something about the behaviour of the browser has caught our attention.
There are various possible explanations for this:
- you are browsing and clicking at a speed much faster than expected of a human being
- something is preventing Javascript from working on your computer
- there is a robot on the same network (IP <IP_ADDRESS>) as you