Base URL: /v1/eth, Version: 0.9.0-alpha
Account management APIs
| Operation | Description |
|---|---|
| GET /accounts | List accounts |
| POST /accounts | Create account |
| GET /accounts/{name} | Get account |
Contract APIs
| Operation | Description |
|---|---|
| GET /contracts | List contracts |
| POST /contracts | Create contract |
| GET /contracts/{name} | Get contract |
| POST /contracts/{name}/invoke | Invoke a contract |
Payment APIs
| Operation | Description |
|---|---|
| POST /transactions/payments | Create a signed payment transaction to transfer ETH between 2 accounts |
| POST /transactions/tokenpayments | Create a signed payment transaction to transfer ERC-20 tokens between 2 accounts |
accessCode
https://api.chainfront.io/oauth/authorization
https://api.chainfront.io/oauth/token
Returns a paginated list of all accounts.
| pageSize | Number of accounts returned |
query | integer | |
| pageNumber | Page number |
query | integer |
A list of accounts
Invalid request
User not authorized to perform this operation
| OAuth2 | read:accounts |
Create a new account
Account to create. 'name' is the only field required.
Account created successfully
Invalid request
User not authorized to perform this operation
| OAuth2 | read:accounts , write:accounts |
Returns account details for the given account name
| name | Name of account |
path | string |
Account details
Invalid request
User not authorized to perform this operation
| OAuth2 | read:accounts |
Returns a paginated list of all contracts.
| pageSize | Number of contracts returned |
query | integer | |
| pageNumber | Page number |
query | integer |
A list of contracts
Invalid request
User not authorized to perform this operation
| OAuth2 | read:contracts |
Create a new contract
The contract to create.
Contract created successfully
Invalid request
User not authorized to perform this operation
| OAuth2 | read:contracts , write:contracts |
Returns contract details for the given contract name
| name | Name of contract |
path | string |
Contract details
Invalid request
User not authorized to perform this operation
| OAuth2 | read:contracts |
Invoke a contract
ABI payload indicating the function and data to call on the contract.
| name | Name of contract |
path | string |
Contract details
Invalid request
User not authorized to perform this operation
| OAuth2 | read:contracts , execute:contracts |
Transfers Ether between 2 accounts. The source account must have sufficient balance to pay the gas fee.
Payment request object
Successful operation
Invalid request
User not authorized to perform this operation
| OAuth2 | write:payments |
Transfers ERC-20 tokens between 2 accounts. The source account must have sufficient balance to pay the gas fee.
Token payment request object
Successful operation
Invalid request
User not authorized to perform this operation
| OAuth2 | write:payments |
The unencoded function signature.
"myMethod(uint,uint32[],bytes10,bytes)"
The status of the account.
The status of the contract.
Amount to pay, in wei
"100.00"
Name of the account which has the ERC-20 token contract
Amount of ERC-20 tokens to transfer
"100.00"


Janino, an embedded compiler for the JavaTM programming language.
For download, documentation and contact see http://janino.net.


Digital Foundry examines Pokemon Sword & Shield
by My Nintendo News AdminThe latest game which the team over at Digital Foundry has tackled is the newly released Pokemon Sword & Shield for the Nintendo Switch platform. The summary to take away here is that technically it doesn’t quite live up to expectations as the first next generation Pokemon game for the Nintendo Switch. However, that’s from a technical perspective and I’m sure many of you are enjoying it. Here’s a full summary thanks to Reset Era member Joseki:
- Engine is an evolved version of Let’s Go.
- Wild Area is big, surprisingly high foliage density and nice bloom effect.
- City design more in line with Sun and Moon’s standard than Let’s Go “grid based” design.
- Locked camera in city helps performance.
- Shadows improved over Sun and Moon, now proper shadows are present outside of battles too.
- Over 400 Pokémon cut, Z-moves, Mega and many online features are removed for increased quality…
- … but environments are mostly static (“window dressing”), huge repetition of rooms and decorations.
- Texturing is generally of poor quality highlighted by the low camera angle.
- Dynamic shadow system is impressive, but it has a lot of flickering. It can look rough.
- Pop-in is a huge issue, rendering range is extremely limited and almost comical.
- Human character higher detailed than ever, but contrary to Game Freak’s pre release statements the Pokémon models were not reworked.
- Lighting and material interactions are sensibly increased over the 3DS, but it does not explain the huge cut of Dex. Why are Pokémon from Let’s Go missing if they were already reworked?
- Compared to BotW and Xenoblade 2, the game is “in a lower league”.
- Docked res: 1080p indoor, dynamic res outsidide (864p worse case scenario). Game is more demanding than Let’s Go so it justifies the lower res.
- Portable res: 720p dynamic, drops at 576p outdoor worst case scenario.
– Zero AA - No graphical differences between portable and docked.
- Performance is 30 fps and it’s stable most of the time. Switching into battles momentarily drops the framerate in the 20s and dynamax battles can drop too.
- Positives: environments, engine cutscenes
- Negatives: emptiness of the world, pop-in, removal of many Pokémon
- Overall: a step forward, but the pop-in is a glaring issue and it doesn’t fully matches the expectations of a next gen Pokémon game, and the Pokédex cut is a big limitation.


{{repoDetails.description || "No Description"}}
Owner: {{repoDetails.owner.login}}
Created: {{repoDetails.created_at | amTimeAgo}}
Last Update: {{repoDetails.updated_at | amTimeAgo}}
Last Push: {{repoDetails.pushed_at}}
Main Language: {{repoDetails.language}}
| Stars | Watching | Forks |
|---|---|---|
| {{repoDetails.stargazers_count}} | {{repoDetails.watchers_count}} | {{repoDetails.forks_count}} |
{{com.commit.author.name}}
{{com.commit.author.date | amTimeAgo}}
No Commits found.


