Solving quantum mechanical problems for atoms, molecules, materials, and interfaces is of fundamental importance to a large number of disciplines including physics, chemistry, and materials science. Since the early development of quantum mechanics, it has been noted, by Dirac among others, that ...approximate, practical methods of applying quantum mechanics should be developed, which can lead to an explanation of the main features of complex atomic systems without too much computation.
Historically, this has meant invoking approximate forms of the underlying interactions (mean field, tight binding, etc.) or relying on phenomenological fits to a limited number of either experimental observations or theoretical results (e.g., force fields). The development of feature-based models is not new in the scientific literature. Indeed, prior even to the acceptance of the atomic hypothesis, van der Waals argued for an equation of state based on two physical features. Machine learning (i.e., fitting parameters within a model) has been used in physics and chemistry since the dawn of the computer age. The term machine learning is new; the approach is not.
More recently, high-level ab initio calculations have been used to train artificial neural networks to fit high-dimensional interaction models and to make informed predictions about material properties.
Machine learning can also be used to accelerate or bypass some of the heavy machinery of the ab initio method itself. In the work of Snyder et al, the authors replaced the kinetic energy functional within density-functional theory with a machine-learned one, learned the mappings from potential to electron density and from charge density to kinetic energy, respectively.
Here we present possible theses paths based on Machine Learning and studies of quantum mechanical systems. Possible systems are fermion or boson systems where the quantum mechanical particles are confined to move in various types of traps. A typical example which one could start with is to study a system of one and two electrons in two or three dimensions whose motion is confined by a harmonic oscillator potential. This system has, for one and two electrons only in two or three dimensions, analytical solutions for the energy and the state functions.
Strongly confined electrons offer a wide variety of complex and subtle phenomena which pose severe challenges to existing many-body methods. Quantum dots in particular, that is, electrons confined in semiconducting heterostructures, exhibit, due to their small size, discrete quantum levels. The ground states of, for example, circular dots show similar shell structures and magic numbers as seen for atoms and nuclei. These structures are particularly evident in measurements of the change in electrochemical potential due to the addition of one extra electron.
Small confined systems, such as quantum dots (QD), have become very popular for experimental study. Beyond their possible relevance for nanotechnology, they are highly tunable in experiments and introduce level quantization and quantum interference in a controlled way.
Similarly, other fermionic systems like atoms, molecules, nuclei, the infinite homogeneous electron gas and infinite nuclear matter, are all systems which can be studied with the same many-body methods. Thus, a proper theoretical understanding of such systems requires the development of appropriate and reliable theoretical few- and many-body methods. Furthermore, for say quantum dots with more than two electrons and/or specific values of the external fields, this implies the development of few- and many-body methods where uncertainty quantifications are provided. For most methods, this means providing an estimate of the error due to the truncation made in the single-particle basis and the truncation made in limiting the number of possible excitations. For systems with more than three or four electrons, ab initio methods that have been employed in studies of quantum dots are variational and diffusion Monte Carlo, path integral approaches, large-scale diagonalization (full configuration interaction and to a more limited extent coupled-cluster theory. Exact diagonalization studies are accurate for a very small number of electrons, but the number of basis functions needed to obtain a given accuracy and the computational cost grow very rapidly with electron number. In practice they have been used for up to eight electrons, but the accuracy is very limited for all except \( N\le 3 \) . Monte Carlo methods have been applied up to \( N\sim 100 \) electrons. Diffusion Monte Carlo, with statistical and systematic errors, provide, in principle, exact benchmark solutions to various properties of quantum dots. However, the computations start becoming rather time-consuming for larger systems. Mean field methods like various Hartree-Fock approaches and/or current density functional methods give results that are satisfactory for a qualitative understanding of some systematic properties. However, comparisons with exact results show discrepancies in the energies that are substantial on the scale of energy differences. The above-mentioned many-body methods all experience what is the loosely called the curse of dimensionality. This means that the increased number of degrees freedom hinders the application of most first principle methods. As an example, for direct diagonalization methods, Hamiltonian matrices of dimensionalities larger than ten billion basis states, are simply computationally intractable. Such a dimensionality translates into few interacting particles only. For larger systems one is limited to much more approximative methods. Reecent approaches in Machine Learning as well as in quantum computing, hold promise however to circumvent partly the above problems with increasing degrees of freedom.
The specific aim of this thesis topic is to, based on quantum Monte Carlo methods, to explore deep learning approaches to many-body systems based on neural networks, see the recent work of for example Adams et al..
The specific task here is to implement and study deeep learning methods for solving quantum mechanical many-particle problems of fermions. The results can be easily compared with exisiting standard many-particle codes developed by former students at the Computational Physics group. These codes will serve as useful comparisons in order to gauge the appropriateness of recent Machine Learning approaches to quantum mechanical problems.
Four recent articles (see below) have shown the reliability of these methods and the aim is to study and implement some of these algorithms to first a system of one electron moving in a confining potential. Thereafter we switch to the interacting two-electron and many-electron problems and apply these algorithms. We will focus first on systems of quantum dots, but the codes can easily be extended to systems of atoms and molecules.
The basic framework to be developed contains:
The milestones are
The thesis is expected to be handed in May/June 2023.
Highly relevant articles for possible thesis projects are:


You have an account conflict: few credentials are connected to the same account. Please choose the account you would like to proceed with. Another account will be lost


| Welland Valley Cycling Club Competition Results |
|---|
| Club website |
| Club Championship 2018 Event Results |
|---|
| Event 1 |
| Event 2 |
| Event 3 |
| Event 4 |
| Event 5 |
| Event 6 |
| Event 7 |
| Event 8 |
| Event 9 |
| Event 10 |
| Event 11 |
| Club Championship 2018 League Tables |
|---|
| Seniors |
| Veterans |
| Women |
| Juniors |
| Juveniles |
| Road Bike Men |
| Road Bike Women |
|   |
| DC Research Prem |
| DC Research 1 |
| DC Research 2 |
| DC Research 3 |
| DC Research 4 |
| Evening 10 Series 2018 Event Results |
|---|
| Event 1 |
| Event 2 |
| Event 3 |
| Event 4 |
| Event 5 |
| Event 6 |
| Event 7 |
| Event 8 |
| Event 9 |
| Event 10 |
| Event 11 |
| Event 12 |
| Event 13 |
| Event 14 |
| Event 15 |
| Evening 10 Series 2018 League Tables |
|---|
| Seniors |
| Veterans |
| Women |
| Juniors |
| Juveniles |
| Road Bike Men |
| Road Bike Women |


This document describes in detail how to subclass and define a custom spherical coordinate frame, as discussed in Using and Designing Coordinate Frames and the docstring for BaseCoordinateFrame. In this example, we will define a coordinate system defined by the plane of orbit of the Sagittarius Dwarf Galaxy (hereafter Sgr; as defined in Majewski et al. 2003). The Sgr coordinate system is often referred to in terms of two angular coordinates, .
We need to define a subclass of BaseCoordinateFrame that knows the names and units of the coordinate system angles in each of the supported representations. In this case we support SphericalRepresentation with “Lambda” and “Beta”. Then we have to define the transformation from this coordinate system to some other built-in system. Here we will use Galactic coordinates, represented by the Galactic class.
The first step is to create a new class, which we’ll call Sagittarius and make it a subclass of BaseCoordinateFrame:
import numpy as np
from numpy import cos, sin
from astropy.coordinates import frame_transform_graph
from astropy.coordinates.angles import rotation_matrix
import astropy.coordinates as coord
import astropy.units as u
class Sagittarius(coord.BaseCoordinateFrame):
"""
A Heliocentric spherical coordinate system defined by the orbit
of the Sagittarius dwarf galaxy, as described in
http://adsabs.harvard.edu/abs/2003ApJ...599.1082M
and further explained in
http://www.astro.virginia.edu/~srm4n/Sgr/.
Parameters
----------
representation : `BaseRepresentation` or None
A representation object or None to have no data (or use the other keywords)
Lambda : `Angle`, optional, must be keyword
The longitude-like angle corresponding to Sagittarius' orbit.
Beta : `Angle`, optional, must be keyword
The latitude-like angle corresponding to Sagittarius' orbit.
distance : `Quantity`, optional, must be keyword
The Distance for this object along the line-of-sight.
"""
default_representation = coord.SphericalRepresentation
frame_specific_representation_info = {
'spherical': [coord.RepresentationMapping('lon', 'Lambda'),
coord.RepresentationMapping('lat', 'Beta'),
coord.RepresentationMapping('distance', 'distance')],
'unitspherical': [coord.RepresentationMapping('lon', 'Lambda'),
coord.RepresentationMapping('lat', 'Beta')]
}
Line by line, the first few are simply imports. Next we define the class as a subclass of BaseCoordinateFrame. Then we include a descriptive docstring. The final lines are class-level attributes that specify the default representation for the data and mappings from the attribute names used by representation objects to the names that are to be used by Sagittarius. In this case we override the names in the spherical representations but don’t do anything with other representations like cartesian or cylindrical.
Next we have to define the transformation to some other built-in coordinate system; we will use Galactic coordinates. We can do this by defining functions that return transformation matrices, or by simply defining a function that accepts a coordinate and returns a new coordinate in the new system. We’ll start by constructing the rotation matrix, using the helper function rotation_matrix:
# Define the Euler angles (from Law & Majewski 2010)
SGR_PHI = np.radians(180+3.75)
SGR_THETA = np.radians(90-13.46)
SGR_PSI = np.radians(180+14.111534)
# Generate the rotation matrix using the x-convention (see Goldstein)
D = rotation_matrix(SGR_PHI, "z", unit=u.radian)
C = rotation_matrix(SGR_THETA, "x", unit=u.radian)
B = rotation_matrix(SGR_PSI, "z", unit=u.radian)
SGR_MATRIX = np.array(B.dot(C).dot(D))
This is done at the module level, since it will be used by both the transformation from Sgr to Galactic as well as the inverse from Galactic to Sgr. Now we can define our first transformation function:
# Galactic to Sgr coordinates
@frame_transform_graph.transform(coord.FunctionTransform, coord.Galactic, Sagittarius)
def galactic_to_sgr(gal_coord, sgr_frame):
""" Compute the transformation from Galactic spherical to
heliocentric Sgr coordinates.
"""
l = np.atleast_1d(gal_coord.l.radian)
b = np.atleast_1d(gal_coord.b.radian)
X = np.cos(b)*np.cos(l)
Y = np.cos(b)*np.sin(l)
Z = np.sin(b)
# Calculate X,Y,Z,distance in the Sgr system
Xs, Ys, Zs = SGR_MATRIX.dot(np.array([X, Y, Z]))
Zs = -Zs
# Calculate the angular coordinates lambda,beta
Lambda = np.arctan2(Ys,Xs)*u.radian
Lambda[Lambda < 0] = Lambda[Lambda < 0] + 2.*np.pi*u.radian
Beta = np.arcsin(Zs/np.sqrt(Xs*Xs+Ys*Ys+Zs*Zs))*u.radian
return Sagittarius(Lambda=Lambda, Beta=Beta,
distance=gal_coord.distance)
The decorator @frame_transform_graph.transform(coord.FunctionTransform, coord.Galactic, Sagittarius) registers this function on the frame_transform_graph as a transformation. Inside the function, we simply follow the same procedure as detailed by David Law’s transformation code. Note that in this case, both coordinate systems are heliocentric, so we can simply copy any distance from the Galactic object.
We then register the inverse transformation by using the transpose of the rotation matrix (which is faster to compute than the inverse):
# Sgr to Galactic coordinates
@frame_transform_graph.transform(coord.FunctionTransform, Sagittarius, coord.Galactic)
def sgr_to_galactic(sgr_coord, gal_frame):
""" Compute the transformation from heliocentric Sgr coordinates to
spherical Galactic.
"""
L = np.atleast_1d(sgr_coord.Lambda.radian)
B = np.atleast_1d(sgr_coord.Beta.radian)
Xs = cos(B)*cos(L)
Ys = cos(B)*sin(L)
Zs = sin(B)
Zs = -Zs
X, Y, Z = SGR_MATRIX.T.dot(np.array([Xs, Ys, Zs]))
l = np.arctan2(Y,X)*u.radian
b = np.arcsin(Z/np.sqrt(X*X+Y*Y+Z*Z))*u.radian
l[l<=0] += 2*np.pi*u.radian
return coord.Galactic(l=l, b=b, distance=sgr_coord.distance)
Now that we’ve registered these transformations between Sagittarius and Galactic, we can transform between any coordinate system and Sagittarius (as long as the other system has a path to transform to Galactic). For example, to transform from ICRS coordinates to Sagittarius, we simply:
>>> import astropy.units as u
>>> import astropy.coordinates as coord
>>> icrs = coord.ICRS(280.161732*u.degree, 11.91934*u.degree)
>>> icrs.transform_to(Sagittarius)
<Sagittarius Coordinate: (Lambda, Beta, distance) in (deg, deg, )
(346.818273..., -39.283667..., 1.0)>
The complete code for the above example is included below for reference.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | # coding: utf-8
""" Astropy coordinate class for the Sagittarius coordinate system """
from __future__ import division, print_function
__author__ = "adrn<EMAIL_ADDRESS># Third-party
import numpy as np
from numpy import cos, sin
from astropy.coordinates import frame_transform_graph
from astropy.coordinates.angles import rotation_matrix
import astropy.coordinates as coord
import astropy.units as u
__all__ = ["Sagittarius"]
class Sagittarius(coord.BaseCoordinateFrame):
"""
A Heliocentric spherical coordinate system defined by the orbit
of the Sagittarius dwarf galaxy, as described in
http://adsabs.harvard.edu/abs/2003ApJ...599.1082M
and further explained in
http://www.astro.virginia.edu/~srm4n/Sgr/.
Parameters
----------
representation : `BaseRepresentation` or None
A representation object or None to have no data (or use the other keywords)
Lambda : `Angle`, optional, must be keyword
The longitude-like angle corresponding to Sagittarius' orbit.
Beta : `Angle`, optional, must be keyword
The latitude-like angle corresponding to Sagittarius' orbit.
distance : `Quantity`, optional, must be keyword
The Distance for this object along the line-of-sight.
"""
default_representation = coord.SphericalRepresentation
frame_specific_representation_info = {
'spherical': [coord.RepresentationMapping('lon', 'Lambda'),
coord.RepresentationMapping('lat', 'Beta'),
coord.RepresentationMapping('distance', 'distance')],
'unitspherical': [coord.RepresentationMapping('lon', 'Lambda'),
coord.RepresentationMapping('lat', 'Beta')]
}
# Define the Euler angles (from Law & Majewski 2010)
phi = np.radians(180+3.75)
theta = np.radians(90-13.46)
psi = np.radians(180+14.111534)
# Generate the rotation matrix using the x-convention (see Goldstein)
D = rotation_matrix(phi, "z", unit=u.radian)
C = rotation_matrix(theta, "x", unit=u.radian)
B = rotation_matrix(psi, "z", unit=u.radian)
sgr_matrix = np.array(B.dot(C).dot(D))
# Galactic to Sgr coordinates
@frame_transform_graph.transform(coord.FunctionTransform, coord.Galactic, Sagittarius)
def galactic_to_sgr(gal_coord, sgr_frame):
""" Compute the transformation from Galactic spherical to
heliocentric Sgr coordinates.
"""
l = np.atleast_1d(gal_coord.l.radian)
b = np.atleast_1d(gal_coord.b.radian)
X = cos(b)*cos(l)
Y = cos(b)*sin(l)
Z = sin(b)
# Calculate X,Y,Z,distance in the Sgr system
Xs, Ys, Zs = sgr_matrix.dot(np.array([X, Y, Z]))
Zs = -Zs
# Calculate the angular coordinates lambda,beta
Lambda = np.arctan2(Ys, Xs)*u.radian
Lambda[Lambda < 0] = Lambda[Lambda < 0] + 2.*np.pi*u.radian
Beta = np.arcsin(Zs/np.sqrt(Xs*Xs+Ys*Ys+Zs*Zs))*u.radian
return Sagittarius(Lambda=Lambda, Beta=Beta,
distance=gal_coord.distance)
# Sgr to Galactic coordinates
@frame_transform_graph.transform(coord.FunctionTransform, Sagittarius, coord.Galactic)
def sgr_to_galactic(sgr_coord, gal_frame):
""" Compute the transformation from heliocentric Sgr coordinates to
spherical Galactic.
"""
L = np.atleast_1d(sgr_coord.Lambda.radian)
B = np.atleast_1d(sgr_coord.Beta.radian)
Xs = cos(B)*cos(L)
Ys = cos(B)*sin(L)
Zs = sin(B)
Zs = -Zs
X, Y, Z = sgr_matrix.T.dot(np.array([Xs, Ys, Zs]))
l = np.arctan2(Y, X)*u.radian
b = np.arcsin(Z/np.sqrt(X*X+Y*Y+Z*Z))*u.radian
l[l<0] += 2*np.pi*u.radian
return coord.Galactic(l=l, b=b, distance=sgr_coord.distance)
if __name__ == "__main__":
# Example use case for our newly defined coordinate class
icrs = coord.ICRS(152.88572*u.degree, 11.57281*u.degree)
sgr = icrs.transform_to(Sagittarius)
print(sgr)
|


This is a GUI implementation of Happyworm jPlayer plugin, an HTML5 audio engine, developed on jQuery framework, that let you listen mp3 and ogg file over the html5 audio tag where supported or using an invisible flash player where not supported.
For more informations about html5 browsers' support go to jPlayer documentation site.


#{extends 'main.html' /} #{set title:'Protocols and Structures for Inference - Compile a Schema' /}
Schema to compile: "$object"
Arguments as "key":value pairs in JSON format { }


Group Name
How do you want to name this group?
Choose which contacts you want to associate to this group:
Cancel
Save Group


Home
Resume
About
Contact
The Art Of Me
Tic Tac Toe 9001
Here is a game of Tic Tac Toe created with code one. Using html, css, and js.
New Game
Box 2
Box 3


This is a little, quick and dirty project.
I've integrated the work of Yannis Gravezas inside YouTube using a Chrome extension to avoid CORS and TOS violations.
More info on github.com
Usage
Just click the tree icon that appears on the youtube player controls bar.
You can also use other keyboard controls.
Share
You can share the TreePer experience with friends sending them the youtube link.
They will see the same visual effect with the same opacity.
Controls
Use the keyobard.
Button
Action
[ , -
Decrease video opacity (animation will start automatically)
] , +
Increase video opacity (animation will stop automatically)


| Package | Description |
|---|---|
| org.bitcoinj.core |
The core package contains classes for network messages like
Block and
Transaction , peer connectivity via PeerGroup ,
and block chain management. |
| org.bitcoinj.core.listeners | |
| org.bitcoinj.crypto |
The crypto package contains classes that work with key derivation algorithms like scrypt (passwords to AES keys),
BIP 32 hierarchies (chains of keys from a root seed), X.509 utilities for the payment protocol and other general
cryptography tasks.
|
| org.bitcoinj.jni | |
| org.bitcoinj.params |
Network parameters encapsulate some of the differences between different Bitcoin networks such as the main
network, the testnet, regtest mode, unit testing params and so on.
|
| org.bitcoinj.protocols.channels |
Micropayment channels allow for rapid tiny payments to be made to a third party once a channel has been set up, using
some of the advanced features of the Bitcoin protocol.
|
| org.bitcoinj.protocols.payments |
The BIP70 payment protocol wraps Bitcoin transactions and adds various useful features like memos, refund addresses
and authentication.
|
| org.bitcoinj.wallet |
Classes that support the
Wallet , which knows how to find and save transactions relevant to
a set of keys or scripts, calculate balances, and spend money: the wallet has many features and can be extended
in various ways, please refer to the website for documentation on how to use it. |
| Modifier and Type | Class and Description |
|---|---|
class |
ProtocolException |
class |
ScriptException |
static class |
VerificationException.BlockVersionOutOfDate |
static class |
VerificationException.CoinbaseHeightMismatch |
static class |
VerificationException.CoinbaseScriptSizeOutOfRange |
static class |
VerificationException.DuplicatedOutPoint |
static class |
VerificationException.EmptyInputsOrOutputs |
static class |
VerificationException.ExcessiveValue |
static class |
VerificationException.LargerThanMaxBlockSize |
static class |
VerificationException.NegativeValueOutput |
static class |
VerificationException.UnexpectedCoinbaseInput |
| Modifier and Type | Method and Description |
|---|---|
boolean |
AbstractBlockChain.add(Block block)
Processes a received block and tries to add it to the chain.
|
boolean |
AbstractBlockChain.add(FilteredBlock block)
Processes a received block and tries to add it to the chain.
|
boolean |
BlockChain.add(FilteredBlock block) |
protected abstract StoredBlock |
AbstractBlockChain.addToBlockStore(StoredBlock storedPrev,
Block block)
Adds/updates the given
Block with the block store. |
protected StoredBlock |
BlockChain.addToBlockStore(StoredBlock storedPrev,
Block blockHeader) |
protected StoredBlock |
FullPrunedBlockChain.addToBlockStore(StoredBlock storedPrev,
Block block) |
protected abstract StoredBlock |
AbstractBlockChain.addToBlockStore(StoredBlock storedPrev,
Block header,
TransactionOutputChanges txOutputChanges)
Adds/updates the given
StoredBlock with the block store. |
protected StoredBlock |
BlockChain.addToBlockStore(StoredBlock storedPrev,
Block blockHeader,
TransactionOutputChanges txOutChanges) |
protected StoredBlock |
FullPrunedBlockChain.addToBlockStore(StoredBlock storedPrev,
Block header,
TransactionOutputChanges txOutChanges) |
StoredBlock |
StoredBlock.build(Block block)
Creates a new StoredBlock, calculating the additional fields by adding to the values in this block.
|
void |
Transaction.checkCoinBaseHeight(int height)
Check block height is in coinbase input script, for use after BIP 34
enforcement is enabled.
|
abstract void |
NetworkParameters.checkDifficultyTransitions(StoredBlock storedPrev,
Block next,
BlockStore blockStore)
Throws an exception if the block's difficulty is not correct.
|
protected boolean |
Block.checkProofOfWork(boolean throwException)
Returns true if the hash of the block is OK (lower than difficulty target).
|
protected abstract TransactionOutputChanges |
AbstractBlockChain.connectTransactions(int height,
Block block)
Connect each transaction in block.transactions, verifying them as we go and removing spent outputs
If an error is encountered in a transaction, no changes should be made to the underlying BlockStore.
|
protected TransactionOutputChanges |
FullPrunedBlockChain.connectTransactions(int height,
Block block) |
protected abstract TransactionOutputChanges |
AbstractBlockChain.connectTransactions(StoredBlock newBlock)
Load newBlock from BlockStore and connect its transactions, returning changes to the set of unspent transactions.
|
protected TransactionOutputChanges |
FullPrunedBlockChain.connectTransactions(StoredBlock newBlock) |
BigInteger |
Block.getDifficultyTargetAsInteger()
Returns the difficulty target as a 256 bit value that can be compared to a SHA-256 hash.
|
List<Sha256Hash> |
FilteredBlock.getTransactionHashes()
Gets a list of leaf hashes which are contained in the partial merkle tree in this filtered block
|
Sha256Hash |
PartialMerkleTree.getTxnHashAndMerkleRoot(List<Sha256Hash> matchedHashesOut)
Extracts tx hashes that are in this merkle tree
and returns the merkle root of this tree.
|
BigInteger |
Block.getWork()
Returns the work represented by this block.
|
protected void |
Peer.processTransaction(Transaction tx) |
boolean |
FilteredBlock.provideTransaction(Transaction tx)
Provide this FilteredBlock with a transaction which is in its Merkle tree.
|
void |
TransactionInput.verify()
For a connected transaction, runs the script against the connected pubkey and verifies they are correct.
|
void |
Transaction.verify()
Checks the transaction contents for sanity, in ways that can be done in a standalone manner.
|
void |
Block.verify(int height,
EnumSet<Block.VerifyFlag> flags)
Verifies both the header and that the transactions hash to the merkle root.
|
void |
TransactionInput.verify(TransactionOutput output)
Verifies that this input can spend the given output.
|
void |
Block.verifyHeader()
Checks the block data to ensure it follows the rules laid out in the network parameters.
|
void |
Block.verifyTransactions(int height,
EnumSet<Block.VerifyFlag> flags)
Checks the block contents
|
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractBlockChainListener.notifyNewBestBlock(StoredBlock block)
Deprecated.
|
void |
NewBestBlockListener.notifyNewBestBlock(StoredBlock block)
Called when a new block on the best chain is seen, after relevant
transactions are extracted and sent to us via either
TransactionReceivedInBlockListener#receiveFromBlock(org.bitcoinj.core.Transaction, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int relativityOffset)
or TransactionReceivedInBlockListener#notifyTransactionIsInBlock(org.bitcoinj.core.Sha256Hash, org.bitcoinj.core.StoredBlock, org.bitcoinj.core.BlockChain.NewBlockType, int) . |
boolean |
AbstractBlockChainListener.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Deprecated.
|
boolean |
TransactionReceivedInBlockListener.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new FilteredBlock that contains the given
transaction hash in its merkle tree. |
void |
AbstractBlockChainListener.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Deprecated.
|
void |
TransactionReceivedInBlockListener.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new block that contains a relevant transaction. |
void |
AbstractBlockChainListener.reorganize(StoredBlock splitPoint,
List<StoredBlock> oldBlocks,
List<StoredBlock> newBlocks)
Deprecated.
|
void |
ReorganizeListener.reorganize(StoredBlock splitPoint,
List<StoredBlock> oldBlocks,
List<StoredBlock> newBlocks)
Called by the
BlockChain when the best chain
(representing total work done) has changed. |
| Modifier and Type | Method and Description |
|---|---|
static TransactionSignature |
TransactionSignature.decodeFromBitcoin(byte[] bytes,
boolean requireCanonicalEncoding)
Deprecated.
use
#decodeFromBitcoin(byte[], boolean, boolean instead}. |
static TransactionSignature |
TransactionSignature.decodeFromBitcoin(byte[] bytes,
boolean requireCanonicalEncoding,
boolean requireCanonicalSValue)
Returns a decoded signature.
|
| Modifier and Type | Method and Description |
|---|---|
void |
NativeBlockChainListener.notifyNewBestBlock(StoredBlock block) |
boolean |
NativeBlockChainListener.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset) |
void |
NativeBlockChainListener.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset) |
void |
NativeBlockChainListener.reorganize(StoredBlock splitPoint,
List<StoredBlock> oldBlocks,
List<StoredBlock> newBlocks) |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractBitcoinNetParams.checkDifficultyTransitions(StoredBlock storedPrev,
Block nextBlock,
BlockStore blockStore) |
void |
TestNet3Params.checkDifficultyTransitions(StoredBlock storedPrev,
Block nextBlock,
BlockStore blockStore) |
| Modifier and Type | Method and Description |
|---|---|
PaymentChannelServerState |
StoredServerChannel.getOrCreateState(Wallet wallet,
TransactionBroadcaster broadcaster)
Gets the canonical
PaymentChannelServerState object for this channel, either by returning an existing one
or by creating a new one. |
boolean |
PaymentChannelServerState.incrementPayment(Coin refundSize,
byte[] signatureBytes)
Called when the client provides us with a new signature and wishes to increment total payment by size.
|
com.google.common.util.concurrent.ListenableFuture<PaymentChannelServerState> |
PaymentChannelServerState.provideContract(Transaction contract)
Called when the client provides the multi-sig contract.
|
void |
PaymentChannelV1ClientState.provideRefundSignature(byte[] theirSignature,
org.spongycastle.crypto.params.KeyParameter userKey)
When the servers signature for the refund transaction is received, call this to verify it and sign the
complete refund ourselves.
|
byte[] |
PaymentChannelV1ServerState.provideRefundTransaction(Transaction refundTx,
byte[] clientMultiSigPubKey)
Called when the client provides the refund transaction.
|
| Constructor and Description |
|---|
PaymentChannelClientState(Wallet wallet,
ECKey myKey,
ECKey serverKey,
Coin value,
long expiryTimeInSeconds)
Creates a state object for a payment channel client.
|
PaymentChannelV1ClientState(Wallet wallet,
ECKey myKey,
ECKey serverMultisigKey,
Coin value,
long expiryTimeInSeconds)
Creates a state object for a payment channel client.
|
PaymentChannelV2ClientState(Wallet wallet,
ECKey myKey,
ECKey serverMultisigKey,
Coin value,
long expiryTimeInSeconds) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<PaymentProtocol.Ack> |
PaymentSession.sendPayment(List<Transaction> txns,
Address refundAddr,
String memo)
Generates a Payment message and sends the payment to the merchant who sent the PaymentRequest.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Wallet.commitTx(Transaction tx)
Updates the wallet with the given transaction: puts it into the pending pool, sets the spent flags and runs
the onCoinsSent/onCoinsReceived event listener.
|
boolean |
Wallet.maybeCommitTx(Transaction tx)
Calls
Wallet.commitTx(org.bitcoinj.core.Transaction) if tx is not already in the pending pool |
void |
Wallet.notifyNewBestBlock(StoredBlock block)
Called by the
BlockChain when a new block on the best chain is seen, AFTER relevant wallet
transactions are extracted and sent to us UNLESS the new block caused a re-org, in which case this will
not be called (the Wallet.reorganize(StoredBlock, java.util.List, java.util.List) method will
call this one in that case). |
boolean |
Wallet.notifyTransactionIsInBlock(Sha256Hash txHash,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new filtered block that contains a transactions previously
received by a call to Wallet.receivePending(org.bitcoinj.core.Transaction, java.util.List<org.bitcoinj.core.Transaction>, boolean) . |
void |
Wallet.receiveFromBlock(Transaction tx,
StoredBlock block,
AbstractBlockChain.NewBlockType blockType,
int relativityOffset)
Called by the
BlockChain when we receive a new block that sends coins to one of our addresses or
spends coins from one of our addresses (note that a single transaction can do both). |
void |
Wallet.receivePending(Transaction tx,
List<Transaction> dependencies)
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
and want to record it.
|
void |
Wallet.receivePending(Transaction tx,
List<Transaction> dependencies,
boolean overrideIsRelevant)
Called when we have found a transaction (via network broadcast or otherwise) that is relevant to this wallet
and want to record it.
|
void |
Wallet.reorganize(StoredBlock splitPoint,
List<StoredBlock> oldBlocks,
List<StoredBlock> newBlocks)
Don't call this directly.
|
Copyright © 2022. All rights reserved.


Drivers caught using mobiles 'hit by £2m fines each year'
by Iain LynnMore than £2 million in fines are being handed out to drivers caught using a mobile phone each year, according to new research.
Analysis of Ministry of Justice data by insurer Direct Line found that more than 13,000 motorists are convicted over mobile phone offences annually.
A poll of 2,002 UK adults indicated that the habit is much more widespread, with 29% admitting to using their phone behind the wheel in the last 12 months.
READ MORE: Lancashire family's delight as their stolen pug puppy 'Indie' is returned
In 2018, there were 683 casualties on Britain's roads - including 29 deaths and 118 serious injuries - in crashes where a driver using a mobile was a contributory factor.
Since March 2017, motorists caught using a hand-held phone have faced incurring six points on their licence and a £200 fine - up from the previous penalty of three points and £100.
Steve Barrett, head of motor insurance at Direct Line, said: "Driving using a mobile phone should be as socially unacceptable as drink driving, as it is both dangerous and illegal.
"It only takes a second with eyes off the road or being distracted by a mobile phone for a life altering accident to happen, or for a driver to find themselves facing prosecution and a criminal record.
"With new technology available to the police that uses sensors to detect if a driver is using their phone, people are at greater risk of prosecution for these offences than ever before.
"It is worrying that the majority of law-abiding drivers are being put at risk by those who allow themselves to be distracted behind the wheel."


| Sr No. | Product Name | Product Description | Product Qty | Product Tax | Product Price | Product Sub-total |
|---|---|---|---|---|---|---|
| 1 | Jeans | Blue denim jeans | 2 | - | 1000 | 2000 |
Payment Methods:
You can use any the above methods for payment. Please make all checks payable to AdminPanel. Payment should be done in 10 days. If you have any questions concerning this invoice, feel free to contact: Anamika Patel,<PHONE_NUMBER><EMAIL_ADDRESS>Amount Due: 29/10/18
| Total(Sub-total): | 2000 |
|---|---|
| Tax (10%) | 200 |
| Shipping(5%): | 100 |
| Grand Total: | 2100 |


Humm-Humm
Log in using reddit and start humming !
Log in
Hum here
Record
Stop
Download
/r/HummHumm
Disconnect


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Serves 4
For the ribs, place the beef fore ribs, peppercorns, bay leaves, flatleaf parsley, onion and carrot into a large pan. Cover with water and bring to the boil.
Once the mixture is boiling, reduce the heat until the mixture is simmering.
Simmer for 1½ hours, stirring occasionally to prevent sticking.
Preheat the oven to 200C/400F/Gas 6.
Meanwhile, for the bourbon sauce, place the tomato ketchup, chilli ketchup, soy sauce, honey, teriyaki sauce and bourbon into a separate pan, stir well and bring the mixture to a simmer. Simmer for 1-2 minutes, then remove from the heat.
When the ribs have simmered for 1½ hours, dip them into the bourbon sauce, then place them onto a roasting tray, reserving the remaining sauce. Roast in the oven for 10-12 minutes, then spoon over more of the bourbon sauce. Continue to roast for a further 10-12 minutes, then remove from the oven and set aside on a warm plate.
For the coleslaw, blend the egg yolks, white wine vinegar, Dijon mustard and salt in a food processor until smooth and well combined.
With the food processor motor still running, gradually pour in the rapeseed oil and the olive oil in a thin stream until the mixture thickens to the consistency of thick mayonnaise. (You may not need all of both oils.)
Transfer the mayonnaise mixture to a clean bowl. Gradually add the cold water and lemon juice in a thin stream, whisking continuously. Season, to taste, with salt and freshly ground black pepper.
Place the carrots, cabbage and onion into a large mixing bowl and add enough mayonnaise to coat the vegetables. Stir until well combined and set aside.
For the baked potatoes, rub the baking potatoes with olive oil and sprinkle over the salt.
Place the potatoes onto the top shelf of the oven and bake for one hour, or until tender (allow more time for larger potatoes).
To serve, divide the sticky ribs among four serving plates and spoon a portion of coleslaw alongside. Split the potatoes in half and place one onto each plate. Top with a spoonful of soured cream and garnish with the chopped curly parsley.


Before Change
// combine predictions with the overall metrics
for of_name in test_predictions:
// remove logits, not needed for overall stats
del test_predictions[of_name][LOGITS]
if of_name not in test_stats:
test_stats[of_name] = {}
After Change
// combine predictions with the overall metrics
for of_name in test_predictions:
// remove logits, not needed for overall stats
if LOGITS in test_predictions[of_name]:
del test_predictions[of_name][LOGITS]
if of_name not in test_stats:
test_stats[of_name] = {}
test_stats[of_name] = {**test_stats[of_name],


To add captions with chapter numbers,
Numbered Headings
should be added. Headings can
be numbered using the multilevel list. You can use the
built-in multilevel lists or you can
make your own multilevel list. Captions can be added after adding figures or tables, open
the document in which you want to add captions. Initially, the
headings are not numbered.
Click Multilevel List
from the
Home
tab and select the list which assigns
numbers to the Headings, as we highlighted in the figure:
Now numbering should appear before Headings in the style panel
and on the page:
Select the figure that has to be captioned, select
References
tab on the ribbon, and click
Insert Caption
:
The Caption
dialog box will appear, click
Numbering
:
Check the Include chapter number
from the Caption
Numbering dialog box and click OK:
You can see the Chapter number appeared in the Caption field,
click OK to return to documents:
Now, for every new Heading
, the captions are
labeled according to the chapter number:


public class VideoCapture
extends java.lang.Object
Class for video capturing from video files, image sequences or cameras. The class provides C++ API for capturing video from cameras or for reading video files and image sequences. Here is how the class can be used:
#include "opencv2/opencv.hpp"
// C++ code:
using namespace cv;
int main(int, char)
VideoCapture cap(0); // open the default camera
if(!cap.isOpened()) // check if we succeeded
return -1;
Mat edges;
namedWindow("edges",1);
for(;;)
Mat frame;
cap >> frame; // get a new frame from camera
cvtColor(frame, edges, CV_BGR2GRAY);
GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
Canny(edges, edges, 0, 30, 3);
imshow("edges", edges);
if(waitKey(30) >= 0) break;
// the camera will be deinitialized automatically in VideoCapture destructor
return 0;
Note: In C API the black-box structure CvCapture
is used instead
of VideoCapture
.
Note:
| Constructor and Description |
|---|
VideoCapture()
VideoCapture constructors.
|
VideoCapture(int device)
VideoCapture constructors.
|
| Modifier and Type | Method and Description |
|---|---|
double |
get(int propId)
Returns the specified "VideoCapture" property.
|
java.util.List<Size> |
getSupportedPreviewSizes() |
boolean |
grab()
Grabs the next frame from video file or capturing device.
|
boolean |
isOpened()
Returns true if video capturing has been initialized already.
|
boolean |
open(int device)
Open video file or a capturing device for video capturing
|
boolean |
read(Mat image)
Grabs, decodes and returns the next video frame.
|
void |
release()
Closes video file or capturing device.
|
boolean |
retrieve(Mat image)
Decodes and returns the grabbed video frame.
|
boolean |
retrieve(Mat image,
int channel)
Decodes and returns the grabbed video frame.
|
boolean |
set(int propId,
double value)
Sets a property in the "VideoCapture".
|
public VideoCapture()
VideoCapture constructors.
Note: In C API, when you finished working with video, release
CvCapture
structure with cvReleaseCapture()
, or use
Ptr
that calls cvReleaseCapture()
automatically in the destructor.
public VideoCapture(int device)
VideoCapture constructors.
Note: In C API, when you finished working with video, release
CvCapture
structure with cvReleaseCapture()
, or use
Ptr
that calls cvReleaseCapture()
automatically in the destructor.
device
- id of the opened video capturing device (i.e. a camera index).
If there is a single camera connected, just pass 0.public double get(int propId)
propId
- property identifier; it can be one of the following:
* CV_CAP_PROP_FRAME_WIDTH width of the frames in the video stream.
* CV_CAP_PROP_FRAME_HEIGHT height of the frames in the video stream.public java.util.List<Size> getSupportedPreviewSizes()
public boolean grab()
Grabs the next frame from video file or capturing device.
The methods/functions grab the next frame from video file or camera and return true (non-zero) in the case of success.
The primary use of the function is in multi-camera environments, especially
when the cameras do not have hardware synchronization. That is, you call
VideoCapture.grab()
for each camera and after that call the
slower method VideoCapture.retrieve()
to decode and get frame
from each camera. This way the overhead on demosaicing or motion jpeg
decompression etc. is eliminated and the retrieved frames from different
cameras will be closer in time.
Also, when a connected camera is multi-head (for example, a stereo camera or
a Kinect device), the correct way of retrieving data from it is to call
"VideoCapture.grab" first and then call "VideoCapture.retrieve" one or more
times with different values of the channel
parameter. See
https://github.com/opencv/opencv/tree/master/samples/cpp/openni_capture.cpp
public boolean isOpened()
Returns true if video capturing has been initialized already.
If the previous call to VideoCapture
constructor or
VideoCapture.open
succeeded, the method returns true.
public boolean open(int device)
Open video file or a capturing device for video capturing
The methods first call "VideoCapture.release" to close the already opened file or camera.
device
- id of the opened video capturing device (i.e. a camera index).public boolean read(Mat image)
Grabs, decodes and returns the next video frame.
The methods/functions combine "VideoCapture.grab" and "VideoCapture.retrieve" in one call. This is the most convenient method for reading video files or capturing data from decode and return the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return false and the functions return NULL pointer.
Note: OpenCV 1.x functions cvRetrieveFrame
and cv.RetrieveFrame
return image stored inside the video capturing structure. It is not allowed
to modify or release the image! You can copy the frame using "cvCloneImage"
and then do whatever you want with the copy.
image
- a imagepublic void release()
Closes video file or capturing device.
The methods are automatically called by subsequent "VideoCapture.open" and
by VideoCapture
destructor.
The C function also deallocates memory and clears *capture
pointer.
public boolean retrieve(Mat image)
Decodes and returns the grabbed video frame.
The methods/functions decode and return the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return false and the functions return NULL pointer.
Note: OpenCV 1.x functions cvRetrieveFrame
and cv.RetrieveFrame
return image stored inside the video capturing structure. It is not allowed
to modify or release the image! You can copy the frame using "cvCloneImage"
and then do whatever you want with the copy.
image
- a imagepublic boolean retrieve(Mat image, int channel)
Decodes and returns the grabbed video frame.
The methods/functions decode and return the just grabbed frame. If no frames has been grabbed (camera has been disconnected, or there are no more frames in video file), the methods return false and the functions return NULL pointer.
Note: OpenCV 1.x functions cvRetrieveFrame
and cv.RetrieveFrame
return image stored inside the video capturing structure. It is not allowed
to modify or release the image! You can copy the frame using "cvCloneImage"
and then do whatever you want with the copy.
image
- a imagechannel
- a channelpublic boolean set(int propId, double value)
propId
- property identifier; it can be one of the following:
* CV_CAP_PROP_FRAME_WIDTH width of the frames in the video stream.
* CV_CAP_PROP_FRAME_HEIGHT height of the frames in the video stream.value
- value of the property.


San Diego schools may join LA Unified lawsuit against Juul
SAN DIEGO (AP) - The superintendent of the San Diego Unified School District wants to join a Los Angeles Unified School District lawsuit against the e-cigarette company Juul.
The San Diego Union-Tribune reports Wednesday that Superintendent Cindy Marten says she will take the request to the school board.
The Los Angeles district filed its lawsuit last month, blaming the e-cigarette manufacturer for creating an epidemic of youth vaping.
The Union-Tribune says a state-administered survey for the 2017-2018 school year found in San Diego Unified about 4% of seventh graders and 7% of 11th graders surveyed used vaping devices in the 30 days prior to being surveyed.
Facing a host of complaints, Juul contends its products are intended as an alternative for adult smokers and that it is trying to combat underage use.
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


Hi, i am Pedro Martins
And this is, MoonWalk Hero
Keyboard Required to Play
Game Instructions
- The game aim to reach the maximum number of correct moves per round
- In each round the player will be able to bet
- Depending on its outcome the player can lose credits, or multiplies them
- In order to achieve desired minimum goal will have to complete 10 moves
- If player do more 10 moves double bet
- If player do more 18 moves Multiply 5 times your bet
- Q,W,O,P are the Keyboard keys to move Micheal Jackson


To question reality is but human nature. I felt that I needed to question it in the most perverse way possible. I would induce myself into a state of intoxication through the chemical known as psilocybin, which is the main active chemical found in shrooms.
I awoke that Saturday morning happy and sober, which was quite stifling seeing as how I'm always stoned! This Saturday marked the first day of summer and the only thing on my mind was when the call would come. I showered, I ate, I watched T.V., just like any other day. I sat there staring at the screen, clenching onto my phone, and then it came.  We're going back to my house, so meet us up at the top of the hill.' No good byes were needed, I just said, 'For sure', and it was left at that.
Leaving my house, I wondered how great it would be, to just trip. It's the first day of summer, and it's already going so great! I took the turn off my street, and started up the hill. This treacherous hill, it looked as if it were never going to end. I continued on and on and I finally reached the top. Luck would have it, just as I reached the top, my buddy and some people were walking up the other side of the hill, to a three way intersection of doom. We said, 'What up', to each other and started our descent down the third side of the hill.
We reached his house, this big, quiet house. There were five of us total, three of which were about to shroom.  'We need something to chase this down', I remember someone saying. 'Orange juice increases the trip', is what I believe I said to my friend who was peeking into his fridge. 'Sweet! We got some O.J.!', he yells to us in the living room. The perfect chaser and trip enhancer, orange juice!
You know when people say, 'I'm never gonna eat that! It looks so disgusting!'...  And the sight of watching people eat shrooms is just grand! Their faces squint as they try and chew up the nasty tasting caps and stems. I ate a few, one after the other, and then realized that I should just eat them all at once, to avoid the taste. So I grabbed them into one handful and chugged em down. I grabbed my o.j., waiting to swallow a bit of shrooms before taking a sip. The Exorcist was on and everyone sort of looked at each other and thought about if they really wanted to trip and watch such a messed up movie... so someone changed it to some gay movie called, Ice Princess.
 I realized that I had overall stopped my thinking process, or moreso, it had halted. As I realized that my thoughts had halted, I noticed something in the T.V. that sort of creeped me out. The pixels... the pixels are growing! 'Holy shit', I think to myself. They lined up in rows of yellow, red, and blue. There was no more picture on that screen, for me at least. It was just a few rows of red, yellow, and blue. I smiled and looked about the room, awaiting a response from the other two.
After this mild hallucination, I noticed that one of the people had left and in his place, another stood! It was perplexing at first, and then I remembered that he had said something about having to leave for baseball, and then I remembered someone stating that this other person was gonna come over. A few more minutes went by, and soon, we were all about the house. Walking in and out of the house; following each other with the greatest curiosity. Me and my original shroom buddy walked into his back yard and got onto this weird terrace place with stairs that went to a little dirt path. The dirt path had stones in it, like a little walkway.  I'm tripping so good!', I remember one of us saying.
'Hell ya man! Shrooms are THE best drug ever.', another said. I looked around and felt the shrooms take over... I felt this pressure on the upper part of my neck, right in the back of my head. It hurt and felt good all the same time; or maybe it didn't hurt, maybe it was just a different feeling than I'm used to. Whatever it was, it kicked in even harder. We laughed and laughed and turned back to head to the patio area below. As I turned, I noticed a lizard, and a giant lizard at that! It looked ready to pounce on me and devour my flesh. Then I came to a realization that the lizard was porcelin! 'No wonder it had a sun and clouds painted on its back', I thought to myself.
As we walked back to the stairs, I leaped from stone to stone, down the path. I pretended that I was leaping over lava and landing on rocks, saving myself. When I reached the stairs, I jumped and my pants fell clear down! 'Damn, I forgot my belt', I laughed to myself. I pulled them back up and laughed a little more. I took a seat and started staring; I stared at this odd looking tree in the distance and then resumed consciousness of what was going on around me. All at once, the four of them came out of the house and giggled about, and sat down in some chairs around me.
'Dude! What are you staring at?', one of them asked me, with a rather curious tone. They all start to giggle and look around. I kept staring and answered quietly, 'The trees, the nature, the colors... I dunno... I'm just trying to trip and enjoy myself.' Everyone calms themselves, and they all start to stare around them. All of a sudden the laughing erupts yet again! I can't help but join in on the laughter. We were cut short of pissing our pants of laughter, when we heard the front door open. Four people walked in; his mother, his father, and their friends.
'Not chill!', whispers one of the shroomers.  So I get up out of that chair, look around at everyone and say, 'Peace out guys, I think I'm gonna hike up through the hills.'
Walking along the side of his house, I started stumbling and almost fell over a few times. 'Where's he going?', I heard someone exclaim. I reached the side gate and turned out onto the street, and life never seemed so good. I was caught in a flurry of happiness, unexplainable happiness. Looking around at the trees and bushes, they seemed so much more alive. The world was there, and I was ready to explore it!
 After middle school, I would walk all the way down Monterey and then have to walk up this gargantuous hill. Today, I didn't feel like it was that gargantuaous... as a matter of fact, I quite enjoyed this walk. I reached the peak of the hill where I had met up with the shroomers, and walked on to a side street that lead to some marvelous views. These hills, these trees; people... It's beyond explanation how I felt and what I saw. Everything was just so beautiful and I was so happy!
My happiness reached its peak as I made it to the first view. I looked off to the distant hills, with all the bushes and trees on them. They were swaying about like... imagine if you had a bucket of water and poured some paint into it, the paint would float around within the water and just sort of swirl. The trees and bushes did the exact same thing. Their colors swirled around and just looked so amazing! I must have sat there for an hour or so, under the hot sun, happier than I had ever been in my life... and then it happened...
People talk about 'bad trips', and how they can happen at any moment. Some people believe that someone is trying to kill them, and others just feel trapped. Hearing these stories really made me scared to take shrooms. I got to a point of such happiness, that I was sad at the fact that it would all be gone soon. All of a sudden, I sat there under the sun staring off at the view, and I almost started to cry. 'It's gonna be over soon, and I can't do anything about it,' I thought. Imagine it, being happier than you have ever been, and knowing that it's just a matter of time before the happiness is gone. This thought disrupted everything, I stared at the view, but no satisfaction came from it.
 So I got up and started to head out. I took no more than ten steps before catching sight of a hilarious spectacle. There was an old man on an old-school exercise bike, a half-naked old man on an exercise bike! I passed him, staring with great intensity at this funny situation. He glared back at me, arms crossed, peddling away in his tighty-whities and robe. I let out a little laugh, and a sigh of disgust... but the fear, the pain that I had felt before was gone.
The hills, oh the hills... this was my favorite place to just walk through and think. These endless views to the south and north, east and west! All I could think about was how much more there was out there, in each direction, town after town... city after city... state after state... all the people, the life, the movement of this ongoing civilization.  Even in this age of pollution and smog, she can sprout new life and inhabit the Earth. Pardon my French, but Mother Nature is one tough bitch!
All I had to do on this day, was walk, walk and walk... and walk some more. I made sure that no matter how good I was feeling, that I would stay to the side of the road. I didn't want to end up on the news, ruining it for everyone else.
*imagined* 'Breaking story!
 Well, I didn't let that thought stop me either, I just headed on down the road. At some point I noticed a dad and his two sons passing a ball around, enjoying their first day of summer. I'm guessing they noticed something amiss as I passed, because the dad told his kids to walk back onto the driveway and he sort of stared me down.   I'm sure most people would think a box full of newborn, baby kittens to be more dangerous than me!
I lost thought of it as I continued on my journey of greater self awareness. I reached the next view that I had planned to go to, and it seemed to be exactly like the first time I had seen it on shrooms. You see, on my first shroom trip, I had ended it here at this ill lit side of the hill. I pledged that day, that I would continue to visit this glorious destination, of sheer brilliance. Now I was back, on shrooms once again, and it was great. The view was of a hill, that was in front of another hill, which was in front of another, and these hills just rolled back. one after the other, they were like an ocean of green, rolling on to the horizon. There was no vibrance to these colors here though, because the sun was set at a position too far to the east. Never the less, this view was still amazing.
I ended up making a big circle through the hills, ending up at the middle of the hill that I had walked up to meet my friends originally. As I walked up, I realized the thirst that had built up over the past few hours. My mouth felt like sandpaper; all I could think about was water. I happened to glance to the side of the road and to my amazement, there sat something that just blew my mind away. It was a water bottle! I bent over to pick it up and as luck would have it, it had been unopened! AND! It was sitting in some shade! 'What a coincidence' , I thought... no way, it couldn't have been coincidence. This water bottle appeared, because I wanted it to. I had THE power! Next I found myself wanting a hot chick with big titties and no diseases to pop up and give me a nice time... at that point I realized that the water bottle must have just been a coincidence.
I reached the peak of the hill, yet again, and had nothing to do and nowhere to go. I sat up against a wall, right next to where there is a 3-way intersection. Nothing funnier than staring at 3-way traffic, especially on the top of a hill with rather narrow streets. As people drove up to the stop sign ahead of me, they stared at me like mad! I almost caused two or three accidents in those couple of hours. I finally got bored of sitting there, possibly about to cause an accident, so I left. I knew of a party that was going to be going on later...
Me and my original shrooming buddy planned it out like this: trip the day away and end the night off at the party. It then occured to me that I had NO idea where he was, so I called him up. He told me he was at the Library, waiting for one of the other trippers to get picked up. I told him to start walking, and I'd walk towards him and we should run into each other. 'Alright', he confirmed. So I got up and started walking. I planned everything out while taking a shortcut that I knew. My train of thought crashed ubruptly as I gazed out upon another magnificent view. Beauty in the form of nature; wonderous sights, sounds, and smells everywhere I looked.
'Get it together!', I tell myself. I continued on my most excellent journey and tried to piece together the tracks from my earlier train of thought. I awaited the crossing signal to show the little guy 'walking', and started across. As I made my way to the other side, it felt as if the whole worlds eyes were glued on me. 'They know!', I think to myself... I started getting worried. I reached the other side and my anxiety vanished and a thought befell on me, 'We see so many cars pass us each day, and you never really get to see the driver. I wonder how many times in our lifetime we will run into each person that passes by us?' Perplexing, I know...
As I walked towards the Library, I decided to call up my buddy and see where he was. 'Eh, where are ya dude?', I ask him. 'On Monterey', he answered. 'Which side of Monterey fool?', I retorted. 'On the... right... side...?', he answered in a questioning tone. 'Your right can be my left dude! What intersection are you...', I stopped mid sentence as I spotted a guy on his phone, walking towards me on the other side of the street. 'Wait, I see you!', I scream into the phone. 'I see you too,' he screams back, 'wait... why are you walking away from me?', he adds.
I look behind me, utterly dumbfounded by what he said. I look back across the street.  I'm walking towards you, on the other side of the street!', I tell him. I was about to start waving, until I saw someone walking towards me on the same side of the sidewalk. It was HIM, and he was looking off to his left across the street, at the same guy I had mistaken him for.  He turns his head and spots me walking right towards him and laughs as he realizes what just happened.
'Oh man! You have NO idea how bomb my trip was!', I exclaim as I approached him. 'Mine too dude!', and he starts telling me the story, 'after you left my house, we went to snake trail, and the other two fools started tripping out bad. One of them remembered that they had to go to a dinner thing and the other one had to go home soon. So we got outta there and started walking down some street, and there was one drive-way that was all high, and the drop off of it landed in the next drive-way.' I started visualizing the scene in my head. He continued, 'I ran and jumped off the higher one and then as I was coming down, I perceived myself falling back to the ground, from the ground's perspective!' And that was as much of his story as I remembered.
I went on to tell him what I had done since leaving his house earlier that day. We proceeded on to go to the 'party house', and saw a mass of cops drive by us on the way. We freaked out a bit, since we were still trippin' a bit, but kept our cool as best we could. We saw some skater guys that didn't look too familiar walk our way. As we got closer, I SWEAR ON EVERYTHING I OWN! One of the skaters looked EXACTLY like one of the cavemen guys from the Geiko commercials... You know, 'So easy, a caveman can do it.' After we passed them by a considerable distance, my buddy leans over and whispers to me, 'Dude... am I just trippin'... or did I just see a monkey?!' I couldn't resist but laugh at that remark. 'I dunno man... I saw it too, but then again... we are on shrooms,' I responded, still laughing a bit.
We turned onto another road and continued on our journey. I spotted a trail off to the side that I had never been ... I asked him if he knew where it went, but he had no idea, so we just took it. That day we discovered, for the first time, a jogging trail. It led under the freeway and ended up right at the soccer fields where I used to play soccer.
As we stepped onto the field, I had a sudden feeling of deja vu. 'This right here; this place, these people, this smell, this vibe... it seems so much like a dream I've had before,' I tell him. 'Dude... trippy,' he responds. As we reached the end of the soccer field, passed the play ground, and neared the baseball fields, he received a call from his mom. I took that opportunity to take a nice long drink from a nearby water fountain. I sighed and thought to myself, 'How refreshing!' After he finished the conversation with his mom, we continued on with our last hundred yards or so of walking.
This guy's house was a little farm place. It was painted a worn out reddish color. As we approached, we noticed a little old hispanic lady, sweeping up the back porch. She yells something in Spanish, and out comes the fool we came to see.   The pizza and brew are on the way. So what do you fools wanna do till then?', he asks. Instinctively I ask, 'Do you have a cig man?'
'Ya', he replies. We go to the far back of the property, so as not to be in the old lady's view. I spark up my cig and sigh. 'Ah, nothing better on a comedown than a nice, warm cig', I think to myself. After we finished, we sat there for a few more minutes talking about the 'party', and then we got up and went back to the house. He turns on his X-Box and hands us each a controller, then asks, 'Do you guys want anything to drink?' 'For sure', we both answered. We sat and played the video game, and all of a sudden, I got the distinct feeling that someone was sneaking up on me. I peak behind me and see him tip-toeing up. He gives me the 'Shhh' signal with his left index finger, and in the right hand, he was holding a bright orange snake! He puts it on my tripper buddie's shoulder, expecting him to freak out. What happened was quite the opposite!  CHILL!'
The snake slithered about, and we were all fixated upon the mystical orange serpant. We hung out there for a little while longer until the host got a call from the dudes who were bringing over the brew. They were outside, so we went out, got the brew and they said they had to leave right away. We didn't question it, and the host took the brews over to this small little play house. I suppose it was his little sisters, seeing as how it was very girly and had a bunch of miniature horses in it and what not. Next arrived the pizza. We had ourselves a feast, with a couple of Coronas to wash it all down. A few more people came over to the 'party', but it was truly lame. So a couple of us decided to go off and find another shindig.
 At that point, me and the original shroom buddy decided to head off home, since we lived in the same general direction anyway. It must've been around 8PM or so by now, the sun had just gone down and a question popped into my head. '
'Would you prefer to trip in the day? Or at night?', I asked him. 'Shrooming at night is really chill.'  It seems scarier, colder, lonlier, as opposed to the day when you get to see all the bomb views and colors', I retorted. We were consumed by silence as we walked. My high was, for the most part, gone.. although I still had a heightened sense of things around me. I thought about my question and answer that I had given about tripping. Then we reached his house, and I said, 'Peace out dude, and thanks for the trip!'
'For sure dude. Peace', he answers back. I kept hiking up that hill... that same hill I had walked down and up after his parents got home earlier. As I reached one of the cool hills with a nice view, I tried to visualize those colors again, but it was no use in the darkness of this tree lined hill.
The moon was... MAGNIFICENT! So much so, that I had to stop at the peak of the hill to look up at it. I started down the hill I climbed earlier that day, to meet up with my friend, before we took the shrooms. As I walked down, I looked at the curb that I had found the water at earlier on, and then turned my attention to the last great view. A sea of lights, extending as far as the eye could see. Milllions of little bulbs, flashing that faint, orange glow. I kept on walking, and realized that it must've been pretty late, and it amazed me that I hadn't received a call from my dad all day... Out of nowhere, a loud noise erupts... it was my ringtone. Sure enough, it was my dad.
'Where are you?', he asks me, rather calmly. 'On my way. I should be home in a few minutes', I responded coolly. I reach the corner where the hill street hits my street, and I look back. 'Today was a good day', I think to myself. I take a right onto my street, walking up that little hill. I make it to the drive-way and start to walk to the stairs to my house, when I hear a door slam. I look and my dad is at the back of his van, putting away some tools for work the next day.
'Hey dad!', I exclaim. He looks around puzzled, then finds me in the darkness. 'Oh, hello Dominic', he says back. I go into the house, walk down the hall to my room, close the door behind me and sit down... All I could think about at that point was, how to express my day to everyone.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


|
Social Network
1.6
Working template of a social network, built with Objective-C, Parse.com and Firebase.com
|
#import <ESHashtagTimelineViewController.h>
Instance Methods | |
| (ESPhotoHeaderView *) | - dequeueReusableSectionHeaderView |
| (ESPhotoFooterView *) | - dequeueReusableSectionFooterView |
| (NSIndexPath *) | - indexPathForObject: |
| (void) | - userDidLikeOrUnlikePhoto: |
| (void) | - userDidCommentOnPhoto: |
| (void) | - userDidDeletePhoto: |
| (void) | - userDidPublishPhoto: |
| (void) | - userFollowingChanged: |
| (void) | - didTapOnPhotoAction: |
| (void) | - postNotificationWithString: |
| (id) | - initWithStyle:andHashtag: |
| Instance Methods inherited from <ESPhotoHeaderViewDelegate> | |
| (void) | - photoHeaderView:didTapUserButton:user: |
| Instance Methods inherited from <ESPhotoFooterViewDelegate> | |
| (void) | - photoFooterView:didTapLikePhotoButton:photo: |
| (void) | - photoFooterView:didTapCommentOnPhotoButton:photo: |
| (void) | - photoFooterView:didTapSharePhotoButton:photo: |
Properties | |
| UIActivityIndicatorView * | activityIndicator |
| NSString * | hashtag |
| BOOL | shouldReloadOnAppear |
| NSMutableSet * | reusableSectionHeaderViews |
| NSMutableSet * | reusableSectionFooterViews |
| NSMutableDictionary * | outstandingSectionHeaderQueries |
| NSMutableDictionary * | outstandingSectionFooterQueries |
| NSMutableDictionary * | outstandingFollowQueries |
| NSMutableDictionary * | outstandingCountQueries |
| UIScrollViewIndicatorStyle | indicatorStyle |
| UITapGestureRecognizer * | tapOnce |
| UITapGestureRecognizer * | tapTwice |
Interface of the HashtagTimelineViewController
| - (ESPhotoFooterView *) dequeueReusableSectionFooterView |
Dequeueing a section footer that is out of view and can be reused.
| - (ESPhotoHeaderView *) dequeueReusableSectionHeaderView |
Dequeueing a section header that is out of view and can be reused.
| - (void) didTapOnPhotoAction: | (UIButton *) | sender |
Open the photo details viewcontroller as the users taps on a photo
| sender | id of the photo button used to open the correct detail viewcontroller |
| - (NSIndexPath *) indexPathForObject: | (PFObject *) | targetObject |
We want to implement a section based timeline, thus we need to override this method to return the correct indexPath (esp. the correct section).
| targetObject | the targeted object in an array of PFObjects |
| - (id) initWithStyle: | (UITableViewStyle) | style | |
| andHashtag: | (NSString *) | hashtag | |
Custom init method with a new parameter, the hashtag string
| style | tableview style |
| hashtag | string of the hashtag |
| - (void) postNotificationWithString: | (NSString *) | notif |
Posting notification to the notification center in order to communicate with other viewcontrollers
| orientation | the actual notification string |
| - (void) userDidCommentOnPhoto: | (NSNotification *) | note |
User has commented on a photo, thus the tableview should be updated.
| - (void) userDidDeletePhoto: | (NSNotification *) | note |
User deleted a photo, thus the tableview should be updated.
| - (void) userDidLikeOrUnlikePhoto: | (NSNotification *) | note |
User has liked or unliked a photo, thus the tableview should be updated.
| - (void) userDidPublishPhoto: | (NSNotification *) | note |
User did publish a photo, thus the tableview should be updated.
| - (void) userFollowingChanged: | (NSNotification *) | note |
Following status change, thus the tableview should be updated
|
readwritenonatomicretain |
Spinner wheel indicating if we're loading something or not.
|
readwritenonatomicretain |
The hashtag we're looking the timeline through.
|
readwritenonatomicassign |
The style of the scroll indicator on the right side of the view
|
readwritenonatomicstrong |
Mutable dictionary of photo count queries still outstanding.
|
readwritenonatomicstrong |
Mutable dictionary of followerqueries stil outstanding.
|
readwritenonatomicstrong |
Mutable dictionary of section footer queries that are still outstanding.
|
readwritenonatomicstrong |
Mutable dictionary of section header queries that are still outstanding.
|
readwritenonatomicstrong |
Mutable set of reusable section footers. We want to reuse them once they're out of view and not create a unnecessary huge number of them.
|
readwritenonatomicstrong |
Mutable set of reusable section headers. We want to reuse them once they're out of view and not create a unnecessary huge number of them.
|
readwritenonatomicassign |
Defining if the timeline should be reloaded on appear.
|
readwritenonatomicstrong |
Gesture recognizer used to recognize a single tap on a photo.
|
readwritenonatomicstrong |
Gesture recognizer used to recognize a double tap on a photo. Note: an instagram-like double tap like could be implemented here.


class: center, middle # .center[SoftLayer API] ### .center[How it works, and what to do when it doesn't] Christopher Gallo, Senior API Developer --- # Christopher Gallo - Responsible for helping customers use the API - Maintain sldn.softlayer.com - Maintain the SLCLI (softlayer-python library), and other open source libraries - 10+ years working at SoftLayer, in a variety of roles. --- # .center[Anatomy of an API Call] .center[https://api.softlayer.com] - Public Internet Endpoint. .center[https://api.service.softlayer.com] - Private Network Endpoint - Only difference is the SoftLayer_Resource_Metadata service. --- Specify the endpoint type and version ## api.softlayer.com/
rest
/
v3.1
.columnA[ ### Types - REST - SOAP - XMLRPC - Mobile ### Versions - v3 - v3.1 ] .columnB[
] --- API is broken down into "Services", which contain a collection of methods that perform some action.
## api.softlayer.com/rest/v3.1/
SoftLayer_Service
Data returned by the API is broken down into "Datatypes". Services usually have a matching datatype, but not all data types have a matching service. - https://sldn.softlayer.com/reference --- Methods tell the API which action to actually run in a class/service. ## api.softlayer.com/rest/v3.1/ SoftLayer_Service/
method
- https://sldn.softlayer.com/reference/services/SoftLayer_Account/getObject/ ```bash $ curl -s -u $SL_USER:$SL_APIKEY \ 'https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getObject.json' {"accountManagedResourcesFlag":false,"accountStatusId":1001,"address1":"4849 Alpha Rd","allowedPptpVpnQuantity":0,"brandId":2,"city":"Dallas", LOTS OF DATA} ``` --- Some methods require an InitParamter, listed in the documentation. For REST calls, this goes between the Service and Method. For SOAP/XML requests, this is set in the header. ## api.softlayer.com/rest/v3.1/SoftLayer_Service/
initParameter
/method - https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getObject/ ```bash $ curl -s -u $SL_USER:$SL_APIKEY \ 'https://api.softlayer.com/rest/v3.1/SoftLayer_Virtual_Guest/100317048/getObject' {"accountId":307608,"createDate":"2020-04-07T04:01:49-06:00","dedicatedAccountHostOnlyFlag":false,"domain":"chechu.com", OTHER DATA} ``` --- You can control the format of the returned data by adding .FORMAT to the end of the URI. This is optional, JSON is assumed for REST calls. ## api.softlayer.com/SoftLayer_Service/ initParameter/method
.json
### Available formats - json - txt - xml --- Object Masks are specified as URL parameters, and take the form of a nested array, starting at the data type returned by the method. ## api.softlayer.com/SoftLayer_Service/ initParameter/method
?objectMask=mask[id,name,relationalProperty[id, name]] ```bash $ curl -s -g -u $SL_USER:$SL_APIKEY 'https://api.softlayer.com/rest/v3.1/ SoftLayer_Virtual_Guest/100317048/getObject?objectMask=mask[id,hostname]' {"hostname":"activedirectory","id":100317048} ``` > -g for curl lets you use un-escaped brackets > > -s for curl silences transport output --- ## What is an object mask? - https://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getObject/ Returns a [SoftLayer_Virtual_Guest datatype](https://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest/) Think of a datatype as a table in a database. - Local Properties + Selecting a local property "deselects" all the other default properties that would normally be returned. + This is ideal to reduce the size of the data returned. - Relational Properties + Selecting these "joins" in other tables to the query + Have their own set of local and relational properties - Count Properties + Returns a count of how many of these an object has. --- ```python mask[ id, # local hostname, # local datacenter[ # relational, SoftLayer_Location datatype id, # local to SoftLayer_Location name, # local to SoftLayer_Location timezone # relational, SoftLayer_Locale_Timezone ] ] ``` ```bash $ curl -s -g -u $SL_USER:$SL_APIKEY 'https://api.softlayer.com/rest/v3.1/ SoftLayer_Virtual_Guest/100317048/getObject * ?objectMask=mask[id,hostname,datacenter[id,name,timezone]]' { "hostname":"activedirectory","id":100317048, "datacenter":{ "id":1854895, "name":"dal13", "timezone":{ "id":114, "longName":"(GMT-06:00) America\/Dallas - CST", "name":"America\/Chicago", "offset":"-0600", "shortName":"CST"} } } ``` --- ## Object Filters While object masks let you select which columns from a query you want. Object Filters let you select which rows from the query you want. These are essentially the `WHERE` clause for any given query. - https://sldn.softlayer.com/article/object-filters/ ### Gotchas - Filters generally start the top level at the Service's datatype, NOT the return datatype. - Errors and Bad filters can be silently ignored. - Can only filter the number of rows in the returned datatype. Can not limit rows from any of the relational properties. - `OPTIONS` are an array of usually a single property. --- ## ObjectFilter Example ```bash curl -u $SL_USER:$SL_APIKEY 'https://api.softlayer.com/rest/v3.1/ SoftLayer_Account/getVirtualGuests.json * ?objectFilter={"virtualGuests":{"hostname":{"operation":"adns"}}}' [{"domain":"vmware.chechu.com","fullyQualifiedDomainName":"adns.vmware.chechu.com","hostname":"adns","id":100250634, OTHERDATA}}] ``` --- ## Result Limits Allows you to 'page' through results. Only useable if the return datatype is an array (marked by `[]`) Added as a URL parameter like `resultLimit=
,
` `SoftLayer-Total-Items` header tells you how many total items to expect. ```bash curl -u $SL_USER:$SL_APIKEY 'https://api.softlayer.com/rest/v3.1/ * SoftLayer_Account/getTickets.json?resultLimit=0%2C10' ```
*NOTE* SQL still needs to compute the query, so adding a limit will not solve errors that are caused by SQL taking too long to return. --- ## All of the Above ```bash $ curl -s -v -g -u $SL_USER:$SL_APIKEY 'https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getVirtualGuests.json ?objectFilter={"virtualGuests":{"hostname":{"operation":"adns"}}} &objectMask=mask[id,hostname] &resultLimit=0,10' [{"hostname":"adns","id":100250634}] < HTTP/1.1 200 OK < Date: Tue, 21 Apr 2020 21:44:04 GMT < Server: Apache < X-Frame-Options: SAMEORIGIN *< SoftLayer-Total-Items: 1 < Content-Length: 36 < Vary: Accept-Encoding < Connection: close < Content-Type: application/json < Strict-Transport-Security: max-age=31536000 ``` --- ## Parameters - Any method that takes in parameters requires a POST request. - Parameters are NOT named in the request, but order does matter. Should match the order from the documentation. - [SoftLayer_Dns_Domain::createNsRecord()](https://sldn.softlayer.com/reference/services/SoftLayer_Dns_Domain/createNsRecord/) ```bash curl -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": ["ns1.sltesting.com.", "<IP_ADDRESS>", 3600]}' 'https://api.softlayer.com/rest/v3.1/SoftLayer_Dns_Domain/ 3217092/createNsRecord.json' ``` --- - Some parameters are Objects or arrays themselves, and are specified in a JSON format [SoftLayer_Dns_Domain_ResourceRecord::createObject()](https://sldn.softlayer.com/reference/services/SoftLayer_Dns_Domain_ResourceRecord/) ```bash curl -u $SL_USER:$SL_APIKEY -X POST -d '{"parameters": [{"data": "<IP_ADDRESS>", "host": "test", "type": "NS", "ttl": 3600, "domainId": 3217096}]}' 'https://api.softlayer.com/rest/v3.1/SoftLayer_Dns_Domain_ResourceRecord/ createObject' ``` ### Basic Format ```json {"parameters":[ "parameter1", {"parameter2": "is an object parameter"}, [{"parameter3": "is an array"}, {"of other objects"}] ]} ``` --- ## SLCLI [SLCLI Docs](https://softlayer-python.readthedocs.io/en/latest/) [SLCLI Project](https://github.com/softlayer/softlayer-python) ```bash $ slcli call-api --help Usage: slcli call-api [OPTIONS] SERVICE METHOD [PARAMETERS]... Call arbitrary API endpoints with the given SERVICE and METHOD. Options: --id TEXT Init parameter --mask TEXT String-based object mask --limit INTEGER Result limit --offset INTEGER Result offset -v, --verbose Sets the debug noise level, specify multiple times for more verbosity. --format [table|raw|json|jsonraw] Output format [default: raw] --json-filter TEXT A JSON string to be passed in as the object filter to the API call. Remember to use double quotes ("") for variable names. Can NOT be used with --filter. Dont use whitespace outside of strings, or the slcli might have trouble parsing it. ``` --- ## SLCLI Debugging ```bash $ slcli -vvv call-api SoftLayer_Account getObject Calling: SoftLayer_Account::getObject(id=None, mask='', filter='{}', args=(), limit=None, offset=None)) Starting new HTTPS connection (1): api.softlayer.com:443 https://api.softlayer.com:443 "GET /rest/v3.1/SoftLayer_Account/getObject.json HTTP/1.1" 200 5053 Returned Data: {'accountManagedResourcesFlag': False, 'accountStatusId': 1001, 'address1': '4849 Alpha Rd', LOTS OF OUTPUT } execution_time 0.319053s api_calls SoftLayer_Account::getObject (0.207001s) id None mask filter {} limit None offset None curl -u $SL_USER:$SL_APIKEY -X GET -H "Accept: */*" -H "Accept-Encoding: gzip, deflate, compress" 'https://api.softlayer.com/rest/v3.1/SoftLayer_Account/getObject.json' ``` --- ## SLCLI Debugging ```bash $ slcli -vvv --format=json call-api [SERVICE] [METHOD] [--id
] [--json-filter
] [--mask
] [--limit
] [--offset
] [param1] [param2] [param3] [paramX] ``` [Code Debugging](https://softlayer-python.readthedocs.io/en/latest/api/client/#debugging) --- ## SLCLI XML - Debug output depends on the endpoint you are using. + REST endpoint will output a curl call. + XMLRPC endpoint will output a basic python program with payload. --- ## IBMCLOUD SL [IBMCLOUD CLI](https://cloud.ibm.com/docs/cli?topic=cloud-cli-getting-started) has a function call `sl` which mimics the slcli. Developed as a seperate product, but still supported to some extent. Has a similar call-api function. `IBMCLOUD_TRACE=true` to enable API call output, all in REST. --- ## Debugging - What you need to know before opening a support ticket + Code snippet using a supported library is fine, Pure curl call is better. + api user is helpful. Never write down API key. + Did this work in the past, or trying to get it to work. + How reproduceable is it? + The actual error the SL API returned. * `SoftLayer_Exception_
` * Internal Server Error --- ## Common Errors - [Exception Handling](https://sldn.softlayer.com/article/exception-handling-softlayer-api/) [Timeout Handling](https://sldn.softlayer.com/article/how-solve-error-fetching-http-headers/) - `SoftLayer_Exception_ObjectNotFound` or `SoftLayer_Exception_NotFound` + Object doesn't exist, or user doesn't have access. Check initParameters - `SoftLayer_Exception_WebService_BadRequest` + Generic error meaning your request wasn't parseable. Check the objectMaks/objectFilter/parameters for formatting errors. - `SoftLayer_Exception_Public` / `Internal Server Error` + Generally means you asked for too much data. Check the objectMask, reduce number of relational properties. Use a result Limit + Sometimes can indicate a deeper problem, check splunk for more details. - `Timeout` + Query was too complicated for the database to calculate in time, was forceibly closed. Check object mask, or possible object filters.  Data overload is the most common problem. Here are 3 API calls to the same method. First works just fine. Second fails, but has a 200 OK HTTP code Third Fails with a 500 HTTP code, but no message. --- ## DATA OVERLOAD ```bash $> time curl -v -u $SL_USER:$SL_APIKEY -g 'https://api.softlayer.com/rest/v3.1/ SoftLayer_Account/getInvoices.json?objectMask=mask[id,invoiceTopLevelItems]&resultLimit=0,2000' 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0{ [5 bytes data] 0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0 < HTTP/1.1 200 OK < Date: Thu, 30 Apr 2020 22:03:35 GMT < SoftLayer-Total-Items: 7925 *< Content-Length: 1706185 ( 1.706185 MB) 100 1666k 100 1666k 0 0 165k 0 0:00:10 0:00:10 --:--:-- 436k real 0m10.103s ``` ```bash $> time curl -v -u $SL_USER:$SL_APIKEY -g 'https://api.softlayer.com/rest/v3.1/ SoftLayer_Account/getInvoices.json?objectMask=mask[id,account]&resultLimit=0,2000' 0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0{ [5 bytes data] 0 0 0 0 0 0 0 0 --:--:-- 0:00:03 --:--:-- 0 < HTTP/1.1 200 OK < Date: Thu, 30 Apr 2020 21:57:02 GMT < SoftLayer-Total-Items: 7925 *< Content-Length: 133522001 ( 133.522001 MB) 100 127M 100 127M 0 0 8221k 0 0:00:15 0:00:15 --:--:-- 10.7M real 0m19.761s ``` ??? First call takes 9 seconds to return, indicating a long time pulling data from the DB. Second call takes 3 seconds to return, but a very large Content-Length, indicting too much data was returned. --- ## Contributing - [SLCLI](https://github.com/softlayer/softlayer-python) Python + https://github.com/softlayer/softlayer-python - [SLDN](https://github.com/softlayer/githubio_source) Markdown + https://github.com/softlayer/githubio_source


Jeff
Judkins
Hi! I'm Jeff Judkins. I'm a hacker, engineer, coder, kiteboarder, sometimes an artist and sometimes a writer. Feel free to reach out.


Gateway
BOT
23-Jul-18 03:20 AM
[dscrdeql] <CowboyCrypto- Founder> I’ve retired but man this was a fun job
[dscrdeql] <CowboyCrypto- Founder> Lol I’m djing a benefit
[dscrdeql] <AndronicusBass-Founder> Body by bacon lol love it. I remember tv ads in the 90's body by jake. rock hard aba dabbas hahaha
[dscrdeql] <Jellysmash> Body by bacon.....
[dscrdeql] <cellulitis> i need bacon
[dscrdeql] <Jonathan> we all need bacon
[dscrdeql] <cellulitis> ever had bacon with maple syrup?
[dscrdeql] <cellulitis> make it into candied bacon?
[dscrdeql] <Catalyst> Heyo everyone.  I might try that with chicken
[dscrdeql] <Jonathan> I make some good fried potatoes, and country delicacy
[dscrdeql] <cellulitis> @AndronicusBass-Founder might be too sweet
[dscrdeql] <cellulitis> unless you wrap the chicken breast in some bacon then bake and glaze?
[dscrdeql] <AndronicusBass-Founder> maybe prosciutto nice and salty
[dscrdeql] <cellulitis> tomatoe goes well with prosciutto
[dscrdeql] <AndronicusBass-Founder> yeah, nice and reduced,
[dscrdeql] <AndronicusBass-Founder> I love savoury decadent things
[dscrdeql] <cellulitis> dude
[dscrdeql] <cellulitis> you have to try sea salt dark chocolate caramels
[dscrdeql] <cellulitis> it brings chocolate to a new level
[dscrdeql] <CowboyCrypto- Founder> Jonathan your from Appalachia id expect nothing less
[dscrdeql] <Jonathan>
[dscrdeql] <AndronicusBass-Founder> good food there or something?
[dscrdeql] <AndronicusBass-Founder> apple and chia hahaha
[dscrdeql] <Jonathan> just fattening goodness
[dscrdeql] <AndronicusBass-Founder> nice haha
[dscrdeql] <cellulitis> chia is good for
[dscrdeql] <Jonathan> sorry what is chia? a vegatable?
[dscrdeql] <NWhiskeyTango> Making me hangry
[dscrdeql] <MySoulisNotForSale> chia pet
[dscrdeql] <MySoulisNotForSale> grows hair when you water it
[dscrdeql] <MySoulisNotForSale> lol
[dscrdeql] <NWhiskeyTango> Lol yup
[dscrdeql] <Jonathan> lol That's the first thing I thought of @MySoulisNotForSale
[dscrdeql] <NWhiskeyTango> :EQLI:
[dscrdeql] <NWhiskeyTango> Where's my ?
[dscrdeql] <NWhiskeyTango> ^ hehe
[dscrdeql] <AndronicusBass-Founder> and chia seeds you can eat, healthy
[dscrdeql] <cellulitis> chia is a seed
[dscrdeql] <cellulitis> it is high in omega 3
[dscrdeql] <Jonathan> ahhh ok


How much do you pay?
Do include any endowment premiums linked to the mortgage.
Do not include premiums for any other type of insurance, money you owe that should have been paid earlier, or any amount of mortgage that you are voluntarily overpaying.
Do include any endowment premiums linked to the mortgage.
Do not include premiums for any other type of insurance, money you owe that should have been paid earlier, or any amount of mortgage that you are voluntarily overpaying.


| Class and Description |
|---|
| mdlaf.components.filechooser.MaterialFileChooserUI.MaterialFileChooserEvents
This class is deprecated because the developer found an bun inside mouse hover effect on button
This class will be removed inside the version 1.1.1 after the test inside the version rc4.
|
| mdlaf.components.tabbedpane.MaterialTabbedPaneUI.MaterialTabbedPaneLayout
remove this implementation inside the version 1.2 of the library.
|
| mdlaf.components.taskpane.MaterialTaskPaneUI.ChangeIconOnClick
This class is deprecated from version 1.1.1 official and will be removed in the version 1.2
the function of this class is made from the native SwingX 1.6.1 class.
Look the class MaterialPaneBorder, the icons now is changed inside the paintChevronControls method
|
| Field and Description |
|---|
| mdlaf.utils.MaterialImageFactory.DOWN_ARROW
Use iconfont, look the documentation here
https://github.com/vincenzopalazzo/material-ui-swing/blob/master/docs/CHANGELOG.md#used-iconfontswing-library-for-add-other-icons
|
| mdlaf.utils.MaterialImageFactory.LEFT_ARROW
Use iconfont, look the documentation here
https://github.com/vincenzopalazzo/material-ui-swing/blob/master/docs/CHANGELOG.md#used-iconfontswing-library-for-add-other-icons
|
| mdlaf.components.filechooser.MaterialFileChooserUI.lifeCycleEvent
This propriety is deprecated because the developer found an bun inside mouse hover effect on button
This propriety will be removed inside the version 1.1.1 after the test inside the version rc4.
|
| mdlaf.utils.MaterialImageFactory.RIGHT_ARROW
Use iconfont, look the documentation here
https://github.com/vincenzopalazzo/material-ui-swing/blob/master/docs/CHANGELOG.md#used-iconfontswing-library-for-add-other-icons
|
| mdlaf.utils.MaterialImageFactory.UP_ARROW
Use iconfont, look the documentation here
https://github.com/vincenzopalazzo/material-ui-swing/blob/master/docs/CHANGELOG.md#used-iconfontswing-library-for-add-other-icons
|
| Method and Description |
|---|
| mdlaf.animation.MaterialUIMovement.add(JComponent, Color)
This method will be deprecated inside the version 1.2 of the library.
you can @see getMovement method
|
| mdlaf.animation.MaterialUIMovement.add(JComponent, Color, int, int)
This method will be deprecated inside the version 1.2 of the library.
you can @see getMovement method
|
| mdlaf.utils.MaterialFontFactory.fontUtilsDisplayable(String, Font)
this method will be removed in the version 1.2, this method is not really util fot the library.
|
| mdlaf.components.button.MaterialButtonUI.getBackground()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getColorMouseHoverDefaultButton()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getColorMouseHoverNormalButton()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getDefaultBackground()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getDefaultForeground()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getDisabledBackground()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getDisabledForeground()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.getForeground()
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.animation.MaterialUIMovement.getStaticMovement(JComponent, Color, Color)
This method will be removed inside the version 1.2, because with the new MaterialButtonApi, you can create
a personal instance of the button, with an personal Listener, @see MaterialButtonUI
|
| mdlaf.components.button.MaterialButtonUI.setBackground(Color)
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.setDefaultBackground(Color)
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.setDefaultForeground(Color)
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.setDisabledBackground(Color)
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.setDisabledForeground(Color)
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|
| mdlaf.components.button.MaterialButtonUI.setForeground(Color)
This method will be removed inside the version 1.2, it is a old method used inside the Timer to restore the default value
|


| TicketID: 409788 | |
|---|---|
| Name: |
No Active Support
|
| Email: |<EMAIL_ADDRESS>|
| Response Time: | 72hourt, 60hours left |
| Last Action: | Never been locked. |
| Link to public post | |
| Status: | Not answered |


Welcome!
I currently teach statistics and data science at Winona State University in Winona, MN. This website hosts all my course materials for courses I am teaching and have previously taught. Feel free to use and modify as you see fit. I also use this page as a resource for my students and as a professional portfolio.
Professional interests
Socrates once said "Education is the kindling of a flame, not the filling of a vessel."Personal interests
My other interests include backpacking; racquetball; baseball (both fantasy and actual); podcasts; games (board and card variety); craft beer; and spending time with my wife and two boys. Life is full.