Şöyle yaparız
aws ce get-reservation-utilization
Açıklaması şöyle
In AWS, use Cost Explorer to view your reserved instance utilization and identify opportunities for optimization:
Orçun Çolak'ın her şeyden bir parça notları
By default, RocksDB stores all the writes in a WAL along with the memtable. We turned the WAL off given that our use case was self-healing in nature and no data could have been lost.
RocksDB gives various ways to read data from the DB. You could either fire a get() command or a multiGet() command. multiGet() is more efficient than multiple get() calls in a loop for several reasons such as lesser thread contention on filter/index cache, lesser number of internal method calls, and better parallelization on the IO for different data blocks.Autocloseable
Every class of RocksDB implements an Autocloseable either directly or indirectly. You need to call the close() on RocksDB’s java objects explicitly (or use try-with-resources) whenever you are done using them to release the actual memory held by RocksDB’s C++ objects. Failure to do so can lead to memory leaks.
OAuth Token Exchange is specifically designed to exchange one type of token for another, typically for trusted clients to acquire a different kind of token without requiring user involvement. It’s used for various scenarios where a client application needs a specific token to access a resource, such as swapping an access token for a security token or an identity token.
In OAuth Token Exchange, user involvement is minimized or absent. The exchange is typically performed by trusted clients or services that have the necessary authorization, and it’s often done without requiring the user to re-authenticate or provide consent.
The token exchange service validates the request, ensuring that the client is authorized to make the exchange. It may also perform additional checks, such as verifying the original access token’s scope or expiration time.
Once the request is validated, the token exchange service issues the new token and sends it back to the client. The client can now use the newly acquired token to access the resource or perform the desired action. This token is suitable for the specific resource, and the client doesn’t need to undergo a full authentication and authorization process again.
POST /oauth2/token HTTP/1.1Host: https://localhost:9443Content-Type: application/x-www-form-urlencodedAuthorization: Basic <base64-encoded-clientId:clientSecret>grant_type=urn:ietf:params:oauth:grant-type:token-exchange&subject_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...&subject_token_type=urn:ietf:params:oauth:token-type:access_token&audience=http://localhost:8080&resource=resource-server.com/api/resource&scope=read write
Here are the key parameters that should be present in a token exchange requestGrant TypeThe grant_type parameter specifies the type of token exchange being requested. In the context of Token Exchange, this is usually set to "urn:ietf:params:oauth:grant-type:token-exchange". This indicates the intent to exchange tokens.Subject TokenThe subject_token parameter contains the token that the client application currently holds and wishes to exchange. This token can be an OAuth access token or another type of token.Subject Token TypeThe subject_token_type parameter specifies the type or format of the subject token. Common values include "urn:ietf:params:oauth:token-type:access_token" for OAuth access tokens, but it can vary based on the token being exchanged.Apart from these, there are a few additional optional parametersAudienceThe audienceparameter specifies the intended audience for the exchanged token. The audience can indicate the resource or service for which the exchanged token will be used.ResourceThe resource parameter is used to specify the target resource server or service where the exchanged token will be presented. It can help ensure that the exchanged token is valid for that resource.ScopeIf scopes are applicable to the token exchange, the scope parameter can be used to define the desired permissions associated with the exchanged token. The scope value may restrict the actions the token can perform.
DO-278 was updated to DO-278A by the RTCA SC-205 committee and released in December of 2011.
CNS/ATM Systems often have significant non-certified legacy software/hardware that was rolled out before DO-278A took effect. Instead of requiring you to start over and redevelop these systems from scratch, DO-278A allows for the concept of “Service History,” where “history” denotes evidence of strong record-keeping. This allows software engineers to see how the system has functioned in the past and in what capacity so they can ensure the systems are still safe to use and not prone to malfunctions or errors.
Instead, give clients restricted access to operations on the collection through messages that you implement. (Smalltalk Best Practice Patterns, Kent Beck)Instead, offer methods that provide limited, meaningful access to the information in the collections. (Implementation Patterns, Kent Beck)
a.getB().getItems()
Şöyle yaparız.class A {
private B b;
void doSomething() {
b.update();
}
Items getItems() {
return b.getItems();
}
}
a.getItems()
Örnek int selectedRow =...;
int selectedSeat = ...;
if (show.getRows().get(selectedRow).getSeats().get(selectedSeat)
.getReservationStatus()) {
{...}
Şöyle yaparız.int selectedRow = ...;
int selectedSeat = ...;
if (show.isSeatReserved(selectedRow, selectedSeat)) {...}
public class Order {
private final MutableList<LineItem> lineItems = Lists.mutable.empty();
public Order addLineItem(String name, double value) {
this.lineItems.add(new LineItem(name, value));
return this;
}
public void forEachLineItem(Procedure<LineItem> procedure) {
this.lineItems.forEach(procedure);
}
public int totalLineItemCount() {
return this.lineItems.size();
}
public int countOfLineItem(String name) {
return this.lineItems.count(lineItem -> lineItem.name().equals(name));
}
public double totalOrderValue() {
return this.lineItems.sumOfDouble(LineItem::value);
}
}
public record LineItem(String name, double value) {}
public record Order(ImmutableBag<LineItem> lineItems) {
public Order() {
this(Bags.immutable.empty());
}
public Order addLineItem(String name, double value) {
return new Order(lineItems.newWith(new LineItem(name, value)));
}
public double totalOrderValue() {
return this.lineItems.sumOfDouble(LineItem::value);
}
}
public record LineItem(String name, double value) {}