|
The small3d library
|
Renderer class (OpenGL 3.3 / OpenGL ES 3.0) More...
#include <Renderer.hpp>
Public Member Functions | |
| void | start (const std::string &windowTitle, const int width, const int height, const float fieldOfView, const float zNear, const float zFar, const std::string &shadersPath, const uint32_t objectsPerFrame, const uint32_t objectsPerFrameInc) |
| : Used to re-initialise the Renderer, for example in Android apps after they come back into focus. | |
| void | stop () |
| : Used to shutdown the renderer, for example in Android apps when they lose focus. | |
| void | setCameraRotation (const glm::vec3 &rotation) |
| : Set the rotation of the camera More... | |
| void | rotateCamera (const glm::vec3 &rotation) |
| : Modify the rotation of the camera More... | |
| void | setCameraTransformation (const glm::mat4x4 &transformation) |
| : Set the camera by transformation matrix More... | |
| const glm::vec3 | getCameraOrientation () const |
| : Get the orientation of the camera More... | |
| const glm::mat4x4 | getCameraRotation () const |
| : Get the rotation of the camera by transformation matrix More... | |
| const glm::vec3 | getCameraRotationXYZ () const |
| : Get the rotation of the camera in x, y, z representation. This will NOT work if the rotation was set via the setRotation(mat4x4) function. More... | |
| int | getScreenWidth () |
| Get the real screen width. More... | |
| int | getScreenHeight () |
| Get the real screen height. More... | |
| ~Renderer () | |
| Destructor. | |
| GLFWwindow * | getWindow () const |
| Get the GLFW window object, associated with the Renderer. | |
| void | generateTexture (const std::string &name, const Image &image) |
| Generate a texture on the GPU from the given image. More... | |
| void | generateTexture (const std::string &name, const std::string &text, const glm::vec3 &colour, const int fontSize=48, const std::string &fontPath="resources/fonts/CrusoeText/CrusoeText-Regular.ttf", const bool replace=true) |
| Generate a texture on the GPU that contains the given text. More... | |
| void | deleteTexture (const std::string &name) |
| Deletes the texture indicated by the given name. More... | |
| void | createRectangle (Model &rect, const glm::vec3 &topLeft, const glm::vec3 &bottomRight) |
| Populates a Model object with a rectangle stretching between the given coordinates. More... | |
| void | render (Model &model, const glm::vec3 &position, const glm::vec3 &rotation, const glm::vec4 &colour, const std::string &textureName="", const uint64_t currentPose=0, const bool perspective=true) |
| Render a Model. More... | |
| void | render (Model &model, const glm::vec3 &position, const glm::vec3 &rotation, const std::string &textureName, const uint64_t currentPose=0) |
| Render a Model. More... | |
| void | render (Model &model, const glm::vec3 &position, const glm::mat4x4 &rotation, const glm::vec4 &colour, const std::string &textureName="", const uint64_t currentPose=0, const bool perspective=true) |
| Render a Model. More... | |
| void | render (Model &model, const glm::vec3 &position, const glm::mat4x4 &rotation, const std::string &textureName, const uint64_t currentPose=0) |
| Render a Model. More... | |
| void | render (Model &model, const std::string &textureName, const uint64_t currentPose=0, const bool perspective=true) |
| Render a Model. More... | |
| void | render (Model &model, const glm::vec4 &colour, const uint64_t currentPose=0, const bool perspective=true) |
| Render a Model. More... | |
| void | render (SceneObject &sceneObject, const glm::vec4 &colour) |
| Render a SceneObject. More... | |
| void | render (SceneObject &sceneObject, const std::string &textureName) |
| Render a SceneObject. More... | |
| void | clearBuffers (Model &model) const |
| Clear a Model from the GPU buffers (the Model itself remains intact). More... | |
| void | clearBuffers (SceneObject &sceneObject) const |
| Clear a SceneObject (multiple models) from the GPU buffers (the SceneObject itself remains intact). More... | |
| void | setBackgroundColour (const glm::vec4 &colour) |
| Set the background colour of the screen. More... | |
| void | swapBuffers () |
| This is a double buffered system and this command swaps the buffers. | |
| Renderer (Renderer const &)=delete | |
| void | operator= (Renderer const &)=delete |
| Renderer (Renderer &&)=delete | |
| void | operator= (Renderer &&)=delete |
Static Public Member Functions | |
| static Renderer & | getInstance (const std::string &windowTitle="", const int width=0, const int height=0, const float fieldOfView=0.785, const float zNear=1.0f, const float zFar=24.0f, const std::string &shadersPath="resources/shaders/", const uint32_t objectsPerFrame=200, const uint32_t objectsPerFrameInc=1000) |
| Get the instance of the Renderer (the Renderer is a singleton). More... | |
Public Attributes | |
| GLint | origRenderbuffer = 0 |
| : Set to the id of the original renderbuffer, in case it is temporarily replaced during shadow mapping. This is mostly useful on iOS. | |
| GLint | origFramebuffer = 0 |
| : Set to the id of the original framebuffer, in case it is temporarily replaced during shadow mapping. This is mostly useful on iOS. | |
| bool | shadowsActive = false |
| : Render shadows? | |
| glm::vec3 | lightDirection = glm::vec3(0.0f, 0.7f, 0.3f) |
| Vector, indicating the direction of the light in the scene. It points towards a directional light source. | |
| float | shadowSpaceSize = 20.0f |
| Size of the shadows space (half-edge of the orthographic projection cube) | |
| glm::mat4x4 | shadowCamTransformation |
| Shadow camera transformation. More... | |
| glm::vec3 | cameraPosition = glm::vec3(0, 0, 0) |
| The camera position in world space. Ignored for orthographic rendering. | |
| float | lightIntensity = 1.0f |
| The light intensity (set to -1.0f if no lighting is to be used). | |
Renderer class (OpenGL 3.3 / OpenGL ES 3.0)
| void small3d::Renderer::clearBuffers | ( | Model & | model | ) | const |
| void small3d::Renderer::clearBuffers | ( | SceneObject & | sceneObject | ) | const |
Clear a SceneObject (multiple models) from the GPU buffers (the SceneObject itself remains intact).
| sceneObject | The scene object |
| void small3d::Renderer::createRectangle | ( | Model & | rect, |
| const glm::vec3 & | topLeft, | ||
| const glm::vec3 & | bottomRight | ||
| ) |
| void small3d::Renderer::deleteTexture | ( | const std::string & | name | ) |
Deletes the texture indicated by the given name.
| name | The name of the texture. |
| void small3d::Renderer::generateTexture | ( | const std::string & | name, |
| const Image & | image | ||
| ) |
Generate a texture on the GPU from the given image.
| name | The name by which the texture will be known |
| image | The image from which the texture will be generated |
| void small3d::Renderer::generateTexture | ( | const std::string & | name, |
| const std::string & | text, | ||
| const glm::vec3 & | colour, | ||
| const int | fontSize = 48 , |
||
| const std::string & | fontPath = "resources/fonts/CrusoeText/CrusoeText-Regular.ttf" , |
||
| const bool | replace = true |
||
| ) |
Generate a texture on the GPU that contains the given text.
| name | The name by which the texture will be known |
| text | The text that will be contained in the texture |
| colour | The colour of the text |
| fontSize | The size of the font which will be used |
| fontPath | Path to the TrueType font (.ttf) which will be used |
| replace | If true, an exception will be thrown if a texture with the same name already exists. Otherwise it will be overwritten. |
| const glm::vec3 small3d::Renderer::getCameraOrientation | ( | ) | const |
: Get the orientation of the camera
| const glm::mat4x4 small3d::Renderer::getCameraRotation | ( | ) | const |
: Get the rotation of the camera by transformation matrix
| const glm::vec3 small3d::Renderer::getCameraRotationXYZ | ( | ) | const |
: Get the rotation of the camera in x, y, z representation. This will NOT work if the rotation was set via the setRotation(mat4x4) function.
|
static |
Get the instance of the Renderer (the Renderer is a singleton).
| windowTitle | The title of the game's window |
| width | The width of the window. If width and height are not set or set to 0, the game will run in full screen mode. |
| height | The height of the window |
| fieldOfView | Field of view in radians (angle between the top and the bottom plane |
| zNear | Projection plane z coordinate (use positive value) |
| zFar | Far end of frustum z coordinate (use positive value) |
| shadersPath | The path where the shaders will be stored, relative to the application's executing directory. It defaults to the path provided by the engine, but it can be changed, so as to accommodate for executables which are going to be using it. Even though the path to the folder can be changed, the folder structure within it and the names of the shaders must remain as provided. The shader code can be changed, provided that their inputs and outputs are maintained the same. |
| objectsPerFrame | Ignored parameter (used for compatibility with Vulkan edition). |
| objectsPerFrameInc | Ignored parameter (used for compatibility with Vulkan edition). |
| int small3d::Renderer::getScreenHeight | ( | ) |
Get the real screen height.
| int small3d::Renderer::getScreenWidth | ( | ) |
Get the real screen width.
| void small3d::Renderer::render | ( | Model & | model, |
| const glm::vec3 & | position, | ||
| const glm::mat4x4 & | rotation, | ||
| const glm::vec4 & | colour, | ||
| const std::string & | textureName = "" , |
||
| const uint64_t | currentPose = 0 , |
||
| const bool | perspective = true |
||
| ) |
Render a Model.
| model | The model |
| position | The position of the model (x, y, z) |
| rotation | Rotation transformation matrix |
| colour | The colour of the model |
| textureName | The name of the texture to attach to the model (optional). The texture has to have been generated already. If this is set, the colour parameter will be ignored. |
| currentPose | The current animation pose |
| perspective | If true perform perspective rendering, otherwise orthographic. If false, the depth buffer is cleared. Do not intermingle perspective and orthographic rendering. Perform all the orthographic rendering in the end. |
| void small3d::Renderer::render | ( | Model & | model, |
| const glm::vec3 & | position, | ||
| const glm::mat4x4 & | rotation, | ||
| const std::string & | textureName, | ||
| const uint64_t | currentPose = 0 |
||
| ) |
Render a Model.
| model | The model |
| position | The position of the model (x, y, z) |
| rotation | Rotation transformation matrix |
| textureName | The name of the texture to attach to the model. The texture has to have been generated already. |
| currentPose | The current animation pose |
| void small3d::Renderer::render | ( | Model & | model, |
| const glm::vec3 & | position, | ||
| const glm::vec3 & | rotation, | ||
| const glm::vec4 & | colour, | ||
| const std::string & | textureName = "" , |
||
| const uint64_t | currentPose = 0 , |
||
| const bool | perspective = true |
||
| ) |
Render a Model.
| model | The model |
| position | The position of the model (x, y, z) |
| rotation | Rotation (x, y, z) |
| colour | The colour of the model |
| textureName | The name of the texture to attach to the model (optional). The texture has to have been generated already. If this is set, the colour parameter will be ignored. |
| currentPose | The current animation pose |
| perspective | If true perform perspective rendering, otherwise orthographic. If false, the depth buffer is cleared. Do not intermingle perspective and orthographic rendering. Perform all the orthographic rendering in the end. |
| void small3d::Renderer::render | ( | Model & | model, |
| const glm::vec3 & | position, | ||
| const glm::vec3 & | rotation, | ||
| const std::string & | textureName, | ||
| const uint64_t | currentPose = 0 |
||
| ) |
Render a Model.
| model | The model |
| position | The position of the model (x, y, z) |
| rotation | Rotation (x, y, z) |
| textureName | The name of the texture to attach to the model. The texture has to have been generated already. |
| currentPose | The current animation pose |
| void small3d::Renderer::render | ( | Model & | model, |
| const glm::vec4 & | colour, | ||
| const uint64_t | currentPose = 0 , |
||
| const bool | perspective = true |
||
| ) |
Render a Model.
| model | The model |
| colour | The colour of the model |
| currentPose | The current animation pose |
| perspective | True = perspective drawing, otherwise orthographic If false, the depth buffer is cleared. Do not intermingle perspective and orthographic rendering. Perform all the orthographic rendering in the end. |
| void small3d::Renderer::render | ( | Model & | model, |
| const std::string & | textureName, | ||
| const uint64_t | currentPose = 0 , |
||
| const bool | perspective = true |
||
| ) |
Render a Model.
| model | The model |
| textureName | The name of the texture to attach to the model. The texture has to have been generated already. |
| currentPose | The current animation pose |
| perspective | True = perspective drawing, otherwise orthographic If false, the depth buffer is cleared. Do not intermingle perspective and orthographic rendering. Perform all the orthographic rendering in the end. |
| void small3d::Renderer::render | ( | SceneObject & | sceneObject, |
| const glm::vec4 & | colour | ||
| ) |
Render a SceneObject.
| sceneObject | The object |
| colour | The colour the object. |
| void small3d::Renderer::render | ( | SceneObject & | sceneObject, |
| const std::string & | textureName | ||
| ) |
Render a SceneObject.
| sceneObject | The object |
| textureName | The name of the texture to attach to the object. The texture has to have been generated already. |
| void small3d::Renderer::rotateCamera | ( | const glm::vec3 & | rotation | ) |
: Modify the rotation of the camera
| rotation | The rotation to modify by (x, y, z) |
| void small3d::Renderer::setBackgroundColour | ( | const glm::vec4 & | colour | ) |
Set the background colour of the screen.
| colour | The background colour |
| void small3d::Renderer::setCameraRotation | ( | const glm::vec3 & | rotation | ) |
: Set the rotation of the camera
| rotation | The rotation (x, y, z) |
| void small3d::Renderer::setCameraTransformation | ( | const glm::mat4x4 & | transformation | ) |
: Set the camera by transformation matrix
| transformation | The tranformation matrix |
| glm::mat4x4 small3d::Renderer::shadowCamTransformation |
Shadow camera transformation.


INITIALISAE-PREFLOW procedure creates the initial pre-flow in the flow network.
It fills to capacity each edge that is leaving the source s and all other edges are initialized with no flow.
It also initializes the height of s to and all other nodes to 0.
It is further used in GENERIC-PUSH-RELABEL algorithm.
Referring to the procedure INITIALISE-PREFLOW (G,s) on page number 740,
To calculate the value of s.e (Here s=source and e=excess flow that is s.e donates access flow to source) after the procedure INITIALISE-PREFLOW (G,s) terminates
Initially, s.e=0
So,
is nothing but
Here =capacity of edge from s to
So its summation is total of capacity of edges from source to its adjacent vertices. That is if no flow limitation is there in term of capacity on in-between nodes, this summation will be equal to the maximum flow for G (if no restriction then the flow which is sent from source is same as that of the sink).Since in real situations there are flow limitations on in-between nodes so the above summation will always be less than or equal to the maximum flow for G.
So,
Where, is a maximum flow for G.
Hence, proved
A fast algorithm to find a minimum cut in G
According to the maximum flow minimum cut theorem:
The maximum flow has the value equal to the minimum cut.
Now given the maximum flow, value of maximum flow can be determined by following algorithm-
list E
max_flow = given
= |G.V| - 2
while ()
partition the set of vertices in S and V - S
capacity = check for the value of maximum flow
if (max_flow = capacity )
save the vertex set to E
else
add to vertex set S and remove it from vertex set V - S
++
return E
end
The algorithm checks for the possible vertex sets the value of capacity of cut with the given value of maximum flow and then returns the partition set.
The algorithm uses the saturation of an edge to stop from pushing the weight from one vertex to another.
Saturation refers to the condition when the flow over an edge becomes equal to its capacity.
It is given that the given graph has V vertices and E edges and the capacities of the edge are in the set {1, 2, …, k}.
The information required to analyze the algorithm is as follows:
• The algorithm visits each vertex to perform the push-relabel operation.
• Each edge with capacity k can have at max k-1 non- saturating push before performing a push operation which makes it saturated, that is at most k push operations can be applied on an edge.
The analysis of the given algorithm is as follows:
• The time it takes to visit a vertex is O(1).
Therefore, the time it takes to visit V vertices is O(V).
• The time it takes to visit an edge is O(1).
Therefore, the time to take to visit E edges is O(E).
• The time it takes perform a push operation is O(1).
An edge with capacity k can perform up to k push operations.
Therefore, an edge with capacity k takes O(k) time to perform the push operations.
• Since there are E edges in the graph therefore, the total time to perform the push operations is O(kE).
The total running time of the algorithm is the addition of all the operations in the algorithm.
The running time of the algorithm is therefore as follows:
Consider the algorithm INITIALIZE-PREFLOW on page 740.
If we set , we have to change our definition of a height function to allow , rather than .
The only change we need to make to the proof of correctness is to update the proof of Lemma.
The original proof derives the contradiction that , which is at odds with .
When , there is no contradiction.
As in original proof, assume that there is a simple augmenting path where and where s represents the source and t represents the sink.
So, that .
It had been saturated in Initialize-Pre-flow, which means that we had to push some flow from to.
For that to happened, we must have .
If we set , that means was at the time. Since then, did not decrease, and therefore, we have the following:
…… (1)
Working backwards over our augmenting path, we have the following:
for = 0, 1.......
So, for , where (height of sink is always considered to be zero).
As before, because the augmenting path is simple, .
So,
…… (2)
Comparing equation (1) and (2).
Since (2) contradicts (1) the above assumption was wrong.
So, lemma 26.17 on page 742 is still true.
Thus, if the line 6 of INITIALISE-PREFLOW changes to then, it would not affect the correctness or asymptotic performance of the generic push-relabel algorithm.
Consider the GENERIC-PUSH-RELABEL procedure,
Is the distance from u to v in the residual network.
Distance are nothing but, number of edges between the vertices.
Case 1:
When
Let there is a simple path p from u to t in.
Let path p be
Here,and =t
Here
And
Adding above we will get
+k
Here =0 because is sink.
k
is k in this case(since there are k edges in the path)
So
Hence, provedCase 2:
When
Let there is a simple path p from u to in.
Let path p be
Here,and =s
Here
And
Adding above we will get
+k
Here = because is source.
+k
is k in this case (since there are k edges in the path)
+
That is
-
Hence, proved
Flow Network
A flow network, in the most basic form, is a directed graph. Each of the edges has a capacity assigned to it. In the network a certain amount of flow goes from each edge of the network. There are certain nodes in the graph fromwhich the flowstarts and to which the flow ends. These two nodes are calledthe origin and destination ofthe network respectively.
In the diagram below the node s is the origin of the network and the node t is the destination or sink of the network. Each of the graph edge has a capacity. The capacity defines the data value that can go through that edge. The capacity is always a positive integer. One more thing is that if there exists an edge from a vertex v1 to vertex v2 than there can be no edge from v2 to v1.
In the above diagram vertex s is the source and the vertex t is the sink or destination. The capacity of each edge is shown alongside the edge. As the edge from s to v1 has the capacity of 16.
A flow network has various applications in practicality. It is used in data warehouses, scientific research and electricity distribution etc.
Generic push relabel algorithm:
The generic push relabel algorithm is used for computing maximum flow from origin to destination in a network. The distance of the source vertex that is the vertex from where the flow is started is fixed at and the height of sink vertex is fixed at value 0.
The height of all the other vertices through which the flow is passed to sink is initially set to 0 which increases with time.
The algorithm uses the method INITIALIZE-PREFLOW in which the height and the excess flow for each vertex is set. It also initializes the flow for each edge in the network and the quantity of the flow for the edges adjacent to the source vertex is set.
The flow for the edges going from the source vertex is set to its maximum value that is equal to the capacity of the edge.
It has two major operations involved in it, PUSH and RELABEL.
PUSH :
In the push operation the excess flow is pushed from one vertex to the other vertex. It is pushed from a vertex at higher level to a vertex at the lower level.
It may be possible that the flow in an edge from the lower level vertex to the higher level vertex is positive but the push operation will not support this type of flow. The conditions and the action that are performed in the push operation are as:
Precondition:
To perform a push operation two conditions must be fulfilled:
1. Thevertexuis active or overflowing that is excess flowand the residual capacity.
2. The height of vertex u must be larger than the distance of vertex v that is
Action:
Pushfrom vertex u to vertex v.
Labeling:
A labeling is said to be valid only when a function from vertices to non-negative integers.
RELABEL :
The algorithm considers that the flow can be pushed only to the vertex, which is downhill from the sender vertex.
So, for any vertex u if there existan edge to the any vertex which is not saturated yet and they both are at the same level or at the same height then the height of the vertex is increased by one. That is the vertex u is relabeled and in the relabel operation the height of vertex u is updated as:
Precondition:
To perform a relabel operation two conditions must be fulfilled:
1. The vertex uis the active overflowing vertex that is
2. For all the vertices v in the residual network for which there is an edge from vertex u to vertex v necessarily.
Action: Relabel the vertex u by increasing its height as: .GENERIC PUSH AND RELABEL ALGORITHM:-
h= labeling
p=path
// initialize the labeling
1. andfor all
// initialize pre flow with its respective capacity
2. forand for all other edges
3. while with do
4. if residual edge in and then
// comparing the label in given graph
5. if is forward then
// push it forward
6. increaseby min
7. if is backward then
// push it backward
8. decrease by min
// relabeled node
9. else
10. return f
Diagramatical Representation GENERIC PUSH AND RELABEL ALGORITHMoperations:
1. In the flow network the initial preflow labeling is shown. The height or the label of the node represented inside the box node and the capacity of each edge is onto the edge.
2. An active vertex is selected which is connected with the source vertex and the flow of this edge is as much as its capacity. Change the label of selected vertex from 0 to 1.
3. The excess from the selected active vertexis pushed to the vertex.
4. Now the vertex is selected and relabeled to 1 as shown in the graph.
5. The exces from the vertex is pushed to the sink.
6. Again the vertex is selected and relabled to 5.
7. As the maximum capacity of edge is 1 so no more flow can be passed to the sink and so the excess flow from the vertex is pushed back to the source vertex.
8. The maximum flow that can be passed from source vertex to the sink vertex is 1 so the maximum flow of this flow network is 1.
Analysis of algorithm:
In the above modified generic push relabel algorithm in each of its particular iteration a push or a relabel operation is performed. The total of the whole relabeling operations done is less than.
The number of non saturating push activities completed is at maximum of and the total number of saturating push operations (generic case) completed is largest of.
The maximum range of variation in the algorithm is because in residual network flow depend upon edges and edges depend upon vertices that are used to form that edges.
Hence, summing up all together the time complexity of above algorithm is
The maximum height that a vertex can have is as follows:
Since, the heights do not decrease, the number of vertices that are overflowing are as follow:
Therefore, over all the vertices, the contribution of relabels to would be at-most as follows:
A push which is under saturation, from the vertex u to v increase by at-most as follows:
And the maximum count of pushes under the category of saturation is as follows:
Therefore, the total contribution over all the pushes under the category of saturation to is max-to-max as follows:
Since, the pushes under the category of non-saturation decrease by at least on and must be 0 as per the termination.
Therefore, the maximum number of pushes under the category of non-saturation is as follows:
Hence, by using the above facts which are as follows:
The count of saturating pushes can be bonded to .


User
- id : Integer
Unique identifier representing a specific user
- username : String
Name given to the user
- first_name : String
First name of the user
- last_name : String
Last name of the user
- email : String
Email of the user
- credentials : List
Array of the credentials IDs of the user
- clusters : List
Array of the clusters IDs of the user
- is_staff : Integer
Boolean stating wether the user is a staff member or not
- is_superuser : Integer
Boolean stating wether the user is a superuser or not
- is_active : Integer
Boolean stating wether the user is active or not
- date_joined : Date
Date and time of creation of the user


Class: Aws::S3::PresignedPost
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
|
|
|
Instance Chain:
self,
Object,
::Aws::Resources::Resource
|
|
| Inherits: |
Aws::S3::Object
|
| Defined in: | aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb |
Overview
Normally you do not need to construct a PresignedPost
yourself.
See Bucket#presigned_post and Object#presigned_post.
Basic Usage
To generate a presigned post, you need AWS credentials, the region
your bucket is in, and the name of your bucket. You can apply constraints
to the post object as options to #initialize
or by calling
methods such as #key and #content_length_range.
The following two examples are equivalent.
post = Aws::S3::PresignedPost.new(creds, region, bucket, {
key: '/uploaded/object/key',
content_length_range: 0..1024,
acl: 'public-read',
metadata: {
'original-filename' => '${filename}'
}
})
post.fields
#=> { ... }
post = Aws::S3::PresignedPost.new(creds, region, bucket).
key('/uploaded/object/key').
content_length_range(0..1024).
acl('public-read').
('original-filename' => '${filename}').
fields
#=> { ... }
HTML Forms
You can use a PresignedPost
object to build an HTML form. It is
recommended to use some helper to build the form tag and input
tags that properly escapes values.
Form Tag
To upload a file to Amazon S3 using a browser, you need to create a post form. The #url method returns the value you should use as the form action.
<form action="<%= @post.url %>" method="post" enctype="multipart/form-data">
...
</form>
The follow attributes must be set on the form:
action
- This must be the #url.method
- This must bepost
.enctype
- This must bemultipart/form-data
.
Form Fields
The #fields method returns a hash of form fields to render inside the form. Typically these are rendered as hidden input fields.
<% @post.fields.each do |name, value| %>
<input type="hidden" name="<%= name %>" value="<%= value %>"/>
<% end %>
Lastly, the form must have a file field with the name file
.
<input type="file" name="file"/>
Post Policy
When you construct a PresignedPost
, you must specify every form
field name that will be posted by the browser. If you omit a form
field sent by the browser, Amazon S3 will reject the request.
You can specify accepted form field values three ways:
- Specify exactly what the value must be.
- Specify what value the field starts with.
- Specify the field may have any value.
Field Equals
You can specify that a form field must be a certain value.
Simply pass an option like :content_type
to the constructor,
or call the associated method.
post = Aws::S3::PresignedPost.new(creds, region, bucket).
post.content_type('text/plain')
If any of the given values are changed by the user in the form, then Amazon S3 will reject the POST request.
Field Starts With
You can specify prefix values for many of the POST form fields.
To specify a required prefix, use the :<fieldname>_starts_with
option or call the associated #<field_name>_starts_with
method.
post = Aws::S3::PresignedPost.new(creds, region, bucket, {
key_starts_with: '/images/',
content_type_starts_with: 'image/',
# ...
})
When using starts with, the form must contain a field where the
user can specify the value. The PresignedPost
will not add
a value for these fields.
Any Field Value
To white-list a form field to send any value, you can name that
field with :allow_any
or #allow_any.
post = Aws::S3::PresignedPost.new(creds, region, bucket, {
key: 'object-key',
allow_any: ['Filename'],
# ...
})
Metadata
You can add rules for metadata fields using :metadata
, #metadata,
:metadata_starts_with
and #metadata_starts_with. Unlike other
form fields, you pass a hash value to these options/methods:
post = Aws::S3::PresignedPost.new(creds, region, bucket).
key('/fixed/key').
(foo: 'bar')
post.fields['x-amz-meta-foo']
#=> 'bar'
The ${filename}
Variable
The string ${filename}
is automatically replaced with the name of the
file provided by the user and is recognized by all form fields. It is
not supported with starts_with
conditions.
If the browser or client provides a full or partial path to the file, only the text following the last slash (/) or backslash () will be used (e.g., "C:\Program Files\directory1\file.txt" will be interpreted as "file.txt"). If no file or file name is provided, the variable is replaced with an empty string.
In the following example, we use ${filename}
to store the original
filename in the x-amz-meta-
hash with the uploaded object.
post = Aws::S3::PresignedPost.new(creds, region, bucket, {
key: '/fixed/key',
metadata: {
'original-filename': '${filename}'
}
})
Fields
-
#acl(canned_acl) ⇒ self
Specify the cannedl ACL (access control list) for the object.
- #acl_starts_with(prefix) ⇒ self
-
#cache_control(value) ⇒ self
Specify caching behavior along the request/reply chain.
- #cache_control_starts_with(prefix) ⇒ self
-
#content_disposition(value) ⇒ self
Specifies presentational information for the object.
- #content_disposition_starts_with(prefix) ⇒ self
-
#content_encoding(value) ⇒ self
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
- #content_encoding_starts_with(prefix) ⇒ self
-
#content_length_range(byte_range) ⇒ self
The minimum and maximum allowable size for the uploaded content.
-
#content_type(value) ⇒ self
A standard MIME type describing the format of the contents.
- #content_type_starts_with(prefix) ⇒ self
-
#expires(time) ⇒ self
The date and time at which the object is no longer cacheable.
- #expires_starts_with(prefix) ⇒ self
-
#key(key) ⇒ self
The key to use for the uploaded object.
-
#key_starts_with(prefix) ⇒ self
Specify a prefix the uploaded.
-
#metadata(hash) ⇒ self
Metadata hash to store with the uploaded object.
-
#metadata_starts_with(hash) ⇒ self
Specify allowable prefix for each key in the metadata hash.
-
#storage_class(value) ⇒ self
Storage class to use for storing the object.
-
#success_action_redirect(value) ⇒ self
The URL to which the client is redirected upon successful upload.
- #success_action_redirect_starts_with(prefix) ⇒ self
-
#success_action_status(value) ⇒ self
The status code returned to the client upon successful upload if #success_action_redirect is not specified.
-
#website_redirect_location(value) ⇒ self
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.
Server-Side Encryption Fields
-
#server_side_encryption(value) ⇒ self
Specifies a server-side encryption algorithm to use when Amazon S3 creates an object.
-
#server_side_encryption_aws_kms_key_id(value) ⇒ self
If #server_side_encryption is called with the value of
aws:kms
, this method specifies the ID of the AWS Key Management Service (KMS) master encryption key to use for the object.
Server-Side Encryption with Customer-Provided Key Fields
-
#server_side_encryption_customer_algorithm(value) ⇒ self
Specifies the algorithm to use to when encrypting the object.
-
#server_side_encryption_customer_key(value) ⇒ self
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data.
- #server_side_encryption_customer_key_starts_with(prefix) ⇒ self
Class Attribute Summary
::Aws::Resources::Resource - Inherited
Class Method Summary
Object - Inherited
::Aws::Resources::Resource - Inherited
| .add_data_attribute | Registers a data attribute. |
| .add_identifier, .data_attributes, .identifiers, .new |
::Aws::Resources::OperationMethods - Extended
Instance Attribute Summary
- #url ⇒ String readonly
Object - Inherited
| #accept_ranges, #bucket_name, | |
| #cache_control | Specifies caching behavior along the request/reply chain. |
| #content_disposition | Specifies presentational information for the object. |
| #content_encoding | Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field. |
| #content_language | The language the content is in. |
| #content_length | Size of the body in bytes. |
| #content_type | A standard MIME type describing the format of the object data. |
| #delete_marker | Specifies whether the object retrieved was (true) or was not (false) a Delete Marker. |
| #etag | An ETag is an opaque identifier assigned by a web server to a specific version of a resource found at a URL. |
| #expiration | If the object expiration is configured (see PUT Bucket lifecycle), the response includes this header. |
| #expires | The date and time at which the object is no longer cacheable. |
| #expires_string, #key, | |
| #last_modified | Last modified date of the object. |
| #metadata | A map of metadata to store with the object in S3. |
| #missing_meta | This is set to the number of metadata entries not returned in x-amz-meta headers. |
| #parts_count | The count of parts this object has. |
| #replication_status | Possible values: . |
| #request_charged | If present, indicates that the requester was successfully charged for the request. Possible values: . |
| #restore | Provides information about object restoration operation and expiration time of the restored object copy. |
| #server_side_encryption | The Server-side encryption algorithm used when storing this object in S3 (e.g., AES256, aws:kms). Possible values: . |
| #sse_customer_algorithm | If server-side encryption with a customer-provided encryption key was requested, the response will include this header confirming the encryption algorithm used. |
| #sse_customer_key_md5 | If server-side encryption with a customer-provided encryption key was requested, the response will include this header to provide round trip message integrity verification of the customer-provided encryption key. |
| #ssekms_key_id | If present, specifies the ID of the AWS Key Management Service (KMS) master encryption key that was used for the object. |
| #storage_class | Possible values: . |
| #version_id | Version of the object. |
| #website_redirect_location | If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. |
::Aws::Resources::Resource - Inherited
| #client | Marked private to prevent double documentation. |
| #data_loaded?, | |
| #identifiers | Marked private to prevent double documentation. |
Instance Method Summary
-
#allow_any(*field_names) ⇒ self
A list of form fields to white-list with any value.
- #fields ⇒ Hash
Object - Inherited
| #acl, #bucket, | |
| #copy_from | Creates a copy of an object that is already stored in Amazon S3. |
| #copy_to | Copies this object to another object. |
| #delete | Removes the null version (if there is one) of an object and inserts a delete marker, which becomes the latest version of the object. |
| #exists?, | |
| #get | Retrieves objects from Amazon S3. |
| #initiate_multipart_upload, | |
| #move_to | Copies and deletes the current object. |
| #multipart_upload, | |
| #presigned_post | Creates a |
| #presigned_url | Generates a pre-signed URL for this object. |
| #public_url | Returns the public (un-signed) URL for this object. |
| #put | Adds an object to a bucket. |
| #restore_object | Restores an archived copy of an object back into Amazon S3. |
| #size, | |
| #upload_file | Uploads a file from disk to the current object in S3. |
| #version, | |
| #wait_until_exists | Waits until this Object is exists. |
| #wait_until_not_exists | Waits until this Object is not_exists. |
::Aws::Resources::Resource - Inherited
| #data, | |
| #load | Loads data for this resource. |
| #reload | Alias for Resources::Resource#load. |
| #wait_until | Waiter polls an API operation until a resource enters a desired state. |
Constructor Details
.new(credentials, bucket_region, bucket_name, options = {}) ⇒ PresignedPost
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 211
def initialize(credentials, bucket_region, bucket_name, = {}) @credentials = credentials.credentials @bucket_region = bucket_region @bucket_name = bucket_name @url = .delete(:url) || bucket_url @fields = {} @key_set = false @signature_expiration = Time.now + 3600 @conditions = [{ 'bucket' => @bucket_name }] .each do |option_name, option_value| case option_name when :allow_any then allow_any(option_value) when :signature_expiration then @signature_expiration = option_value else send("#{option_name}", option_value) end end end
Instance Attribute Details
#url ⇒ String
(readonly)
231
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 231
attr_reader :url
Instance Method Details
#acl(canned_acl) ⇒ self
Specify the cannedl ACL (access control list) for the object. May be one of the following values:
private
public-read
public-read-write
authenticated-read
bucket-owner-read
bucket-owner-full-control
317
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 317
define_field(:acl, starts_with: true)
#acl_starts_with(prefix) ⇒ self
317
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 317
define_field(:acl, starts_with: true)
#allow_any(*field_names) ⇒ self
A list of form fields to white-list with any value.
247 248 249 250 251 252 253
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 247
def allow_any(*field_names) field_names.flatten.each do |field_name| @key_set = true if field_name.to_s == 'key' starts_with(field_name, '') end self end
#cache_control(value) ⇒ self
Specify caching behavior along the request/reply chain.
329
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 329
define_field(:cache_control, 'Cache-Control', starts_with: true)
#cache_control_starts_with(prefix) ⇒ self
329
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 329
define_field(:cache_control, 'Cache-Control', starts_with: true)
#content_disposition(value) ⇒ self
Specifies presentational information for the object.
354
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 354
define_field(:content_disposition, 'Content-Disposition', starts_with: true)
#content_disposition_starts_with(prefix) ⇒ self
354
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 354
define_field(:content_disposition, 'Content-Disposition', starts_with: true)
#content_encoding(value) ⇒ self
Specifies what content encodings have been applied to the object and thus what decoding mechanisms must be applied to obtain the media-type referenced by the Content-Type header field.
368
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 368
define_field(:content_encoding, 'Content-Encoding', starts_with: true)
#content_encoding_starts_with(prefix) ⇒ self
368
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 368
define_field(:content_encoding, 'Content-Encoding', starts_with: true)
#content_length_range(byte_range) ⇒ self
The minimum and maximum allowable size for the uploaded content.
390 391 392 393 394 395 396
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 390
def content_length_range(byte_range) min = byte_range.begin max = byte_range.end max -= 1 if byte_range.exclude_end? @conditions << ['content-length-range', min, max] self end
#content_type(value) ⇒ self
A standard MIME type describing the format of the contents.
342
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 342
define_field(:content_type, 'Content-Type', starts_with: true)
#content_type_starts_with(prefix) ⇒ self
342
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 342
define_field(:content_type, 'Content-Type', starts_with: true)
#expires(time) ⇒ self
This does not affect the expiration of the presigned post signature.
The date and time at which the object is no longer cacheable.
376 377 378
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 376
def expires(time) with('Expires', time.httpdate) end
#expires_starts_with(prefix) ⇒ self
383 384 385
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 383
def expires_starts_with(prefix) starts_with('Expires', prefix) end
#fields ⇒ Hash
235 236 237 238 239 240 241 242
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 235
def fields check_required_values! datetime = Time.now.utc.strftime("%Y%m%dT%H%M%SZ") fields = @fields.dup fields.update('policy' => policy(datetime)) fields.update(signature_fields(datetime)) fields.update('x-amz-signature' => signature(datetime, fields['policy'])) end
#key(key) ⇒ self
The key to use for the uploaded object. Use can use ${filename}
as a variable in the key. This will be replaced with the name
of the file as provided by the user.
For example, if the key is given as /user/betty/${filename}
and
the file uploaded is named lolcatz.jpg
, the resultant key will
be /user/betty/lolcatz.jpg
.
284 285 286 287
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 284
def key(key) @key_set = true with('key', key) end
#key_starts_with(prefix) ⇒ self
Specify a prefix the uploaded
293 294 295 296
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 293
def key_starts_with(prefix) @key_set = true starts_with('key', prefix) end
#metadata(hash) ⇒ self
Metadata hash to store with the uploaded object. Hash keys will be prefixed with "x-amz-meta-".
469 470 471 472 473 474
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 469
def (hash) hash.each do |key, value| with("x-amz-meta-#{key}", value) end self end
#metadata_starts_with(hash) ⇒ self
Specify allowable prefix for each key in the metadata hash.
480 481 482 483 484 485
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 480
def (hash) hash.each do |key, value| starts_with("x-amz-meta-#{key}", value) end self end
#server_side_encryption(value) ⇒ self
Specifies a server-side encryption algorithm to use when Amazon S3 creates an object. Valid values include:
aws:kms
AES256
500
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 500
define_field(:server_side_encryption, 'x-amz-server-side-encryption')
#server_side_encryption_aws_kms_key_id(value) ⇒ self
If #server_side_encryption is called with the value of aws:kms
,
this method specifies the ID of the AWS Key Management Service
(KMS) master encryption key to use for the object.
508
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 508
define_field(:server_side_encryption_aws_kms_key_id, 'x-amz-server-side-encryption-aws-kms-key-id')
#server_side_encryption_customer_algorithm(value) ⇒ self
Specifies the algorithm to use to when encrypting the object.
Must be set to AES256
when using customer-provided encryption
keys. Must also call #server_side_encryption_customer_key.
521
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 521
define_field(:server_side_encryption_customer_algorithm, 'x-amz-server-side-encryption-customer-algorithm')
#server_side_encryption_customer_key(value) ⇒ self
Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data. This value is used to store the object and then it is discarded; Amazon does not store the encryption key.
You must also call #server_side_encryption_customer_algorithm.
532 533 534 535 536
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 532
def server_side_encryption_customer_key(value) field_name = 'x-amz-server-side-encryption-customer-key' with(field_name, base64(value)) with(field_name + '-MD5', base64(OpenSSL::Digest::MD5.digest(value))) end
#server_side_encryption_customer_key_starts_with(prefix) ⇒ self
541 542 543 544
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 541
def server_side_encryption_customer_key_starts_with(prefix) field_name = 'x-amz-server-side-encryption-customer-key' starts_with(field_name, prefix) end
#storage_class(value) ⇒ self
Storage class to use for storing the object. Defaults to
STANDARD
. Must be one of:
STANDARD
REDUCED_REDUNDANCY
You cannot specify GLACIER
as the storage class. To transition
objects to the GLACIER storage class you can use lifecycle
configuration.
447
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 447
define_field(:storage_class, 'x-amz-storage-class')
#success_action_redirect(value) ⇒ self
The URL to which the client is redirected
upon successful upload. If #success_action_redirect
is not
specified, Amazon S3 returns the empty document type specified
by #success_action_status.
If Amazon S3 cannot interpret the URL, it acts as if the field is not present. If the upload fails, Amazon S3 displays an error and does not redirect the user to a URL.
415
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 415
define_field(:success_action_redirect, starts_with: true)
#success_action_redirect_starts_with(prefix) ⇒ self
415
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 415
define_field(:success_action_redirect, starts_with: true)
#success_action_status(value) ⇒ self
The status code returned to the client upon successful upload if #success_action_redirect is not specified.
Accepts the values 200
, 201
, or 204
(default).
If the value is set to 200 or 204, Amazon S3 returns an empty document with a 200 or 204 status code. If the value is set to 201, Amazon S3 returns an XML document with a 201 status code.
If the value is not set or if it is set to an invalid value, Amazon S3 returns an empty document with a 204 status code.
433
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 433
define_field(:success_action_status)
#website_redirect_location(value) ⇒ self
If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL. Amazon S3 stores this value in the object metadata.
The value must be prefixed by, "/", "http://" or "https://". The length of the value is limited to 2K.
463
# File 'aws-sdk-resources/lib/aws-sdk-resources/services/s3/presigned_post.rb', line 463
define_field(:website_redirect_location, 'x-amz-website-redirect-location')


How many friends are enough and do you want or need more?
by Robert McMIllenGO mBEANNAÍ Dia daoibh and welcome to an exceptionally friendly Bluffer’s Guide to Irish.
This is the time of year when we get a little bit closer to family but also to cairde - friends.
Of course, there are many kinds of friend.
Dlúthchara is a close friend as is cara mór.
A nice phrase, if you are addressing someone you are very close to, is
a chara na gcarad - dearest friend.
Cara cléibh is a bosom friend and cara rúin - a confidante.
Of course, not all friendships are that close. We all have superficial friendships - with comhghleacaithe - colleagues at work or people we meet in the street or ex-classmates for example.
The Bluffer is the kind of person who always likes to make new friendships.
Some people say “I have enough friends” but how many is enough?
How many close friendships do you have, dear reader? Is that enough.
Tá mó sháith cairde agam - I have enough friends and to be honest two to six good friends is probably all you would need, but, hey, the more the merrier.
You might only consider people taobh amuigh den teaghlach - outside the family as friends but some families are very close and members could be considered as friends in that case.
We, of course, are hurtling towards the season of cóisireacha Nollag - Christmas parties which fill some of you with orgasmic delight while put the fear of God into others.
Ní maith liom cóisireacha nuair nach bhfuil aithne agam ar dhuine ar bith - I don’t like parties where I don’t know anyone is a sentence for all you wallflowers out there.
Other people of course are dab hands at having conversations with anyone they meet.
“Is breá liom cóisireacha ar a bhfuil cuid mhór daoine - I love parties where there are lots of people.
Work outings can be hit or miss. Sometimes, colleagues find they have nothing to talk about seachas - apart from work and the chat inevitably gets round to how awful the boss is, while others stare into their turkey and ham and the bubbles die in their prosecco.
Or worse, they manoeuvre you into a corner to tell you about their recent bout of deir - shingles or how Greta Thunberg is really the Anti-Christ or how their spouses are ar mire le héad - madly jealous and rarely let them out of the house – as they place their hand in your thigh.
So maybe a better option is for you to organise a party in your own home – by invitation only to people who are guaranteed fantastic craic and company.
Whichever you choose, hopefully friendships will be cemented and new ones formed over this festive period and beyond. Friends aren’t just for Christmas, you know.
The Bluffer is blessed with a small number of but close friends and family members,, others aren’t so lucky.

It’s always good to talk.
CÚPLA FOCAL
cairde (carja) - friends
dlúthchara (dlookhara) - a close friend
cara mór (cara more) - a close friend
a chara na gcarad (a khara ne garad) - dearest friend
cara cléibh (cara clayv) - a bosom buddy
cara rúin (cara roon) - a confidante
comhghleacaithe (coe-ylaceehe) - colleagues
Tá mó sháith cairde agam (taa maw hih karja ugum) - I have enough friends
taobh amuigh den teaghlach (teev amwee den chaowlakh) - outside the family
cóisireacha Nollag (coeshiraha nullag) - Christmas parties
Ní maith liom cóisireacha nuair nach bhfuil aithne agam ar dhuine ar bith (nee myh lum coeshiraha noor nakh wil iyhnya ugum er ginya er bee)
- I don’t like parties where I don’t know anyone ()
is breá liom cóisireacha ar a bhfuil cuid mhór daoine (is bra lum coeshiraha er a wil cudge wore deenee) - I love parties where there are lots of people
seachas (shakhiss) - apart from
deir (jer) - shingles
ar mire le héad (er mire e hayd) - madly jealous
seanchairde (shankharja) - old friends


Makes styling simple and quick
just like a blow dryer.
A rapid styling tool that compiles DRY CSS from encoded class selectors in your web project files.
Rapidly build stylish, responsive webpages.
Reduce the need to mentally and manually context switch between CSS and HTML.
Remain confident that any of the CSS generated by blowdrycss is actually used in your web project.
This page is built using blowdrycss, custom CSS, custom JS, jquery, what-input, and the browser compatibility CSS/JS portion of Zurb Foundation 6.1.

 I am centered.
 The font-size is 25px. Green Text

.text-align-center { text-align: center } .margin-top-30 { margin-top: 30px } .font-size-25 { font-size: 25px } .green { color: green }
The font-size is 25px. Green Text
settings.py
. Examples include: unit parsing, color parsing, font parsing, minification, and media query parsing.


Kogi Decides: Governor Yahaya Bello Cast His Vote
by Gbenga SijuadeThe incumbent Governor of Kogi State, Mr. Yahaya Bello has casted his vote at Agaza Okene-Eba/Agassa/Ahache Ward, Unit 11, Okene Local Government.
The governor who is also the candidate All progressive party was the first key stakeholder to cast his vote.
Naija News understands that the voting has kicked off in many polling units. Everything has been peaceful so far and card readers are functioning in all polling units so far visited.
here are picture of the Governor and his wife as he cast his vote


public enum HWPBorderThickness
테두리선 굵기 UINT8 - unsigned 1 byte
| Modifier and Type | Class and Description |
|---|---|
static class |
HWPBorderThickness.Companion |
| Enum Constant and Description |
|---|
MM0_1
0.1 mm
|
MM0_12
0.12 mm
|
MM0_15
0.15 mm
|
MM0_2
0.2 mm
|
MM0_25
0.25 mm
|
MM0_3
0.3 mm
|
MM0_4
0.4 mm
|
MM0_5
0.5 mm
|
MM0_6
0.6 mm
|
MM0_7
0.7 mm
|
MM1_0
1.0 mm
|
MM1_5
1.5 mm
|
MM2_0
2.0 mm
|
MM3_0
3.0 mm
|
MM4_0
4.0 mm
|
MM5_0
5.0 mm
|
| Modifier and Type | Field and Description |
|---|---|
static HWPBorderThickness.Companion |
Companion |
| Modifier and Type | Method and Description |
|---|---|
byte |
getValue()
Byte, 테두리선 굵기를 가진 데이터
|
void |
setValue(byte p)
Byte, 테두리선 굵기를 가진 데이터
|
public static HWPBorderThickness MM0_1
0.1 mm
public static HWPBorderThickness MM0_12
0.12 mm
public static HWPBorderThickness MM0_15
0.15 mm
public static HWPBorderThickness MM0_2
0.2 mm
public static HWPBorderThickness MM0_25
0.25 mm
public static HWPBorderThickness MM0_3
0.3 mm
public static HWPBorderThickness MM0_4
0.4 mm
public static HWPBorderThickness MM0_5
0.5 mm
public static HWPBorderThickness MM0_6
0.6 mm
public static HWPBorderThickness MM0_7
0.7 mm
public static HWPBorderThickness MM1_0
1.0 mm
public static HWPBorderThickness MM1_5
1.5 mm
public static HWPBorderThickness MM2_0
2.0 mm
public static HWPBorderThickness MM3_0
3.0 mm
public static HWPBorderThickness MM4_0
4.0 mm
public static HWPBorderThickness MM5_0
5.0 mm
public static HWPBorderThickness.Companion Companion


JACKIE BROWN ***1/2 (out of five stars) A review by Jamey Hughton
Starring-Pam Grier, Samuel L. Jackson, Robert Forster, Bridget Fonda, Michael Keaton and Robert De Niro Director-Quentin Tarantino Rated 14A Released December 1997 Miramax Reviewed July 14, 1999
MOVIE VIEWS by Jamey Hughton: http://Welcome.to/MovieViews
After the terminally bleak Reservoir Dogs and the brutally violent Pulp Fiction, Jackie Brown seems like something of a light-hearted departure for Quentin Tarantino. It's more of a ho-hum heist story with characters that speak the Tarantino language. Luckily, his showcase of actors convert every morsel of possible enjoyment onto the screen, and Jackie Brown has no trouble entertaining the average viewer.
The story introduces us to a street-wise black woman named Jackie Brown (Pam Grier), a flight attendant who smuggles money and drugs from one destination to another. She works for a bottom-of-the-barrel airline and receives a minimal salary. But one day, she is picked up by a pair of Federal Officials (including Michael Keaton as the tough-nosed Ray Nicolet), and found with a handsome load of cash and a small bag of smuggled dope. Jackie is working for a weapons dealer named Ordell (Samuel L. Jackson), who pays her bail money but suspects her of tipping off the feds about their operation. Soon Jackie and Ordell are plotting a way to smuggle $500,000 through to them under Nicolet's nose, with the help of Ordell's oaf of a partner (Robert De Niro) and drugged-out lady friend (Bridget Fonda).
Also entering the picture is a bail-bondsman named Max Cherry (Robert Forster), who takes a liking to Jackie and agrees at one point to make the situation even more complicated (how I won't say). The big drop-off is undoubtedly the high point of Jackie Brown, in which numerous double-crosses take place and many clothing store bags (filled with cash) switch hands. It's unfortunate that Tarantino takes his sweet time getting there, and doesn't offer anything extremely compelling while doing so. There are, as always, amusing exchanges between characters. The funniest repartee is between De Niro and Fonda, as he becomes annoyed with her constant bickering while making fun of his IQ, or lack thereof. The most interesting relationship is between Max and Jackie.  You've got to commend the acting.
Jackie Brown is a seriously dragged-out exercise enlivened by such fine acting. The film clocks in at a lengthy 2 hours, 35 minutes. Tarantino's talky style manages to hold your attention heavily, but there are more than a few dramatic lapses and crucial lulls in the storyline. Also, fans of the director should be prepared for a lighter side to appear. Jackie Brown has four major shootings, and two of those take place mostly off-screen, so don't be expecting a typical Tarantino bloodbath. You can expect frequent foul language, mostly coming way of Ordell, who (much to the dismay of Spike Lee) uses the `N' word as part of his regular vocabulary.
The acting is the glue that holds everything together. Grier, making a sudden comeback from her reign in the 1970's, is more than adequate for the title character. In fact, she's flat-out great. Another comeback comes from former TV star Robert Forster, who does a grand job as Max Cherry, and is perfectly cast in doing so. Michael Keaton makes his presence felt, albeit in small but dignified moments, and De Niro is ideal in playing the lug-head who goes over the edge. Speaking of that, Bridget Fonda has relatively little to do as Ordell's bikini-clad beach babe, and yet she manages to look fairly occupied.
There's not a single sign of misplaced dialogue or snubbed line throughout the entire movie. Which is a life-saver for Mr. Tarantino. The story barely holds together in the meantime, and we merely get a small tremor whenever there should be a defeaning earthquake. But oh well. Jackie Brown manages to be an enjoyable detour from Quentin Tarantino, even if it is lacking the glaring and original bite of his previous work. Let's just hope that the director hasn't gone soft on us.
(C) 1999, Jamey Hughton
MOVIE VIEWS by Jamey Hughton: http://Welcome.to/MovieViews .......................
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Blockchain Transactions
Transactions
Violations
Smart Monitor
☰
Event Created
Trucks - 4/4
Truck 1
Truck 2
Truck 3
Truck 4


This section of the website is dedicated to exploring the steps necessary to register and set up a domain name for the website.
Domain names are overseen by organizations such as ICANN(Internet Corporation for Assigned Names and Numbers) and nation-specific bodies. Entities known as domain registrars (eg. GoDaddy and namecheap) are given accreditation by these bodies, authorizing them to register domain names on behalf of individuals and companies. To purchase a domain name, an entity needs to visit a website belonging to one such registrar and type in the desired domain name. The registrar then checks for the availability and validity of the domain name. If valid, then the entity may lease the domain name for a period of time. Domain names must be renewed regularly, depending on the purchase option.
When initially purchased, the domain will be empty. The domain owner must then register for a web hosting service, such as host gator. The domain owner must inform the hosting service of the domain name. Once entered, the hosting service will allow the domain owner a portion of their server space and the domain owner is given a namespace associated with their domain.
Many web hosting services are also accredited domain registrars and vice versa. It is thus possible to host a website with the same entity that registered a domain.
The domain owner must then return to the domain registrar website. They must associate their domain name with the associated namespace. This is not an instantaneous process, and the domain owner must wait for a few hours to a few days before local domain name servers register the domain and associate the domains with their associated namespaces.
The web hosting service will have the option to upload files. The necessary html and CSS files may be uploaded to the service, and the website will show in the required domain.


| Item | Quantity | Description | Position | SKU |
|---|---|---|---|---|
| apple | ||||
| bottle | ||||
| can | ||||
| cereal | ||||
| cracker | ||||
| cup | ||||
| duck | ||||
| extinguisher | ||||
| flower | ||||
| gnome | ||||
| honey | ||||
| jam | ||||
| orange | ||||
| paint | ||||
| trash | ||||
| tree | ||||
| water |
FAQ:
What is Robart?
Robart is a Robotic Access and Retrieval System. In other words, it is an AI-powered warehouse management system that can help you retrieve warehouse stock using natural human speech. For demonstration purposes, this client includes a WeBots simulation that is able to depict a given warehouse and the robot's movement throughout.
How does it work?
First, you enter the desired item using the textbox in the bottom right of the screen; alternatively, you may use the IBM Watson-powered speech to text service by clicking the microphone icon on the left side of the textbox. You can see a conversational interface that allows you to communicate with the Watson assistant to determine the item you have chosen for retrieval. Once the robot knows what to get, it will retrieve it! It's that simple!
What if Robart brings me the wrong item?
We hope to avoid this scenario by offering you a selection of items that match your query in case it is vague or coressponding to multiple items. In the rare cases that situation skipped and Robart assumes a higher level of certainty that it should have, you have a button to report wrong deliveries that the Watson Assistant will learn from and avoid in the future. Furthermore, you may simply ask Robart to return the item.
I want to run the simulation but do not have a powerful computer on premises, what can I do?
The Robart system is designed over a host-client interface. For most of our testing and development, we had a more powerful machine running the robotic simulation that we connected to using the field in the top right corner of the page. Since we got a lot of value and ease of use from this functionality, we decided to bring it to you!
How hard is it to port from simulation to real-world robots?
The Robart system is designed with portability in mind. Each robot runs its own program code in a separate process, so these can be de-centralized and ported to the hardware of each robot you use. The code refers to the the simulation controls abstractly, rather than directly, so porting to new hardware can be as simple as implementing the required interface for a hardware controller.
Can you get me a can?


Sky and BT broadband down in day of misery for internet customers
BREAKING: According to Down Detector, the Sky issues started at around 06:58 GMT, and are affecting users in the south of the UK, including in London, Reading, Cardiff and Southampton
by Shivali Best, https://www.facebook.com/shivalibestjournalist/Sky and BT Broadband have both crashed in a day of misery for internet users.
According to Down Detector, the issues with Sky started at around 06:58 GMT, and affected users in the south of the UK, including in London, Reading, Cardiff and Southampton.
Thousands of users have reported problems this morning. Of those who reported issues, 95% said the couldn’t access the Internet, while 3% were having TV issues, and 1% having a total blackout.
And BT customers later also faced problems, although BT claims there were no issues.
A BT spokesperson said: "We’ve checked our network and there were no broadband outages affecting BT customers. We also haven’t received any increase in social media traffic or call centre activity from customers reporting any problems. If BT customers experience any problems affecting their phone or internet services we would encourage them to report this to us as soon as possible.”
Sky says that it is aware of the issue, and is "working hard to fix this."
It tweeted: "We are aware of an issue affecting some of our customers broadband across parts of the UK, we’re sorry for this. We have the right people working hard to fix this."
Unsurprisingly, many customers are furious at the outage, with many taking to Twitter to vent their issues.
One user replied: "Oh, you noticed. That’s nice. Will you be giving us all a reduction in our bills, or compensating those of us who are self-employed and having to chew through our mobile data plans to get any work done? No? Thought not. Looking to move now."
Another added: "Nightmare when working from home."
And one joked: "Waking up this morning to find my sky broadband is down , what a great start to the day .... how am I supposed to watch my cats do the silliest things to motivate me through my Monday morning."
Mirror Online has contacted the providers for comment.


Book a Appointment
Book a appointment if you need anything software based (mobile application both anroid and IOS*), Web site developement, javaScripting, daignoistics your data and many more.
Take your time
Tell us what you want. We shall help you complete your end-goal.
Like what you get
If you want to tweak your ideas to suit your needs then simply make the request and we can discuss it further.
About Us
Undergraduate software engineering student, who wants to help out your business and you flourish. Helping you create your ideas such as Rate My Uni and Vaulty.
Services
This is just sample texts.
Our Skills
We've kept it simple. a simple sucess rate of our software skills, Ease of Use, Sucess rate(without any glitches or failures) and finally TSR (Time Scale Rating).
Facts
From 2021 to todays date this is XRCA exported projects.
Coding languages
Exported and finished Projects
Mobile IOS & Android apps
Hard Worker
Our Clients
Testimonials
Saul Goodman
Ceo & Founder
Proin iaculis purus consequat sem cure digni ssim donec porttitora entum suscipit rhoncus. Accusantium quam, ultricies eget id, aliquam eget nibh et. Maecen aliquam, risus at semper.
Sara Wilsson
Designer
Export tempor illum tamen malis malis eram quae irure esse labore quem cillum quid cillum eram malis quorum velit fore eram velit sunt aliqua noster fugiat irure amet legam anim culpa.
Jena Karlis
Store Owner
Enim nisi quem export duis labore cillum quae magna enim sint quorum nulla quem veniam duis minim tempor labore quem eram duis noster aute amet eram fore quis sint minim.
Matt Brandon
Freelancer
Fugiat enim eram quae cillum dolore dolor amet nulla culpa multos export minim fugiat minim velit minim dolor enim duis veniam ipsum anim magna sunt elit fore quem dolore labore illum veniam.
John Larson
Entrepreneur
Quis quorum aliqua sint quem legam fore sunt eram irure aliqua veniam tempor noster veniam enim culpa labore duis sunt culpa nulla illum cillum fugiat legam esse veniam culpa fore nisi cillum quid.
Team
These are the team members I have decided to be on my team.
Qasim 'Sim-Eazy' Mahmood
Chief Executive OfficerGoku
Product Manager / Assistant to my projectsasda lemons
CTOlil sis aiza
AccountantContact Us
Simple contact forum to fill out, for any enquiries or questions.


boto’s documentation uses the Sphinx documentation system, which in turn is based on docutils. The basic idea is that lightly-formatted plain-text documentation is transformed into HTML, PDF, and any other output format.
To actually build the documentation locally, you’ll currently need to install Sphinx – easy_install Sphinx should do the trick.
Then, building the html is easy; just make html from the docs directory.
To get started contributing, you’ll want to read the ReStructuredText Primer. After that, you’ll want to read about the Sphinx-specific markup that’s used to manage metadata, indexing, and cross-references.
The main thing to keep in mind as you write and edit docs is that the more semantic markup you can add the better. So:
Import ``boto`` to your script...
Isn’t nearly as helpful as:
Add :mod:`boto` to your script...
This is because Sphinx will generate a proper link for the latter, which greatly helps readers. There’s basically no limit to the amount of useful markup you can add.
There is a Fabric file that can be used to build and deploy the documentation to a webserver that you ssh access to.
To build and deploy:
cd docs/
fab deploy:remote_path='/var/www/folder/whatever' --hosts=user@host
This will get the latest code from subversion, add the revision number to the docs conf.py file, call make html to build the documentation, then it will tarball it up and scp up to the host you specified and untarball it in the folder you specified creating a symbolic link from the untarballed versioned folder to {remote_path}/boto-docs.


| 1 | package fr.sii.ogham.testing.assertion.internal; | |
| 2 | ||
| 3 | import java.util.HashSet; | |
| 4 | import java.util.List; | |
| 5 | import java.util.Set; | |
| 6 | ||
| 7 | import org.apache.commons.lang3.reflect.FieldUtils; | |
| 8 | ||
| 9 | import fr.sii.ogham.core.resource.resolver.ClassPathResolver; | |
| 10 | import fr.sii.ogham.core.resource.resolver.FileResolver; | |
| 11 | import fr.sii.ogham.core.resource.resolver.FirstSupportingResourceResolver; | |
| 12 | import fr.sii.ogham.core.resource.resolver.RelativeResolver; | |
| 13 | import fr.sii.ogham.core.resource.resolver.ResourceResolver; | |
| 14 | import fr.sii.ogham.testing.util.HasParent; | |
| 15 | ||
| 16 | /** | |
| 17 | * Make assertions on resource resolution. | |
| 18 | * | |
| 19 | * | |
| 20 | * <pre> | |
| 21 | * {@code | |
| 22 | * classpath() | |
| 23 | * .pathPrefix(is("prefix/") | |
| 24 | * } | |
| 25 | * </pre> | |
| 26 | * | |
| 27 | * @param <P> | |
| 28 | * the parent type | |
| 29 | */ | |
| 30 | public class ResourceResolverAssertions<P> extends HasParent<P> { | |
| 31 | private final Set<ResourceResolver> resolvers; | |
| 32 | ||
| 33 | public ResourceResolverAssertions(P parent, Set<ResourceResolver> resourceResolvers) { | |
| 34 | super(parent); | |
| 35 | this.resolvers = resourceResolvers; | |
| 36 | } | |
| 37 | ||
| 38 | /** | |
| 39 | * Make assertions on classpath resolution. | |
| 40 | * | |
| 41 | * <pre> | |
| 42 | * {@code | |
| 43 | * .pathPrefix(is("/custom/")) | |
| 44 | * .pathSuffix(is(".html")) | |
| 45 | * } | |
| 46 | * </pre> | |
| 47 | * | |
| 48 | * @return the builder for fluent chaining | |
| 49 | */ | |
| 50 | public RelativeResolutionAssertions<ResourceResolverAssertions<P>> classpath() { | |
| 51 |
1
1. classpath : replaced return value with null for fr/sii/ogham/testing/assertion/internal/ResourceResolverAssertions::classpath → NO_COVERAGE |
return new RelativeResolutionAssertions<>(this, "classpath", getRelativeResolversFor(ClassPathResolver.class)); |
| 52 | } | |
| 53 | ||
| 54 | /** | |
| 55 | * Make assertions on file resolution. | |
| 56 | * | |
| 57 | * <pre> | |
| 58 | * {@code | |
| 59 | * .pathPrefix(is("/custom/")) | |
| 60 | * .pathSuffix(is(".html")) | |
| 61 | * } | |
| 62 | * </pre> | |
| 63 | * | |
| 64 | * @return the builder for fluent chaining | |
| 65 | */ | |
| 66 | public RelativeResolutionAssertions<ResourceResolverAssertions<P>> file() { | |
| 67 |
1
1. file : replaced return value with null for fr/sii/ogham/testing/assertion/internal/ResourceResolverAssertions::file → NO_COVERAGE |
return new RelativeResolutionAssertions<>(this, "file", getRelativeResolversFor(FileResolver.class)); |
| 68 | } | |
| 69 | ||
| 70 | private <T> Set<RelativeResolver> getRelativeResolversFor(Class<T> resolverClass) { | |
| 71 | Set<RelativeResolver> found = new HashSet<>(); | |
| 72 | for (ResourceResolver resolver : resolvers) { | |
| 73 | Set<RelativeResolver> relativeResolvers = findResolvers(resolver, RelativeResolver.class); | |
| 74 | for (RelativeResolver relative : relativeResolvers) { | |
| 75 |
1
1. getRelativeResolversFor : negated conditional → NO_COVERAGE |
if (resolverClass.isAssignableFrom(relative.getActualResourceResolver().getClass())) { |
| 76 | found.add(relative); | |
| 77 | } | |
| 78 | } | |
| 79 | } | |
| 80 |
1
1. getRelativeResolversFor : replaced return value with Collections.emptySet for fr/sii/ogham/testing/assertion/internal/ResourceResolverAssertions::getRelativeResolversFor → NO_COVERAGE |
return found; |
| 81 | } | |
| 82 | ||
| 83 | @SuppressWarnings("unchecked") | |
| 84 | private static <T> Set<T> findResolvers(ResourceResolver resolver, Class<T> resolverClass) { | |
| 85 | Set<T> found = new HashSet<>(); | |
| 86 |
1
1. findResolvers : negated conditional → NO_COVERAGE |
if (resolverClass.isAssignableFrom(resolver.getClass())) { |
| 87 | found.add((T) resolver); | |
| 88 | } | |
| 89 |
1
1. findResolvers : negated conditional → NO_COVERAGE |
if (resolver instanceof FirstSupportingResourceResolver) { |
| 90 | found.addAll(findResolvers((FirstSupportingResourceResolver) resolver, resolverClass)); | |
| 91 | } | |
| 92 |
1
1. findResolvers : negated conditional → NO_COVERAGE |
if (resolver instanceof RelativeResolver) { |
| 93 | found.addAll(findResolvers((RelativeResolver) resolver, resolverClass)); | |
| 94 | } | |
| 95 |
1
1. findResolvers : replaced return value with Collections.emptySet for fr/sii/ogham/testing/assertion/internal/ResourceResolverAssertions::findResolvers → NO_COVERAGE |
return found; |
| 96 | } | |
| 97 | ||
| 98 | @SuppressWarnings("unchecked") | |
| 99 | private static <T> Set<T> findResolvers(FirstSupportingResourceResolver resolver, Class<T> resolverClass) { | |
| 100 | try { | |
| 101 | Set<T> found = new HashSet<>(); | |
| 102 | List<ResourceResolver> subresolvers = (List<ResourceResolver>) FieldUtils.readField(resolver, "resolvers", true); | |
| 103 | for (ResourceResolver r : subresolvers) { | |
| 104 | found.addAll(findResolvers(r, resolverClass)); | |
| 105 | } | |
| 106 |
1
1. findResolvers : replaced return value with Collections.emptySet for fr/sii/ogham/testing/assertion/internal/ResourceResolverAssertions::findResolvers → NO_COVERAGE |
return found; |
| 107 | } catch (IllegalAccessException e) { | |
| 108 | throw new IllegalStateException("Failed to get 'resolvers' field of FirstSupportingResourceResolver", e); | |
| 109 | } | |
| 110 | } | |
| 111 | ||
| 112 | @SuppressWarnings("unchecked") | |
| 113 | private static <T> Set<T> findResolvers(RelativeResolver resolver, Class<T> resolverClass) { | |
| 114 | try { | |
| 115 | Set<T> found = new HashSet<>(); | |
| 116 |
1
1. findResolvers : negated conditional → NO_COVERAGE |
if (resolverClass.isAssignableFrom(resolver.getClass())) { |
| 117 | found.add((T) resolver); | |
| 118 | } | |
| 119 | ResourceResolver delegate = (ResourceResolver) FieldUtils.readField(resolver, "delegate", true); | |
| 120 |
1
1. findResolvers : negated conditional → NO_COVERAGE |
if (resolverClass.isAssignableFrom(resolver.getActualResourceResolver().getClass())) { |
| 121 | found.add((T) delegate); | |
| 122 | } | |
| 123 |
1
1. findResolvers : replaced return value with Collections.emptySet for fr/sii/ogham/testing/assertion/internal/ResourceResolverAssertions::findResolvers → NO_COVERAGE |
return found; |
| 124 | } catch (IllegalAccessException e) { | |
| 125 | throw new IllegalStateException("Failed to get 'delegate' field of RelativeResolver", e); | |
| 126 | } | |
| 127 | } | |
| 128 | ||
| 129 | } | |
Mutations | ||
| 51 |
1.1 |
|
| 67 |
1.1 |
|
| 75 |
1.1 |
|
| 80 |
1.1 |
|
| 86 |
1.1 |
|
| 89 |
1.1 |
|
| 92 |
1.1 |
|
| 95 |
1.1 |
|
| 106 |
1.1 |
|
| 116 |
1.1 |
|
| 120 |
1.1 |
|
| 123 |
1.1 |


In this module, you will create a new task definition and service to run the sample application we built in the previous module. To support this service, you’ll need to create an AWS Identity and Access Management (IAM) role to allow our application to read from and write to the Amazon DynamoDB table it uses to store data. We’ll also need to create an Application Load Balancer to distribute traffic across the running tasks that are being ran by the service.
Task roles are IAM roles that can be used by the containers in the task. For our application, we need to grant permission to read from and write to the Amazon DynamoDB table we created in the last module.
✅ Step-by-step Instruction
Go to the AWS Management Console, click Services then select IAM under Security, Identity & Compliance.
Click on Roles in the left-hand navigation.
Click Create role.
First, we’ll configure which AWS service can assume this role. Click Elastic Container Service from the Choose the service that will use this role list.
Next, choose Elastic Container Service Task from Select your use case.
Click Next: Permissions.
Click Create policy. The visual policy editor will open in a new tab.
Click on Choose a service and click DynamoDB.
Click on Actions.
Expand the Read permissions and check the Scan and GetItem checkboxes.
Expand the Write permissions and check the PutItem and DeleteItem checkboxes.
Click Resources to limit the role to the quotes table.
Click Add ARN next to table.
Enter us-east-1
in Region, your Account ID in Account, and quotes
in Table name.
Click Add.
This will result in a policy allowing dynamodb:PutItem, dynamodb:Scan, dynamodb:DeleteItem, and dyanmodb:GetItem.
Click Review policy.
Enter WorkshopAppPolicy
in Name.
Click Create policy.
Return to the original tab where you were creating the role. Click Refresh and type WorkshopAppPolicy
in the Filter textbox. Check the WorkshopAppPolicy checkbox. Click Next: Review.
Enter WorkshopAppRole
in Role name.
Click Create role.
Task definitions are blueprints for your application. They include details about what containers to run, their resource requirements, environment settings, networking configuration, and task role permission settings. In this step, we’ll create a task definition for our application. Complete either the directions using the AWS Management Console or the AWS Command Line Interface.
✅ Step-by-step Instructions (AWS Management Console)
Go to the AWS Management Console, click Services then select Elastic Container Service under Compute.
Click Task Definitions in the left-hand navigation.
Click Create new Task Definition.
Click Fargate to select the Fargate launch type.
Click Next step.
Enter workshop
into Task Definition Name.
Select WorkshopAppRole from Task Role.
Select 0.5GB from Task memory (GB).
Select 0.25 vCPU from Task CPU (vCPU).
Click Add container.
Enter workshop
into Container name.
In Image, paste the repository URI for the Docker image you built and pushed in the previous module. For example, if your Account ID was<PHONE_NUMBER>12, then you’d enter:<PHONE_NUMBER>12.dkr.ecr.us-east-1.amazonaws.com/workshop
Enter 80
into Container port and select tcp from Protocol in Port mappings.
Click Add.
Click Create.
✅ Step-by-step Instructions (AWS CLI)
Switch to the tab where you have your Cloud9 environment opened.
Open the file fargate-workshop-app/ecs/task_definition.json
by navigating to it in the environment tree and double clicking the filename.
The file has the following contents:
{
"family": "workshop",
"requiresCompatibilities": ["FARGATE"],
"cpu": "256",
"memory": "512",
"networkMode": "awsvpc",
"taskRoleArn": "arn:aws:iam::YOUR_ACCOUNT_ID_HERE:role/WorkshopAppRole",
"executionRoleArn": "arn:aws:iam::YOUR_ACCOUNT_ID_HERE:role/ecsTaskExecutionRole",
"containerDefinitions": [
{
"name": "workshop",
"image": "YOUR_ACCOUNT_ID_HERE.dkr.ecr.us-east-1.amazonaws.com/workshop",
"essential": true,
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": "/ecs/workshop",
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
},
"portMappings": [
{
"protocol": "tcp",
"containerPort": 80
}
]
}
]
}
Replace the YOUR_ACCOUNT_ID_HERE placeholders with your Account ID. Save the file by going to File and selecting Save in the menu bar, or pressing ⌘-S (macOS) or Ctrl-S (Windows / Linux).
Create a new task definition from the JSON file by running this command in your Cloud9 terminal:
aws ecs register-task-definition --cli-input-json file://~/environment/fargate-workshop-app/ecs/task_definition.json
Create the CloudWatch Logs log group /ecs/workshop
configured in your new task definition by running this command in your Cloud9 terminal:
aws logs create-log-group --log-group-name /ecs/workshop
✅ Step-by-step Instructions
Go to the AWS Management Console, click Services then select EC2 under Compute.
Click on Load Balancers in the left-hand navigation.
Click Create Load Balancer.
In Application Load Balancer, click Create.
Enter workshop
into Name.
Select the VPC created in the first module when you created the ECS cluster in the first module. If you need to find the VPC ID do one of the following:
AWS Management Console
Click on Services, right-click on VPC under Networking & Content Delivery and click Open Link in New Tab.
Click on Your VPCs in the left-hand navigation.
Click on each VPC, and click on its Tags tab. The VPC you’re looking for has a tag with Key aws:cloudformation:stack-name
and Value EC2ContainerService-workshop
AWS CLI
Run the following command in your Cloud9 terminal:
aws ec2 describe-vpcs --query Vpcs[0].VpcId --output text \
--filters Name=tag:aws:cloudformation:stack-name,Values=EC2ContainerService-workshop
Select all Availability Zones configured for the VPC by checking each checkbox.
Click Next: Configure Security Settings.
The wizard will warn you that you’ve not established a secure listener as we didn’t define an HTTPS listener. Click Next: Configure Security Groups.
Tick the Create a new security group radio button. This will create a new security group which will permit traffic to port 80 by default.
Click Next: Configure Routing.
Enter workshop
into Name.
Enter 80
into Port.
Select ip from Target type.
Click Next: Register Targets. We won’t register anything as we’ll rely on Amazon ECS to manage our Target Group for us.
Click Next: Review. Review the details you configured, then click Create.
Click on the workshop link to view details about the new load balancer.
Click on the workshop link to view details about the new load balancer.
Take note of the DNSName. This will be the hostname of our load balancer that we’ll use to hit our service after we complete the next set of steps.
Services maintain a desired number of tasks and manage registration of those tasks with a load balancer. In this section, we’ll create a new service for our Docker container.
✅ Step-by-step Instructions (AWS Management Console)
Go to the AWS Management Console, click Services then select Elastic Container Service under Compute.
Click workshop in the cluster list.
The Services tab should be selected. Click Create.
Tick the FARGATE radio button in Launch Type.
Select workshop:1 from Task Definition.
Enter workshop
into Service name.
Enter 1
into Number of tasks.
Click Next step.
Select the VPC created in the first module when you created the ECS cluster in the first module. If you need to find the VPC ID do one of the following:
AWS Management Console
Click on Services, right-click on VPC under Networking & Content Delivery and click Open Link in New Tab.
Click on Your VPCs in the left-hand navigation.
Click on each VPC, and click on its Tags tab. The VPC you’re looking for has a tag with Key aws:cloudformation:stack-name
and Value EC2ContainerService-workshop
AWS CLI
Run the following command in your Cloud9 terminal:
aws ec2 describe-vpcs --query Vpcs[0].VpcId --output text \
--filters Name=tag:aws:cloudformation:stack-name,Values=EC2ContainerService-workshop
Select both subnets in Subnets.
Select ENABLED from Auto-assign public IP. This allows your tasks to retrieve the Docker image from Amazon ECR and stream logs to Amazon CloudWatch Logs.
Under Load Balancing, tick the Application Load Balancer radio button.
Click Add to load balanacer.
Select 80:HTTP from Listener port.
Select workshop from Target group name.
Click Next step.
The next page allows you to define an Auto Scaling policy. Leave this set to Do not adjust the service’s desired count for now and click Next step.
Review your settings and click Create Service.
The service will now start your task. Click View Service and wait for your task to transition to RUNNING.
Hit your task via the load balancer through the DNSName you noted in Create an Application Load Balancer. For example:
curl -Ss http://workshop-123456789.us-east-1.elb.amazonaws.com/quotes | jq
✅ Step-by-step Instructions (AWS CLI)
Switch to the tab where you have your Cloud9 environment opened.
Open the file fargate-workshop-app/ecs/service.json
by navigating to it in the environment tree and double clicking the filename.
Inspect the file contents. There are several placeholders in this file to fill-in: the ARN of the target group and the IDs of the subnets and security group created for us in the first run wizard.
{
"cluster": "workshop",
"serviceName": "workshop",
"taskDefinition": "workshop:1",
"desiredCount": 1,
"launchType": "FARGATE",
"platformVersion": "LATEST",
"loadBalancers": [
{
"targetGroupArn": "YOUR_TARGET_GROUP_ARN_HERE",
"containerName": "workshop",
"containerPort": 80
}
],
"networkConfiguration": {
"awsvpcConfiguration": {
"subnets": ["YOUR_SUBNET1_ID_HERE", "YOUR_SUBNET2_ID_HERE"],
"securityGroups": ["YOUR_SECURITY_GROUP_ID_HERE"],
"assignPublicIp": "ENABLED"
}
}
}
Fill in the YOUR_TARGET_GROUP_ARN_HERE placeholder. To find the ARN of the target group, run this command in the Cloud9 terminal:
aws elbv2 describe-target-groups --names workshop --query TargetGroups[0].TargetGroupArn --output text
Fill in the YOUR_SUBNET1_ID_HERE and YOUR_SUBNET2_ID_HERE placeholders. To find the IDs of the subnets created in the first run wizard, run this command in the Cloud9 terminal:
aws ec2 describe-subnets --query Subnets[].SubnetId --output text \
--filters Name=tag:aws:cloudformation:stack-name,Values=EC2ContainerService-workshop
Fill in the YOUR_SECURITY_GROUP_ID_HERE placeholder. To find the ID of the security group created in the first run wizard, run this command in the Cloud9 terminal:
aws ec2 describe-security-groups --query SecurityGroups[].GroupId --output text \
--filters Name=tag:aws:cloudformation:stack-name,Values=EC2ContainerService-workshop
Save the file by going to File and selecting Save in the menu bar, or pressing ⌘-S (macOS) or Ctrl-S (Windows / Linux).
Now that all the values are filled-in, we can create the service by running this command in the Cloud9 terminal:
aws ecs create-service --cli-input-json file://~/environment/fargate-workshop-app/ecs/service.json
The service will now start your task. Wait for your task to transition to RUNNING. You can view the status of your task by running this in your Cloud9 terminal:
aws ecs describe-tasks \
--cluster workshop \
--tasks `aws ecs list-tasks --service-name workshop --cluster workshop --query taskArns[] --output text` \
--query tasks[].lastStatus \
--output text
Hit your task via the load balancer through the DNSName you noted in Create an Application Load Balancer. For example:
curl -Ss http://workshop-123456789.us-east-1.elb.amazonaws.com/quotes | jq
🔑 Amazon ECS services keep the desired number of tasks running and integrate with Elastic Load Balancing to distribute traffic across them.
🛠 You’ve deployed the sample application as a service behind an Application Load Balancer.
🎉 You’ve completed this section!
✅ If you want to dive into CI/CD, try our next section, Build a Continuous Deployment Pipeline, wherein you’ll use AWS CodeBuild to automatically build your container and create a CI/CD pipeline with AWS CodePipeline to orchestrate the process and deploy it to Amazon ECS.


问卷调查
短连接: http://t.cn/8FR2vwN
完整全链接: https://www.gdgdocs.org/forms/d/14xPVs3U2NPurBxzAQn_v8Tk0dD05L9RhQBIe2phm8wo/viewform
电子书优惠码
-
25% off the new Dart for Hipsters (http://pragprog.com/book/csdart/dart-for-hipsters) book with code “pragprogDart2014”
-
25% off Learning Dart (http://www.packtpub.com/learning-dart/book) ebook with code LDEB25, expires 04/30/14.
-
40% print, 50% ebook for Dart: Up and Running (http://shop.oreilly.com/product/0636920025719.do) with code “DART”
2000美元的 Google Cloud Platform
针对 Dart Flight School 的参会者使用 promo code: dfgdg-con
在 http://goo.gl/4tHrt0 申请。


The Quiz component has reciveved an upgrade with new challenging question types. You can still use your multiple choice questions and next to that you can now use group, fill in the blanks and form a sentence formats!
Special syntaxThere is a special syntax you can use with double brackets to indicate that that [[word]] of [[multiple words]] are one part of a sentence. You can also add additional words to make the question harder to answer.
OutdatedSome quizes are now marked Outdated to indicate that they are still in the old format.