tag:blogger.com,1999:blog-7440740316993697082024-03-06T08:36:05.074+02:00Development && Marketing from Viacheslav KonashkovNew blog address - <a href="http://www.sundrop.info/">www.sundrop.info</a>
<br>Internet marketing and developmentВячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.comBlogger116125tag:blogger.com,1999:blog-744074031699369708.post-50685452738922399582022-09-15T10:17:00.012+03:002022-09-15T10:24:09.900+03:00<p> </p><h1 style=" box-sizing: border-box; font-family: Roboto, sans-serif; line-height: 1.25; margin: 0rem;">High Availability Writes</h1><div class="post-content" style=" box-sizing: border-box; color: #515151; font-family: "Crimson Text", serif; font-size: 20px;"><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner is a relational database with 99.999% availability which is roughly 5 mins a year. Spanner is a distributed system and can span multiple machines, multiple datacenters (and even geographical regions when configured). It splits the records automatically among its replicas and provides automatic failover. Unlike traditional failover models, Spanner doesn’t failover to a secondary cluster but can elect an available read-write replica as the new leader.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">In relational databases, providing both high availability and high consistency in writes is a very hard problem. Spanner’s synchronous replication, the use of dedicated networking and <a href="https://en.wikipedia.org/wiki/Paxos_(computer_science)" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">Paxos</a> voting provides high availability without compromising consistency.</p><h2 id="high-availability-of-reads-vs-writes" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">High availability of reads vs writes</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">In traditional relational databases (e.g. MySQL or PostgreSQL), scaling and providing higher availability to reads is easier than writes. Read-only replicas provide a copy of the data read-only transactions can retrieve from. Data is replicated to the read-only replicas from a read-write master either synchronously or asynchronously.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">In synchronous models, master synchronously writes to the read replicas at each write. Even though this model ensures that read-only replicas always have the latest data, it makes the writes quite expensive (and causes availability issues for writes) because the master has to write to all available replicas before it returns.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">In asynchronous models, read-only replicas get the data from a stream or a replication log. Asynchronous models make writes faster but introduce a lag between the master and the read-only replicas. Users have to tolerate the lag and should be monitoring it to identify replication outages. The asynchronous writes make the system inconsistent because not all the replicas will have the latest version of the until asynchronous synchronization is complete. The synchronous writes make data consistent by ensuring all replicas got the change before a write succeeds.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;"><img alt="HA cluster" src="https://spanner.fyi/img/sync-vs-async-replica.png" style="border-radius: 5px; box-sizing: border-box; display: block; margin: 1rem 0px; max-width: 100%;" /></p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Horizontally scaling reads by adding more read replicas is only part of the problem. <strong style="box-sizing: border-box;">Scaling writes is a harder problem.</strong> Having more than one master is introducing additional problems. If a master is having outage, other(s) can keep serving writes without users experiencing downtime. This model requires replication of writes among masters. Similar to read replication, <a href="https://en.wikipedia.org/wiki/Multi-master_replication" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">multi-master replication</a> can be implemented asynchronously or synchronously. If implemented synchronously, it often means less availability of writes because a write should replicate in all masters and they should be all available before it can succeed. As a tradeoff, multi-master replication is often implemented with asynchronous replication but it negatively impacts the overall system by introducing:</p><ul style="box-sizing: border-box; margin-bottom: 0.5rem; margin-top: 0.5rem;"><li style="box-sizing: border-box;">Looser consistency characteristics that violate ACID promises.</li><li style="box-sizing: border-box;">Increased risk of timeouts and communication latency.</li><li style="box-sizing: border-box;">Necessity for conflict resolution between two or more masters if conflicting updates happened but not communicated.</li></ul><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Due to the complexity and the failure modes multi-master replication introduces, it’s not a commonly preferred way of providing high availability in practice.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">As an alternative, <a href="https://en.wikipedia.org/wiki/High-availability_cluster" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">high-availability clusters</a> are a more popular choice. In this model, you’d have an entire cluster that can take over when the primary master goes down. Today, cloud providers implement this model to provide high availability features for their managed traditional relational database products.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;"><img alt="HA cluster" src="https://spanner.fyi/img/failover-cluster.png" style="border-radius: 5px; box-sizing: border-box; display: block; margin: 1rem 0px; max-width: 100%;" /></p><h2 id="topology" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Topology</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner doesn’t use high availability clusters but approaches to the problem from a different angle. A Spanner cluster* <a href="https://cloud.google.com/spanner/docs/replication#replica_types" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">contains</a> multiple read-write, may contain some read-only and some witness replicas.</p><ul style="box-sizing: border-box; margin-bottom: 0.5rem; margin-top: 0.5rem;"><li style="box-sizing: border-box;">Read-write replicas serve reads and writes.</li><li style="box-sizing: border-box;">Read-only replicas serve reads.</li><li style="box-sizing: border-box;">Witnesses don’t serve data but participate in leader election.</li></ul><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Read-only and witness replicas are only used for multi-regional Spanner clusters that can span across multiple geographical regions. Single region clusters only use read-write replicas. Each replica lives in a different zone in the region to avoid single point of failure due to zonal outages.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;"><img alt="Split leader in writes" src="https://spanner.fyi/img/write-leader.png" style="border-radius: 5px; box-sizing: border-box; display: block; margin: 1rem 0px; max-width: 100%;" /></p><h2 id="splits" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Splits</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner’s replication and sharding capabilities come from its splits. Spanner splits data to replicate and distribute them among the replicas. Split happens <a href="https://cloud.google.com/spanner/docs/schema-and-data-model#load-based_splitting" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">automatically</a> when Spanner detects high read or high write load among the records. Each split is replicated and has a <strong style="box-sizing: border-box;">leader replica</strong>.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">When a write arrives, Spanner finds the split the row is in. Then, we look for the leader of that split and route the write to the leader. This is true even in multi-region setups where user is geographically closer to another non-leader read-write replica. In the case of an outage of the leader, an available read-write replica is elected as the leader and user’s write is served from there.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;"><img alt="Split leader and replicas" src="https://spanner.fyi/img/split-leader-replica.png" style="border-radius: 5px; box-sizing: border-box; display: block; margin: 1rem 0px; max-width: 100%;" /></p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">In order for a write to succeed, a leader needs to synchronously replicate the change to the other replicas. But isn’t this impacting the availability of the writes negatively? If writes need to wait for all replicas to succeed, a replica can be a single point of failure because writes wouldn’t succeed until all replicas replicate the change.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">This is where Spanner does something better. Spanner only requires <em style="box-sizing: border-box;">a majority of the Paxos voters</em> to successfully write. This allows writes to succeed even when a read-write replica goes down. Only the majority of the voters are required not all of the read-write replicas.</p><h2 id="synchronous-replication" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Synchronous replication</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">As mentioned above, synchronous replication is hard and impacts the availability of the writes negatively. On the other hand when replication happens asynchronously, they cause inconsistencies, conflicts and sometimes data loss. For example, when a master becomes unavailable due to a networking issue, it may still have committed changes but might have not delivered them to the secondary master. If the secondary master updates the same records after a failover, data loss can happen or conflict resolution may be required. PostgreSQL provides <a href="https://momjian.us/main/writings/pgsql/replication.pdf" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">a variety</a> of replication models with different tradeoffs. The tradeoffs summary below can give you a very high level idea of how many different concerns to worry about when designing replication models. A summary of various PostgreSQL replication models and their tradeoffs:</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;"><img alt="A summary of various PostgreSQL replication models and their tradeoffs." src="https://spanner.fyi/img/postgres-replica.png" style="border-radius: 5px; box-sizing: border-box; display: block; margin: 1rem 0px; max-width: 100%;" /></p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner’s <a href="https://cloud.google.com/spanner/docs/replication" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">replication</a> is <em style="box-sizing: border-box;">synchronous</em>. Leaders have to synchronously communicate with other read/write replicas about the change and confirm it in order for a write to succeed.</p><h2 id="two-phase-commit-2pc" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Two-phase commit (2PC)</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">While writes only affecting a single split uses a simpler and faster protocol, if two or more splits are required for a write transaction, <a href="https://en.wikipedia.org/wiki/Two-phase_commit_protocol" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">two-phase commit (2PC)</a> is executed. 2PC is infamously known as “the anti-availability protocol” because it requires participation from all the replicas and any replica can be a single point of failure. Spanner still serves writes even if some of the replicas are unavailable, because only a majority of voting replicas are required in order to commit a write.</p><h2 id="network" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Network</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner is a distributed system and is inherently affected by problems that are impacting distributed systems in general. Networking itself is a factor of outages in distributed systems. On the other hand, Google cites only 7.6% of the Spanner failures were networking related. Spanner’s 99.999% availability is not highly affected from networking outages. This is mostly because it runs on Google’s private network. Years of operational maturity, reserved resources, having control over upgrades and hardware makes networking not a significant source of outages. <a href="https://cloud.google.com/blog/products/gcp/inside-cloud-spanner-and-the-cap-theorem" style="box-sizing: border-box; color: #005f79; font-weight: bold; text-decoration-line: none;">Eric Brewer’s earlier article</a> explains the role of networking in this case more in detail.</p><h2 id="colossus" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Colossus</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner’s durability guarantees come from Google’s distributed file system, Colossus. Spanner also mitigates some more risk by depending on Colossus. The use of Colossus allows us to have the file storage decoupled from the database service. Spanner is a “shared nothing” architecture and because any server in a cluster can read from Colossus, replicas can recover quickly from whole-machine failures.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Colossus also provides replication and encryption. If a Colossus instance goes down, Spanner can still work on the data via the available Colossus instances. Colossus encrypts data and this is why Spanner provides encryption at rest by default out of the box.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;"><img alt="Colossus replication" src="https://spanner.fyi/img/colossus-replica.png" style="border-radius: 5px; box-sizing: border-box; display: block; margin: 1rem 0px; max-width: 100%;" /></p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner read-write replicas hands off the data to Colossus where data is replicated for 3 times. Given there are three read-write replicas in a Spanner cluster, this means the data is replicated for 9 times.</p><h2 id="automatic-retries" style="box-sizing: border-box; font-family: Roboto, sans-serif; font-size: 1.1rem; line-height: 1.25; margin: 1.2rem 0rem 0rem;">Automatic Retries</h2><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">As repeatedly mentioned above, Spanner is a distributed system and is not magic. It experiences more internal aborts and timeouts than traditional databases when writing. A common strategy in distributed systems in order to deal with partial and temporary failures is to retry. Spanner client libraries provide automatic retries for read/write transactions. In the following Go snippet, you see the APIs to create a read-write transaction. The client automatically retries the body if it fails due to aborts or conflicts:</p><pre style="background-color: #ebebeb; border-radius: 3px; box-sizing: border-box; font-family: Menlo, Monaco, "Courier New", monospace; font-size: 0.8rem; line-height: 1.4; margin-bottom: 1rem; margin-top: 0px; overflow-wrap: normal; overflow: auto; padding: 7px 10px; tab-size: 4; word-break: normal;"><code style="background-color: transparent; border-radius: 3px; box-sizing: border-box; color: inherit; font-family: Menlo, Monaco, "Courier New", monospace; font-size: 16px; padding: 0px;">import "cloud.google.com/go/spanner"
_, err := client.ReadWriteTransaction(ctx, func(ctx context.Context, txn *spanner.ReadWriteTransaction) error {
// User code here.
})
</code></pre><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">One of the challenges of developing ORM framework support for Google Cloud Spanner was the fact most ORMs didn’t have automatic retries, therefore their APIs didn’t give developers a sense that they shouldn’t maintain any application state in the scope of a transaction. In contrast, Spanner libraries care a lot of retries and make an effort to automatically deliver them without creating extra burden to the user.</p><p style="box-sizing: border-box; margin-bottom: 1rem; margin-top: 0.3rem;">Spanner approaches to sharding and replication differently than traditional relational databases. It utilizes Google’s infrastructure and fine-tunes several traditionally hard problems to provide high availability without compromising consistency.</p><hr style="border-bottom-color: rgb(255, 255, 255); border-bottom-style: solid; border-image: initial; border-left: 0px; border-right: 0px; border-top-color: rgb(238, 238, 238); border-top-style: solid; box-sizing: border-box; margin: 1.5rem 0px; position: relative;" /><ul style="box-sizing: border-box; margin-bottom: 0.5rem; margin-top: 0.5rem;"><li style="box-sizing: border-box;">(*) Google Cloud Spanner’s terminology for a cluster is an instance. I avoided to use “instance” because it is an overloaded term and might mean “replica” for the majority of the readers of this article.</li><li style="box-sizing: border-box;">(**) The write is routed to the split leader. Read the Splits section for more.</li></ul></div>Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-87403424679078760202022-08-18T13:45:00.001+03:002022-08-18T13:59:22.587+03:00React vs Vue: The Core Similarities and Differences<p><span face="Inter, sans-serif" style="color: #012840; font-size: 20px;">As one of the most dynamic fields in software development, front-end evolves constantly. So much so that it sometimes seems impossible to keep up with its many emerging trends and tools. The adoption of ES6 and the functional nature of JavaScript saw people abandon the imperative universe of jQuery. Instead, they embraced the declarative, component-based way of structuring applications.</span></p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">As of 2019, three players dominate the front-end battleground — <a class="o-link-external" href="http://mentormate.com/blog/polymer-vs-angular-future-web-apps/" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">React, Angular</a>, and Vue. According to “<a class="o-link-external" href="https://stateofjs.com/" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">State of JavaScript 2018</a>,” React and Vue have the highest satisfaction rate. These are also the technologies are use the most. Facebook backs React and Netflix, Airbnb, Instagram, and many others use it. Evan You and a small core team created Vue and You still backs it. Alibaba, Wizzair GitLab, and others use it.</p><h5 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 2.4rem; line-height: 3.6rem; margin: 0px; padding: 0px;"><span style="box-sizing: inherit;">React vs Vue: Similarities</span></h5><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px;">Before we discuss the core differences in <a class="o-link-external" href="http://mentormate.com/blog/react-native-components/" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">React</a> vs Vue, let’s note the traits that they have in common.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">One of the most significant common traits is the use of Virtual DOM. The Virtual DOM is an abstraction of the HTML DOM where every HTML element is a JavaScript object. This approach offers some performance gain and enables DOM manipulation in a more declarative fashion.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">Here’s an example of the Virtual DOM:<br style="box-sizing: inherit;" /></p><div class="enlighter-default enlighter-v-standard enlighter-t-beyond enlighter-hover enlighter-linenumbers" style="background-color: #f7f7fa; border-radius: 5px; border: 2px solid rgb(226, 226, 232); box-sizing: inherit; color: #333333; direction: ltr; font-family: "Source Code Pro", "Liberation Mono", "Courier New", Courier, monospace; font-size: 12px; line-height: 1.35em; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 20px; overflow-wrap: break-word; overflow: hidden; padding: 10px 10px 10px 5px; position: relative; white-space: pre-wrap;"><div class="enlighter" style="border-collapse: collapse; border-spacing: 0px; box-sizing: inherit; counter-reset: enlighter 0; display: table; empty-cells: show; font-size: 1em; margin: 0px; min-width: 100%; padding: 0px; width: 750.641px;"><div style="border-radius: 8px 8px 0px 0px; border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"><</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">div </span><span class="enlighter-k1" style="box-sizing: inherit; color: #286491; font-family: inherit; font-size: 1.1em; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;">class</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">=</span><span class="enlighter-s0" style="box-sizing: inherit; color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">"container"</span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">></span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"><</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">img </span><span class="enlighter-k1" style="box-sizing: inherit; color: #286491; font-family: inherit; font-size: 1.1em; font-weight: 700; line-height: inherit; margin: 0px; padding: 0px;">class</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">=</span><span class="enlighter-s0" style="box-sizing: inherit; color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">"img-responsive"</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> /</span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">></span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"><</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">/div</span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">></span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"><</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">script</span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">></span><span class="enlighter-c0" style="box-sizing: inherit; color: #8181a1; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-c0" style="box-sizing: inherit; color: #8181a1; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">// below you will find an example of Virtual DOM representation of the HTML code above</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">const domNode = </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">{</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> tag: </span><span class="enlighter-s0" style="box-sizing: inherit; color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">'div'</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">,</span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> attributes: </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">{</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> className: </span><span class="enlighter-s0" style="box-sizing: inherit; color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">'container'</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">}</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">,</span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> children: </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">[</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">{</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> tag: </span><span class="enlighter-s0" style="box-sizing: inherit; color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">'img'</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">,</span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> attributes: </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">{</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> className: </span><span class="enlighter-s0" style="box-sizing: inherit; color: #dd1144; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">'img-responsive'</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">}</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">,</span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> children: </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">[]</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">}</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"> </span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">]</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span></div></div><div style="border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">}</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">;</span></div></div><div style="border-radius: 0px 0px 8px 8px; border: 0px solid rgb(255, 255, 255); box-sizing: inherit; color: #aaaaaa; display: table-row; font-size: inherit; line-height: 1.5em; list-style: none; margin: 0px; min-height: 14px; padding: 1px 5px 1px 10px;"><div style="box-sizing: inherit; display: table-cell; padding-left: 10px;"><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"></span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;"><</span><span class="enlighter-text" style="box-sizing: inherit; color: #2f3235; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">/script</span><span class="enlighter-g1" style="box-sizing: inherit; color: #777777; font-family: inherit; font-size: 1.1em; line-height: inherit; margin: 0px; padding: 0px;">></span></div></div></div></div><br style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-top: 0px;" /><a class="o-link-external" href="http://mentormate.com/blog/why-you-should-be-hyped-up-for-react-hooks/" style="box-sizing: inherit; color: #f28627; font-family: Inter, sans-serif; font-size: 20px; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">React</a><span face="Inter, sans-serif" style="color: #012840; font-size: 20px;"> and Vue are both lightweight, possess component-based architecture, and expose lifecycle methods. Their performance is fairly similar so those differences are too negligible to discuss. Both technologies work with any existing web application, even if it’s not a Single Page Application. This is the case with the Gutenberg editor. It’s built with React and was recently implemented in the WordPress ecosystem. Similar is the case with GitLab, where the jQuery codebase is being gradually replaced with Vue.</span><span face="Inter, sans-serif" style="color: #012840; font-size: 20px;"></span><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">Last but not least, both React and Vue have big proactive communities and plenty of libraries and tools available.</p><h5 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 2.4rem; line-height: 3.6rem; margin: 0px; padding: 0px;"><span style="box-sizing: inherit;">React vs Vue: Differences</span></h5><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px;">Let’s begin with the most obvious distinction: React is a library, whereas Vue is a framework*.</p><blockquote style="border: none; margin: 0 0 0 40px; padding: 0px;"><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px; text-align: left;"><i style="box-sizing: inherit;">*The official docs describe Vue as a framework and React as a library. The difference between framework and library is subtle and remains open for interpretations.</i></p></blockquote><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">React allows DOM manipulation, component architecture, and state management (the component-level state, not Redux). All the rest gets left up to the community. This approach offers a lot of freedom for the developers. Many React applications rely on third-party libraries, built, and supported by the community. The choice for the right one is a challenge for beginners.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">Vue comes with a lot of syntactic sugars, plugin system, built-in directives, transitions, etc. Plus, the core team created companion libraries for routing and state management along with other helpful tools. Some examples of such companion libraries are the Vue-router, Vuex for state management, and Vue CLI.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">Of course, users are not obliged to use these tools as there are some alternatives. The main benefit is that these are built and supported by the core team. Vue’s main focus is simplicity. The team takes care of these common concerns and enables faster setup and development. Vue quickly caught up to React and the community built plenty of third-party libraries and enriched its ecosystem.</p><h5 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 2.4rem; line-height: 3.6rem; margin: 0px; padding: 0px;"><span style="box-sizing: inherit;">Data Mutation</span></h5><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px;">In most modern web applications, JavaScript handles a big part of the logic in the browser. To maximize the web app’s interactivity, the UI should constantly react to data changes. Usually, we refer to the application’s data as “state”. Most often, the state is a JavaScript object where key/value pairs represent that data. In JavaScript, objects and arrays are reference types, hence mutable by design.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">For instance, if we change one of the properties on an object, the object keeps its memory location, unlike with strings and numbers. Read more about that <a class="o-link-external" href="https://codeburst.io/explaining-value-vs-reference-in-javascript-647a975e12a0" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">here</a>. One of the biggest contrast between React and Vue is the way they handle state change. This heavily affects the mechanism behind the UI updates, also known as re-rendering.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">React promotes the functional programming (FP) style. It implements FP principles, such as higher-order functions, immutability, pure functions, etc. The philosophy behind React is that the state remains immutable. When trying to mutate the state object, no re-rendering occurs. In order to trigger re-rendering, the method <span style="box-sizing: inherit; font-weight: 700;">setState</span> should be used. This updates not only the root component but the entire component sub-tree as well. The re-rendering process can be controlled by using PureComponent or <span style="box-sizing: inherit; font-weight: 700;">shouldComponentUpdate</span> lifecycle hook. That flexibility comes at a cost, though, so all the optimizations should be done manually. This makes the data flow more predictable. Overall, React gives developers a lot of control over the re-rendering process.</p><h6 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 1.6rem; line-height: 2.4rem; margin: 0px; padding: 0px; text-transform: uppercase;">HERE’S AN EXAMPLE IN <a class="o-link-external" href="https://codesandbox.io/s/vjjmvpnwkl" style="box-sizing: inherit; color: black; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">THIS DEMO REACT APPLICATION</a> I MADE.</h6><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1.6rem 0px 0px;">In Vue, the state is represented in the <span style="box-sizing: inherit; font-weight: 700;">data</span> object. Unlike React, the mutation of the state object triggers re-rendering. You can find an example in <a class="o-link-external" href="https://codesandbox.io/s/qkllmy89yj" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">this demo Vue application</a> I made.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">However, there are some gotchas. For example, mutating nested objects or arrays might not trigger re-rendering. In this case, we either use the Vue.set method (similar to the setState method in React) or make the changes in immutable fashion with <span style="box-sizing: inherit; font-weight: 700;">Object.assign</span> or the ES6 spread operators. This might confuse beginners but <a class="o-link-external" href="https://vuejs.org/v2/guide/reactivity.html" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">this guide about Vue’s internal mechanism</a> should help.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">Vue automatically performs optimizations to update specific parts of the component tree but doesn’t offer a manual way to prevent re-renders. In React, the developer decides when and where to manually prevent them.</p><h5 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 2.4rem; line-height: 3.6rem; margin: 0px; padding: 0px;"><span style="box-sizing: inherit;">Templating and Styling</span></h5><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px;">Templates and styles are essential parts of every UI library. They’re also where the differences between React and Vue are most obvious since it affects the code design. There’s a large contrast in the way both technologies approach it.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">As mentioned above, React relies heavily on its functional, JavaScript-y nature. The logic and the markup are regarded as a whole and therefore are mixed. This is achieved with the use of JSX which is an abstraction of <span style="box-sizing: inherit; font-weight: 700;">React.createElement</span> method and is used to create Virtual DOM entities. The syntax resembles HTML with some significant differences. It offers smoother developer experience, debugging, and better code readability than the createElement method. You can also use React without JSX.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">In terms of styling, the React community came up with different solutions like JSS and Styled components. This is a typical example of the freedom and the rich choices that the React community offers. For years, they addressed the CSS`s flaws and came up with great — revolutionary even — ideas. Personally, I’m a big fan of <a class="o-link-external" href="https://www.styled-components.com/" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank">Styled components</a>.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">Vue takes a more conservative approach to templates and styels — one separated from the logic. It represents the markup as templates that look just like old school HTML. In fact, every valid HTML is also a valid Vue template. Inside the templates, the framework offers a lot of syntactic sugars like conditionals, iterations, etc.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">The same is true for the way Vue handles styling. You can write pure CSS or any preprocessor in the style tag. In addition, the „scoped” attribute allows styles encapsulation on component level. In general, Vue styling feels more natural to newcomers but lacks some of the flexibility that the CSS-in-JS solutions from the React ecosystem offer.</p><h5 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 2.4rem; line-height: 3.6rem; margin: 0px; padding: 0px;"><span style="box-sizing: inherit;">Extensibility</span></h5><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px;">Extending Vue or React applications with third-party libraries is quite simple. Most of the vendor libraries for React are simply components that enhance the existing ones already. For instance, the React-Redux library uses the Context API and exposes a higher-order component that makes state accessible from every component of choice.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;">In Vue, many of the third-party libraries are plugins and take advantage of the built-in plugin system. Add the plugins via the <span style="box-sizing: inherit; font-weight: 700;">Vue.use</span> method.</p><h5 style="box-sizing: inherit; color: #262729; font-family: Inter, sans-serif; font-size: 2.4rem; line-height: 3.6rem; margin: 0px; padding: 0px;"><span style="box-sizing: inherit;">React vs Vue Summary</span></h5><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin: 1rem 0px 0px;">Both technologies offer great advantages. Being a library, React gives more control to its users, like the manual re-rendering control. It heavily employs the functional programming principles, indicated in the way the library handles the state and the communication between the components. In contrast, Vue as a framework provides more built-in features and companion libraries from the core team. This makes the development experience smoother.</p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;"><i style="box-sizing: inherit;">If you’d like to try React out for yourself, you can start with </i><a class="o-link-external" href="https://facebook.github.io/create-react-app/" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank"><i style="box-sizing: inherit;">Create React App</i></a><i style="box-sizing: inherit;">. It’s a great tool for generating React projects without all the boilerplate. If you want to build a Vue project, you can use </i><a class="o-link-external" href="https://cli.vuejs.org/" style="box-sizing: inherit; color: #f28627; transition-duration: 0.2s; transition-property: color, background-color, opacity, border-color; transition-timing-function: ease-in-out; word-break: break-word;" target="_blank"><i style="box-sizing: inherit;">Vue-CLI</i></a><i style="box-sizing: inherit;">, which offers great options out of the box.</i></p><p style="box-sizing: inherit; color: #012840; font-family: Inter, sans-serif; font-size: 20px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 2.4rem !important; margin: 2.4rem 0px 0px;"><em style="box-sizing: inherit;">Additional contributions and edits by MentorMate Senior Front-End Developer Rosen Kanev. </em></p>Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-20266360751357355132019-11-03T14:21:00.000+02:002019-11-03T14:21:44.845+02:0010 Best Practices for Better RESTful API<div>
Web APIs have become a very important topic in the last year. We are working every day with different backend systems and therefore we know about the importance of clean API design.</div>
<div>
Typically we use a RESTful design for our web APIs. The concept of REST is to separate the API structure into logical resources. There are used the HTTP methods GET, DELETE, POST and PUT to operate with the resources.</div>
<div>
These are 10 best practices to design a clean RESTful API:</div>
<h2>
<br /></h2>
<h2>
1. Use nouns but no verbs</h2>
<div>
For an easy understanding use this structure for every resource:</div>
<table border="1" style="width: 100%px;">
<tbody>
<tr>
<td width="85">Resource</td>
<td width="85">GET<br />
read</td>
<td width="85">POST<br />
create</td>
<td width="85">PUT<br />
update</td>
<td width="85">DELETE</td>
</tr>
<tr>
<td width="85">/cars</td>
<td width="85">Returns a list of cars</td>
<td width="85">Create a new car</td>
<td width="85">Bulk update of cars</td>
<td width="85">Delete all cars</td>
</tr>
<tr>
<td width="85">/cars/711</td>
<td width="85">Returns a specific car</td>
<td width="85">Method not allowed (405)</td>
<td width="85">Updates a specific car</td>
<td width="85">Deletes a specific car</td>
</tr>
</tbody>
</table>
<div>
Do not use verbs:</div>
<blockquote>
<pre>/getAllCars
/createNewCar
/deleteAllRedCars
</pre>
</blockquote>
<h2>
<br /></h2>
<h2>
2. GET method and query parameters should not alter the state</h2>
<div>
Use <strong>PUT, POST</strong> and <strong>DELETE</strong> methods instead of the<strong> GET</strong> method to alter the state.<br />
Do not use <strong>GET</strong> for state changes:</div>
<blockquote>
<pre>GET /users/711?activate or
GET /users/711/activate
</pre>
</blockquote>
<h2>
<br /></h2>
<h2>
3. Use plural nouns</h2>
<div>
Do not mix up singular and plural nouns. Keep it simple and use only plural nouns for all resources.</div>
<blockquote>
<pre>/cars instead of /car
/users instead of /user
/products instead of /product
/settings instead of /setting</pre>
</blockquote>
<br />
<h2>
4. Use sub-resources for relations</h2>
<div>
If a resource is related to another resource use subresources.</div>
<blockquote>
<pre>GET /cars/711/drivers/ Returns a list of drivers for car 711
GET /cars/711/drivers/4 Returns driver #4 for car 711
</pre>
</blockquote>
<h2>
<strong><br /></strong></h2>
<h2>
5. Use HTTP headers for serialization formats</h2>
<div>
Both client and server, need to know which format is used for the communication. The format has to be specified in the HTTP-Header.</div>
<div>
<em>Content-Type</em> defines the request format.<br />
<em>Accept</em> defines a list of acceptable response formats.</div>
<h2>
<strong><br /></strong></h2>
<h2>
6. Use HATEOAS</h2>
<div>
<strong>H</strong>ypermedia <strong>a</strong>s <strong>t</strong>he <strong>E</strong>ngine <strong>o</strong>f <strong>A</strong>pplication <strong>S</strong>tate is a principle that hypertext links should be used to create better navigation through the API.<br />
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">01</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">{</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">02</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"id"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: 711,</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">03</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"manufacturer"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"bmw"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">04</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"model"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"X5"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">05</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"seats"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: 5,</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">06</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"drivers"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: [</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">07</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">{</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">08</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"id"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"23"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">09</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"name"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"Stefan Jauker"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">10</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"links"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: [</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">11</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">{</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">12</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"rel"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"self"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">13</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"href"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"/api/v1/drivers/23"</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">14</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">15</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">]</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">16</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">17</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">]</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">18</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></td></tr>
</tbody></table>
</div>
</div>
<h2>
<br /></h2>
<h2>
7. Provide filtering, sorting, field selection and paging for collections</h2>
<div>
<strong>Filtering</strong>:</div>
<div>
Use a unique query parameter for all fields or a query language for filtering.</div>
<blockquote class="tr_bq">
GET /cars?color=red Returns a list of red cars<br />GET /cars?seats<=2 Returns a list of cars with a maximum of 2 seats</blockquote>
<div>
<strong>Sorting</strong>:</div>
<div>
Allow ascending and descending sorting over multiple fields.</div>
<blockquote class="tr_bq">
GET /cars?sort=-manufactorer,+model</blockquote>
<div>
This returns a list of cars sorted by descending manufacturers and ascending models.</div>
<div>
<strong><br /></strong>
<strong>Field selection</strong></div>
<div>
Mobile clients display just a few attributes in a list. They don’t need all the attributes of a resource. Give the API consumer the ability to choose returned fields. This will also reduce the network traffic and speed up the usage of the API.</div>
<blockquote class="tr_bq">
GET /cars?fields=manufacturer,model,id,color</blockquote>
<div>
<strong>Paging</strong></div>
<div>
Use limit and offset. It is flexible for the user and common in leading databases. The default should be limit=20 and offset=0</div>
<blockquote class="tr_bq">
GET /cars?offset=10&limit=5</blockquote>
<div>
To send the total entries back to the user use the custom HTTP header: X-Total-Count.</div>
<div>
Links to the next or previous page should be provided in the HTTP header link as well. It is important to follow this link header values instead of constructing your own URLs.</div>
<blockquote class="tr_bq">
Link: ; rel="next",<br />; rel="last",<br />; rel="first",<br />; rel="prev",</blockquote>
<h2>
<strong><br /></strong></h2>
<h2>
8. Version your API</h2>
<div>
Make the API Version mandatory and do not release an unversioned API. Use a simple ordinal number and avoid dot notation such as 2.5.</div>
<div>
We are using the url for the API versioning starting with the letter „v“</div>
<blockquote class="tr_bq">
/blog/api/v1</blockquote>
<h2>
<strong><br /></strong></h2>
<h2>
9. Handle Errors with HTTP status codes</h2>
<div>
It is hard to work with an API that ignores error handling. Pure returning of a HTTP 500 with a stacktrace is not very helpful.</div>
<div>
<strong>Use HTTP status codes</strong></div>
<div>
The HTTP standard provides over 70 status codes to describe the return values. We don’t need them all, but there should be used at least an amount of 10.</div>
<div>
<blockquote class="tr_bq">
200 – OK – Everything is working<br />201 – OK – New resource has been created<br />204 – OK – The resource was successfully deleted<br />304 – Not Modified – The client can use cached data<br />400 – Bad Request – The request was invalid or cannot be served. The exact error should be explained in the error payload. E.g. „The JSON is not valid“<br />401 – Unauthorized – The request requires an user authentication<br />403 – Forbidden – The server understood the request, but is refusing it or the access is not allowed.<br />404 – Not found – There is no resource behind the URI.<br />422 – Unprocessable Entity – Should be used if the server cannot process the entity, e.g. if an image cannot be formatted or mandatory fields are missing in the payload.<br />500 – Internal Server Error – API developers should avoid this error. If an error occurs in the global catch blog, the stracktrace should be logged and not returned as response.</blockquote>
</div>
<div>
<strong>Use error payloads</strong></div>
<div>
All exceptions should be mapped in an error payload. Here is an example of how a JSON payload should look like.<br />
<br />
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">01</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">{</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">02</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"errors"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: [</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">03</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">{</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">04</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"userMessage"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"Sorry, the requested resource does not exist"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">05</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"internalMessage"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"No car found in the database"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">,</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">06</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"code"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: 34,</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">07</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"more info"</code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">: </code><code class="string" style="background: none !important; border: 0px !important; bottom: auto !important; color: blue !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">"<a href="http://dev.mwaysolutions.com/blog/api/v1/errors/12345" style="border: 0px; color: blue !important; hyphens: none; margin: 0px; outline: none; overflow-wrap: normal !important; padding: 0px; text-decoration-line: none; vertical-align: baseline;">http://dev.mwaysolutions.com/blog/api/v1/errors/12345</a>"</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">08</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1" style="background: none rgb(255, 255, 255) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">09</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="spaces" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"> </code><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">]</code></td></tr>
</tbody></table>
</div>
<div class="line alt2" style="background: none rgb(248, 248, 248) !important; border: 0px !important; bottom: auto !important; color: #444444; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; font-size: 12px; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<table style="background: none !important; border-collapse: collapse !important; border-spacing: 0px; border: 0px !important; bottom: auto !important; color: #757575; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><tbody style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">
<tr style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;"><td class="number" style="background: none !important; border: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;"><code style="background: none !important; border: 0px !important; bottom: auto !important; display: block !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0.3em 0px 0px !important; position: static !important; right: auto !important; text-align: right !important; top: auto !important; vertical-align: baseline !important; width: 2.7em !important;">10</code></td><td class="content" style="background: none !important; border-bottom-color: initial !important; border-bottom-style: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-right-color: initial !important; border-right-style: initial !important; border-top-color: initial !important; border-top-style: initial !important; border-width: 0px 0px 0px 3px !important; bottom: auto !important; color: rgb(0, 0, 0) !important; float: none !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px 0px 0px 0.5em !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;"><code class="plain" style="background: none !important; border: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, "Bitstream Vera Sans Mono", "Courier New", Courier, monospace !important; font-size: 1em !important; height: auto !important; hyphens: none; left: auto !important; line-height: 12px !important; margin: 0px !important; min-height: auto !important; outline: 0px !important; overflow-wrap: normal !important; padding: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;">} </code></td></tr>
</tbody></table>
</div>
</div>
<div>
</div>
<h2>
<strong><br /></strong></h2>
<h2>
10. Allow overriding HTTP method</h2>
<div>
Some proxies support only <strong>POST</strong> and <strong>GET</strong> methods. To support a RESTful API with these limitations, the API needs a way to override the HTTP method.</div>
<div>
Use the custom HTTP Header <strong>X-HTTP-Method-Override</strong> to override the POST Method.</div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-23114455720820898112018-09-20T16:46:00.001+03:002018-09-20T16:46:06.650+03:00Жизненная история, или Как не стоит проводить собеседованиеНиже небольшой рассказ в свободной форме о том, как все же не стоит проводить собеседование с потенциальными кандидатами. Любые совпадения с реальными людьми случайны, история выдумана и показывает типичные ошибки интервьюеров.<br />
<br />
Утро понедельника было тяжелым. Тимлид Саша и сеньор Паша, отходившие от корпоратива в воскресенье, еще были на сушняке. Но вспомнив, что через час-полтора к ним придет кандидат — зашевелились и начали думать, что же все-таки у него спросить. Не долго думая, Паша загуглил «<название технологии> вопросы на собеседования». Саша был более продвинутым чуваком, а посему искал «top ten interview question for <название технологии>». Выписав трясущейся рукой 10-20 вопросов на листочек с эмблемой лидеров рынка, они отправились в переговорную. Новая HR Таня, за заигрывание с которой вчера обоим было стыдно, завела кандидата, который, нервно покусывая ручку, сидел и ждал своего часа.<br />
<br />
Все начиналось со стандартных вопросов, на которые нужно было просто списать время: расскажите о себе, с чем работали ранее, с чем хотели бы работать и так далее. Естественно, ответы кандидата нигде не фиксировались, и вспомнив, что все-таки им отчитываться перед ПМ-ами за потенциальных кандидатов, Паша и Саша начали задавать технические вопросы. Все как по накатанной:<br />
Что лучше — абстрактный класс или интерфейс?<br />
Что такое инкапсуляция, наследование, полиморфизм?<br />
MVC/MVP/MVVM?<br />
<br />
Ответы также никто не фиксировал. Но в конце тимлид Саша, сгоняв за водичкой из кулера и проявив максимум креатива, — задал задачу на пару табличек и какой-то сложный запрос с логическим продолжением разбора, что такое оптимизатор запросов и как его лучше написать. Ни к какому решению в конце никто так и не пришел, но времени уже оставалось мало, и оба уже ясно видели, как пойдут за кофе, потом в курилку, потом еще раз за кофе и потом созвон, а после обед... В общем, утро прошло продуктивно!<br />
<br />
HR-менеджер Таня пришла за кандидатом и сказала, что ей необходимо задать еще пару вопросов: почему вы хотите работать в нашей компании, кем вы видите себя через пять лет.<br />
<br />
Вопросы явно сбили кандидата с толку, ведь работать он там еще толком не захотел, да и не ясновидящий, но как-то выкрутился. После HR невзначай добавила: «Я же психолог. Я вижу, что там, где вы сейчас работаете, вас не замечают. А здесь вы станете прямо звездой в нашей самой прогрессивной компании!».<br />
<br />
Далее Таня дала понять, что это еще не все. Нужно будет еще написать свою точную дату и время рождения для построения личной карты совместимости на основании гороскопа и физиогномического портрета, которую их компания давно использует как передовую технологию оценки потенциала персонала. Потом пройти IQ-тест, написать небольшой текст на тему «Почему вам понравилась наша компания» и в завершение — собеседование с директором. Назвав его по имени отчеству — Валентин Петрович, — она двузначно кивнула, то ли побаиваясь, то ли сильно уважая.<br />
<br />
Кандидат, особо не парясь, выполнил все, как просила Таня, и отправился в кабинет к директору. Он тоже был не огурчик, но в отличие от своих подчиненных, он успел утром выпить не только кофе, чтобы голова лучше варила. В углу комнаты красовался мини-бар, а в центре стоял огромный стол. Сидеть полагалось как можно дальше, чтобы когда кандидат хотел что-то сказать — делал это прилагая максимум усилий.<br />
<br />
Первым делом директор пытался выяснить, насколько кандидат осведомлен о рынке зарплат. Спрашивал: «И на что ты столько денег тратить будешь? У тебя что, жена есть и дети? Ты же понимаешь, что это очень много?».<br />
<br />
Кандидат, пожав плечами, ответил: «Ну, я на DOU читал».<br />
— Врут все на DOU, — однозначно ответил Валентин Петрович. — Да, Танюша?<br />
— Да-да, Валентин Петрович, — кивнула Таня, чуть не выронив какие-то бумаги.<br />
— Но мы в лидерах рынка, и наша компания может позволить такую зарплату тебе платить. Но ты же понимаешь, какое доверие тебе оказано? О том, что ты будешь получать больше всех в отделе, ты не должен никому рассказывать. Это будет наш маленький секретик.<br />
— И ты должен вкладываться в работу соответствующе, — продолжал Валентин Петрович. — Согласна, Танюш?<br />
— Да-да, Валентин Петрович, — на автомате кивнула Таня.<br />
После десяти минут вакханалии и восхваления компании Петрович таки отпустил кандидата восвояси, а Танюшу попросил остаться.<br />
Последнее, что услышал кандидат, было: «Мы вам обязательно перезвоним! До связи».<br />
<br />
После собеседования HR-департамент просто испарился. Ни письма с результатами, ни звонка. Попытки писать в корпоративный скайп или почту не увенчались успехом. После двух недель ожидания кандидат решился прийти к ним в офис лично, но в скайп пришло сообщение: «Извините, наш HR заболел, я вместо него. По вашему вопросу пока нет ответа от клиента, ждем».<br />
<br />
Этот небольшой эпизод показывает, как безответственное отношение к интервью может не только не позволить выбрать наиболее подходящего человека, а еще и испортить репутацию компании. Люди достаточно тесно общаются, и такие вещи просачиваются во вне очень быстро.Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-83571729699193758052018-03-27T17:41:00.001+03:002022-04-01T02:43:37.377+03:00МусорМастер Якао изучал программу, написанную попередниками. На мониторе очень большие фрагменты кода светились серым цветом. Они были закомментированны.<br />
<br />
Настоятель объяснил, что неактивный код был ненужен, но он приказал оставить его: если однажды понадобится восстановить логику, код можно будет просто раскомментировать, а не переписывать с самого начала.<br />
<br />
«Это можно понять» — кивнул мастер.<br />
<br />
На следующее утро монахи, пришедшие на встречу, были обеспокоены, что не могут нигде найти настоятеля.<br />
Мастер указал им вверх, на стропила, где висело тело настоятеля.<br />
<br />
«Услуги вашего настоятеля больше не требуются» — сказал мастер — «Но оставьте его тело разлагаться над вами. В конце концов, однажды его методы могут снова потребоваться, и было бы расточительно обучать нового с нуля»<br />
<br />
В своем отчете мастер отметил быстрое изменение методов работы клана. Он приписывал это хорошему примеру покойного настоятеля и писал «Нам следует рассмотреть возможность его восстановления в должности»Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-73523809719280974022018-03-19T10:50:00.000+02:002018-03-19T10:50:10.385+02:00Writing universal PHP Extension for different version (PHP5 && PHP7)After 7.x version ZEND changed Zend_API for PHP extentions.<br />
For making universal extension, you can use the next structure:<br />
<br />
<blockquote class="tr_bq">
<span style="color: #38761d;">#if</span> <span style="color: #b45f06;">ZEND_MODULE_API_NO</span> >= <span style="color: #0b5394;">20151012</span><br /><span style="color: #cccccc;">// ...</span><br /><span style="color: #38761d;">#endif</span></blockquote>
<br />
The following table lists PHP versions within Zend products with their internal API versions and Zend products versions.<br />
<br />
<table border="2" cellpadding="3">
<tbody>
<tr>
<td><strong>PHP Version</strong></td>
<td><strong>PHP Extension</strong></td>
<td><strong>Zend Extension</strong></td>
<td><strong>Zend Server</strong></td>
<td><strong>Zend Guard</strong></td>
<td><strong>Zend Encoder ID</strong></td>
</tr>
<tr>
<td>PHP 5.2 (<strong>EOL</strong>)</td>
<td>20060613</td>
<td>220060519</td>
<td>5.6 (<strong>LTS</strong>, <strong>EOL</strong>)</td>
<td>5.5</td>
<td>3</td>
</tr>
<tr>
<td>PHP 5.3</td>
<td>20090626</td>
<td>220090626</td>
<td>6.3 (<strong>LTS</strong>)</td>
<td>6</td>
<td>4</td>
</tr>
<tr>
<td>PHP 5.4</td>
<td>20100525</td>
<td>220100525</td>
<td>7 (<strong>LTS</strong>)</td>
<td>6</td>
<td>5</td>
</tr>
<tr>
<td>PHP 5.5</td>
<td>20121212</td>
<td>220121212</td>
<td>8</td>
<td>7</td>
<td>6</td>
</tr>
<tr>
<td>PHP 5.6</td>
<td>20131226</td>
<td>220131226</td>
<td>8 (<strong>LTS</strong>)</td>
<td>7</td>
<td>7</td>
</tr>
<tr>
<td>PHP 7.0</td>
<td>20151012</td>
<td>320151012</td>
<td>9 (<strong>EA</strong>)</td>
<td>N/A</td>
<td>N/A</td>
</tr>
</tbody>
</table>
<br />
<div class="article-body" style="box-sizing: border-box; line-height: 1.7; word-wrap: break-word;">
<h3>
<i>Notes</i></h3>
<b>LTS</b> stands for "Long Term Support", which means that within a specific Zend Server version, one PHP version will be maintained with stability and security fixes by Zend beyond the timeframe defined by PHP community. You might also find out that specific PHP versions appears in multiple Zend Server versions, but only one <b>LTS PHP</b> version exists in every Zend Server version, and appears below as such.<br /></div>
<div class="article-body" style="box-sizing: border-box; line-height: 1.7; word-wrap: break-word;">
<b>EA</b> stands for Early Access.<br /></div>
<div class="article-body" style="box-sizing: border-box; line-height: 1.7; word-wrap: break-word;">
<b>EOL</b> stands for End of Life project status.<br /><br /><b>Zend (Guard) Encoder / Loader ID</b> is an embedded number within each encoded PHP file, identifying PHP version according to the above table. When encoding PHP scripts using Zend Guard, the runtime PHP must be the same version as encoded version, otherwise you get an incompatible file format error instead of script execution.<br /><br /><h3>
<b>PHP for Windows</b></h3>
PHP is built by Zend labs as Non-Thread-Safe (<b>NTS</b>), with these Visual Studio versions:<br />PHP 5.3+5.4: VC9, VS 2008 SP1<br />PHP 5.5+5.6: VC11, VS 2012<br />PHP 7: VC14, VS 2015</div>
<div class="article-attachments" style="-webkit-text-stroke-width: 0px; background-color: white; box-sizing: border-box; color: #3b3b3b; font-family: Helvetica, Arial, sans-serif; font-size: 13px; font-style: normal; font-variant-caps: normal; font-variant-ligatures: normal; font-weight: 100; letter-spacing: normal; orphans: 2; text-align: start; text-decoration-color: initial; text-decoration-style: initial; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<ul class="attachments" style="box-sizing: border-box; list-style: none; margin: 0px; padding: 0px;"></ul>
</div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-2596508442939472692018-03-12T19:52:00.001+02:002018-03-12T19:52:20.536+02:00How to export LD_LIBRARY_PATH to all users and system services<div style="border: 0px; box-sizing: inherit; clear: both; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; padding: 0px; vertical-align: baseline;">
You can add every path in the file in <code><span style="color: #242729; font-family: Consolas, Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace, sans-serif;"><span style="background-color: #eff0f1; border-color: initial; border-image: initial; border-style: initial; box-sizing: inherit; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; padding: 1px 5px; white-space: pre-wrap;">/etc/ld.so.conf.d</span></span></code> then run :</div>
<pre style="border: 0px; box-sizing: inherit; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; vertical-align: baseline; width: auto; word-wrap: normal;"><code style="background-color: #eff0f1; border: 0px; box-sizing: inherit; color: #242729; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; font-stretch: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; line-height: inherit; margin: 0px; padding: 0px; vertical-align: baseline; white-space: inherit;">ldconfig -v </code><span style="border-color: initial; border-image: initial; border-style: initial; box-sizing: inherit; font-stretch: inherit; font-variant-east-asian: inherit; font-variant-numeric: inherit; line-height: inherit;">
</span></pre>
Then load them.Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-1375669561362665752017-04-21T11:10:00.000+03:002017-04-21T11:13:34.699+03:00Enabling the ”Keyboard Layout” indicator with country flags for Mint MateAt first you will need png images for the flags . Download the flags for your layouts.<br />
Open gimp and rescale them to 26x10 (width x height). Rename them to your layout language<br />
like for US layout rename the image as "us.png", for Russian rename to ru.png and etc.<br />
Then put them in ~/.icons/flags.<br />
After that install dconf-editor (if not installed). Open dconf-editor and go to<br />
org/mate/desktop/peripherals/keyboard/indicator and check the "show-flags" option.Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-65943646382583045212016-12-09T20:59:00.001+02:002016-12-09T21:00:56.849+02:00Swift: programmatically switch ViewControllerTo switch between ViewController in Swift, you can use the following code:<br />
<blockquote class="tr_bq" style="overflow: scroll;">
<pre><span style="color: purple;">@IBAction func</span> nextButtonTapped(sender: <span style="color: #3d85c6;">AnyObject</span>) {
<span style="color: purple;">var</span> nextView: TheNextViewController <span style="color: purple;">=</span> <span style="color: orange;">self</span>.storyboard<span style="color: purple;">?</span>.<span style="color: #3d85c6;">instantiateViewControllerWithIdentifier</span>(<span style="color: blue;">"TheNextViewController"</span>) <span style="color: purple;">as!</span> TheNextViewController
<span style="color: purple;">let</span> appdelegate <span style="color: purple;">=</span> UIApplication.<span style="color: #3d85c6;">sharedApplication</span>().delegate <span style="color: purple;">as!</span> AppDelegate
appdelegate.window<span style="color: purple;">!</span>.rootViewController <span style="color: purple;">=</span> nextView
}
</pre>
</blockquote>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-89342344172688011902016-12-09T20:19:00.001+02:002016-12-09T20:19:59.534+02:00macOS Sierra: Use Caps Lock to switch input sources in OS X 10.12My previous article <a href="http://www.sundrop.info/2015/09/select-input-language-by-caps-lock-in.html">"Howto switch language by Caps Lock"</a> don't works on macOS Sierra (OS X 10.12).<br />
So, for fix it, please, go and install <a href="https://github.com/tekezo/Karabiner-Elements">Karabiner-Elements</a> and after you'll have the same feature like in previous articleВячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-12509284562332547762016-06-09T18:22:00.000+03:002016-10-06T19:01:09.583+03:00Switch between PHP versions on the same machine - Переключение между версиями РНР на одном компьютере<h2>
Переключение между версиями PHP на одной машине</h2>
Возникла задача:<br />
<br />
<ol>
<li>Иметь версию php без расширения gettext (Если ставить из пакетов, то оно уже предустановлено и выпиливается с трудом)</li>
<li>Иметь возможность быстро переключаться между версиями php на своей машине (сейчас происходит фаза активного перехода с 5.6 на 7.x)</li>
</ol>
<div>
Сходу было найдено решение: <a href="https://github.com/phpbrew/phpbrew">phpbrew</a>. Тут сейчас опишу те подводные камни, на которые наплыл.</div>
<br />
<h3>
Как установить phpbrew</h3>
<div>
<blockquote class="tr_bq">
<b>curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew<br />chmod +x phpbrew</b></blockquote>
</div>
<h3>
Как работает phpbrew</h3>
<div>
В home dir создается папка .phpbrew. Внутри нее в подпапке php будут все наши версии php с установленными зависимостями</div>
<h3>
Установка новой версии php</h3>
<blockquote class="tr_bq">
<b>phpbrew install x.y.z</b></blockquote>
Возвращаясь к моей проблеме №1 - отключение расширения gettext, я делал установку следующим образом<br />
<blockquote class="tr_bq">
<b>phpbrew install x.y.z -gettext</b></blockquote>
<h3>
Переключение между версиями php</h3>
<blockquote class="tr_bq">
<b>phpbrew switch 5.4.18</b></blockquote>
<h3>
Возможные проблемы при установке</h3>
<div>
<div>
У меня при сборке появилась следующая проблема</div>
<blockquote class="tr_bq">
<b>checking for BZip2 support... yes<br />checking for BZip2 in default path... not found<br />configure: error: Please reinstall the BZip2 distribution<br />*** There was an error while trying to configure php. Check the custom/suphp/configure.php5 file</b></blockquote>
</div>
<div>
Суть проблемы в том, что пакет BZip2 установлен, а вот dev версия пакета - нет.</div>
<div>
Решается следующим образом:</div>
<blockquote class="tr_bq">
<b>yum install bzip2-devel</b></blockquote>
или<br />
<blockquote class="tr_bq">
<b>apt-get install libbz2-dev</b></blockquote>
Аналогичная проблема была с readline<br />
Более универсальное решение в моем случае<br />
<blockquote class="tr_bq">
<b>apt-cache search libreadline</b></blockquote>
и ставим нужный пакет.<br />
<h3>
Установка расширение php</h3>
<blockquote class="tr_bq">
<b>phpbrew ext install xdebug</b></blockquote>
Не забудьте предварительно переключится на нужную версию php<br />
<br />
You can also install extension via PECL and enable it manually:<br />
<blockquote class="tr_bq">
<b>pecl install mongo<br />phpbrew ext enable mongo</b></blockquote>
В моем случае при установке расширения oci8 возникли следующие проблемы:<br />
<br />
<ol>
<li>Нужно было отследить совместимость версии php и pecl расширения и ставить только нужную версию</li>
<li>phpbrew не хотел включать (enable) расширение. Решилось путем создания oci8.ini руками и написание внутри "extension=oci8.so"</li>
</ol>
<div>
Установка php-7.0 zts:</div>
<div>
<b>> phpbrew install --name php-7.0-zts 7.0 +default -gettext +apxs2=/usr/bin/apxs2 +openssl +mcrypt +zts</b></div>
<div>
<b><br /></b></div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-5958913655973307872016-05-30T12:14:00.002+03:002016-05-30T12:14:14.505+03:00Howto disable hard terminal CTRL+ALT+Fn (for Intelli Ctrl+Alt+F7)Кто работал с продуктами Intelli знает, что там задействованы такие сочетания клавиш Ctrl+Alt+Fn<br />
<br />
Но у Linux системах именно это сочетание клавиш отводится под hard-терминалы.<br />
<br />
Чтобы их отключить нужно добавить следующие строчки в <span style="background-color: #eff0f1; color: #242729; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; line-height: 16.9px; white-space: pre-wrap;">/etc/X11/xorg.conf</span><br />
<span style="background-color: #eff0f1; color: #242729; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; line-height: 16.9px; white-space: pre-wrap;"><br /></span>
<pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">Section "ServerFlags"
Option "DontVTSwitch" "on"
EndSection</code></pre>
<pre style="background-color: #eff0f1; border: 0px; color: #242729; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; font-size: 13px; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;"><pre style="border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; margin-bottom: 1em; max-height: 600px; overflow: auto; padding: 5px; width: auto; word-wrap: normal;"><code style="border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; margin: 0px; padding: 0px; white-space: inherit;">Section "InputClass"
Identifier "keyboard defaults"
MatchIsKeyboard "on"
Option "XKbOptions" "srvrkeys:none"
EndSection</code></pre>
</code></pre>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-12587606122577230992016-02-05T00:54:00.000+02:002016-02-05T00:55:11.628+02:00How To Use SSHFS to Mount Remote File Systems Over SSH - Как замаунтить ssh диск<h2>
1. Make authorized_keys with remote server</h2>
<div>
<ul>
<li>for generate key use <span style="background-color: white; font-family: "verdana" , sans-serif; font-size: 14px; line-height: 22.4px;"><b>ssh-keygen</b></span></li>
<li><span style="font-family: "verdana" , sans-serif;"><span style="background-color: white; font-size: 14px; line-height: 22.4px;">for change password use </span></span><span style="background-color: white; border: 0px; font-family: "verdana" , sans-serif; font-size: 14px; font-weight: 700; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">ssh-keygen -p</span></li>
</ul>
<span style="font-family: "verdana" , sans-serif;"><span style="font-size: 14px; line-height: 22.4px;">It's made such files:</span></span></div>
<div>
<span style="background-color: white; border: 0px; font-family: "verdana" , sans-serif; font-size: 14px; font-weight: 700; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">~/.ssh/id_rsa.pub </span><span style="background-color: white; border: 0px; font-family: "verdana" , sans-serif; font-size: 14px; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">- opened key</span></div>
<div>
<span style="background-color: white; border: 0px; font-family: "verdana" , sans-serif; font-size: 14px; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="border: 0px; font-weight: 700; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">~/.ssh/id_rsa</span><span style="border: 0px; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"> - private key</span></span></div>
<div>
<span style="background-color: white; border: 0px; font-family: "verdana" , sans-serif; font-size: 14px; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;"><span style="border: 0px; line-height: 22.4px; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;">After that copy key into remote server: </span></span><span style="background-color: white; font-family: "verdana" , sans-serif; font-size: 14px; font-weight: 700; line-height: 22.4px;">ssh-copy-id user@server</span></div>
<h2>
2. Installing SSHFS</h2>
<div>
<pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.0470588); border-radius: 3px; box-sizing: border-box; font-family: monospace, monospace; font-size: 14px; margin-bottom: 28px; margin-left: auto; margin-right: auto; overflow: auto !important; padding: 13px 17px; width: 745px; word-wrap: normal;"><code langs="" style="background-color: transparent; border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; line-height: 22px; margin: 0px; padding: 0px;">sudo apt-get install sshfs</code></pre>
</div>
<div>
<h2>
3. Mounting the Remote File System</h2>
</div>
<div>
<pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.0470588); border-radius: 3px; box-sizing: border-box; font-family: monospace, monospace; font-size: 14px; margin-bottom: 28px; margin-left: auto; margin-right: auto; overflow: auto !important; padding: 13px 17px; width: 745px; word-wrap: normal;"><code langs="" style="background-color: transparent; border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; line-height: 22px; margin: 0px; padding: 0px;">sudo mkdir /mnt/droplet <--replace code="" droplet="" prefer="" whatever="" you=""><!----replace--><!----replace--></--replace></code></pre>
<pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.0470588); border-radius: 3px; box-sizing: border-box; font-family: monospace, monospace; font-size: 14px; margin-bottom: 28px; margin-left: auto; margin-right: auto; overflow: auto !important; padding: 13px 17px; width: 745px; word-wrap: normal;"><code langs="" style="background-color: transparent; border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; line-height: 22px; margin: 0px; padding: 0px;">sudo sshfs root@xxx.xxx.xxx.xxx:/ /mnt/drople</code></pre>
</div>
<div>
<pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.0470588); border-radius: 3px; box-sizing: border-box; font-family: monospace, monospace; font-size: 14px; margin-bottom: 28px; margin-left: auto; margin-right: auto; overflow: auto !important; padding: 13px 17px; width: 745px; word-wrap: normal;"><code langs="" style="background-color: transparent; border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; line-height: 22px; margin: 0px; padding: 0px;">sudo sshfs -o IdentityFile=~/.ssh/id_rsa root@xxx.xxx.xxx.xxx:/ /mnt/droplet</code></pre>
</div>
<div>
<h2>
4. For permanent connection add following record to /etc/fstab</h2>
</div>
<div>
<pre class="code-pre " style="background-color: rgba(0, 0, 0, 0.0470588); border-radius: 3px; box-sizing: border-box; font-family: monospace, monospace; font-size: 14px; margin-bottom: 28px; margin-left: auto; margin-right: auto; overflow: auto; padding: 13px 17px; width: 745px; word-wrap: normal;"><code langs="" style="background-color: transparent; border-radius: 2px; box-sizing: border-box; color: #333333; font-family: monospace, monospace; line-height: 22px; margin: 0px; padding: 0px;">USERNAME@HOSTNAME_OR_IP:/REMOTE/DIRECTORY /LOCAL/MOUNTPOINT fuse.sshfs _netdev,user,idmap=user,transform_symlinks,identityfile=/home/USERNAME/.ssh/id_rsa,allow_other,default_permissions,uid=USER_ID_N,gid=USER_GID_N 0 0</code></pre>
</div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-90164320621756189032016-02-04T23:19:00.000+02:002016-02-04T23:19:07.337+02:00How to find the mysql data directory from command line<p>You can issue the following query from the command line:</p>
<pre class="lang-sql prettyprint prettyprinted"><code><span class="pln">mysql </span><span class="pun">-</span><span class="pln">uUSER </span><span class="pun">-</span><span class="pln">p </span><span class="pun">-</span><span class="pln">e </span><span class="str">'SHOW VARIABLES WHERE Variable_Name LIKE "%dir"'</span></code></pre>
<p>Output (on Linux):</p>
<pre class="lang-sql prettyprint prettyprinted"><code><span class="pun">+</span><span class="com">---------------------------+----------------------------+</span>
<span class="pun">|</span><span class="pln"> Variable_name </span><span class="pun">|</span><span class="pln"> Value </span><span class="pun">|</span>
<span class="pun">+</span><span class="com">---------------------------+----------------------------+</span>
<span class="pun">|</span><span class="pln"> basedir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">usr </span><span class="pun">|</span>
<span class="pun">|</span><span class="pln"> character_sets_dir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">mysql</span><span class="pun">/</span><span class="pln">charsets</span><span class="pun">/</span> <span class="pun">|</span>
<span class="pun">|</span><span class="pln"> datadir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">var</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">mysql</span><span class="pun">/</span> <span class="pun">|</span>
<span class="pun">|</span><span class="pln"> innodb_data_home_dir </span><span class="pun">|</span> <span class="pun">|</span>
<span class="pun">|</span><span class="pln"> innodb_log_group_home_dir </span><span class="pun">|</span> <span class="pun">./</span> <span class="pun">|</span>
<span class="pun">|</span><span class="pln"> lc_messages_dir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">mysql</span><span class="pun">/</span> <span class="pun">|</span>
<span class="pun">|</span><span class="pln"> plugin_dir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">lib</span><span class="pun">/</span><span class="pln">mysql</span><span class="pun">/</span><span class="pln">plugin</span><span class="pun">/</span> <span class="pun">|</span>
<span class="pun">|</span><span class="pln"> slave_load_tmpdir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">tmp </span><span class="pun">|</span>
<span class="pun">|</span><span class="pln"> tmpdir </span><span class="pun">|</span> <span class="pun">/</span><span class="pln">tmp </span><span class="pun">|</span>
<span class="pun">+</span><span class="com">---------------------------+----------------------------+</span></code></pre>
<p>Or if you want only the data dir use:</p>
<pre class="lang-sql prettyprint prettyprinted"><code><span class="pln">mysql </span><span class="pun">-</span><span class="pln">uUSER </span><span class="pun">-</span><span class="pln">p </span><span class="pun">-</span><span class="pln">e </span><span class="str">'SHOW VARIABLES WHERE Variable_Name = "datadir"'</span></code></pre>
<p> </p>Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-34230466271333121442016-02-02T11:37:00.002+02:002016-02-02T11:37:34.692+02:00Sublime doesn't keep documents between sessionFrom time to time I've got the same problem, when install new instance of Sublime on a new environment: I had run it as sudo on first time and after that Sublime forgot opened document.
It's happened 'couse the config files for Sublime are created with root permissions. For fix it just run:
<blockquote>sudo chown -R <user>:<group> ~/.config/sublime-text-X</blockquote>Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-34060193985501034192016-01-06T15:49:00.003+02:002016-02-22T12:28:00.144+02:00How to switch window controls to the left in Gnome-2 (Centos-6)# gconftool-2 --type string --set /apps/metacity/general/button_layout "close,minimize,maximize:menu"Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-85500853000690797842015-09-03T23:54:00.001+03:002015-09-03T23:54:07.907+03:00Select input language by Caps Lock in Mac OS X<div class="entry-content" style="background: rgb(255, 255, 255); border: 0px; clear: both; color: #333333; font-family: Georgia, 'Bitstream Charter', serif; font-size: 16px; line-height: 24px; margin: 0px; padding: 12px 0px 0px; vertical-align: baseline;">
<div style="background: transparent; border: 0px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;">
I found a new way to bind <strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">input language (input source) switch to the Caps Lock key in Mac OS X</strong>. The main advantage of this method is absense of lag, so input source changes almost instantly when you hit the Caps Lock key. You will admire this if you’re a fast typer.<span id="more-593" style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"></span></div>
<div style="background: transparent; border: 0px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;">
The logic is simple: first, I map the F19 key to input source selection. Then, using <a href="https://pqrs.org/osx/karabiner/seil.html.en" style="background: transparent; border: 0px; color: #0066cc; margin: 0px; padding: 0px; vertical-align: baseline;">Seil (previously called PCKeyboardHack)</a>, I remap the Caps Lock key to F19. This works regardless of your keyboard having the F19 key. You can also keep the default combination (Cmd+Space) if you wish.</div>
<div style="background: transparent; border: 0px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;">
Cons:</div>
<ol style="background: transparent; border: 0px; margin: 0px 0px 24px 1.5em; padding: 0px; vertical-align: baseline;">
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">You will not be able to use the Caps Lock mode anymore.</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">The green light on the actual key will not change as you change the input source.</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">You will have to remove any software incompatible with Seil.</li>
</ol>
<div style="background: transparent; border: 0px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;">
If this method doesn’t work for you, you will be able to revert all changes at any point.</div>
<h3 style="background: transparent; border: 0px; clear: both; color: black; line-height: 1.5em; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline;">
Step-by-step guide</h3>
<ol style="background: transparent; border: 0px; margin: 0px 0px 24px 1.5em; padding: 0px; vertical-align: baseline;">
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Download, install and launch <a href="https://pqrs.org/osx/karabiner/seil.html.en" style="background: transparent; border: 0px; color: #0066cc; margin: 0px; padding: 0px; vertical-align: baseline;">Seil</a>. By default it goes to “Applications” folder. You’re too lazy to look for it there, find it using Spotlight.</li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">In Seil, tick “Change Caps Lock” and in the “keycode” column change 51 to 80:<br /><img alt="Change Caps Lock Keycode" class="aligncenter" height="151" src="http://dae.me/wp-content/uploads/change-caps-lock-keycode-en.png" style="background: transparent; border: 0px; clear: both; display: block; margin: 0px auto 12px; padding: 0px; vertical-align: baseline;" width="452" /></li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Open System Preferences, go to “Keyboard” → click the “Modifier Keys…” button and for the Caps Lock key choose “No action”.<br /><img alt="Caps Lock No Action" class="aligncenter" height="229" src="http://dae.me/wp-content/uploads/caps-lock-no-action-en.png" style="background: transparent; border: 0px; clear: both; display: block; margin: 0px auto 12px; padding: 0px; vertical-align: baseline;" width="323" /></li>
<li style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Switch to “Keyboard Shortcuts” tab in the same window, select “Input Sources” and find “Select the previous input source” (or “next source”, does not matter). Double click the shortcut to change it. Hit Caps Lock. Here is how it should look like eventually:<br /><img alt="Bind Change Layout To F19" class="aligncenter" height="245" src="http://dae.me/wp-content/uploads/bind-change-layout-to-f19-en.png" style="background: transparent; border: 0px; clear: both; display: block; margin: 0px auto 12px; padding: 0px; vertical-align: baseline;" width="481" /></li>
</ol>
<div style="background: transparent; border: 0px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;">
<strong style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">Done!</strong></div>
<h3 style="background: transparent; border: 0px; clear: both; color: black; line-height: 1.5em; margin: 0px 0px 20px; padding: 0px; vertical-align: baseline;">
For advanced users</h3>
<div style="background: transparent; border: 0px; margin-bottom: 24px; padding: 0px; vertical-align: baseline;">
You may use any other key in the range F13—F18 instead of F19. To do this, in the second step substitute 80 with a different keycode according to the following table:</div>
<table style="background: transparent; border-collapse: collapse; border-spacing: 0px; border: 1px solid rgb(231, 231, 231); margin: 0px -1px 24px 0px; padding: 0px; vertical-align: baseline; width: 639px;"><tbody style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;">
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><th style="background: transparent; border: 0px; color: #777777; font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 12px; line-height: 18px; margin: 0px; padding: 9px 24px; vertical-align: baseline;">Key</th><th style="background: transparent; border: 0px; color: #777777; font-family: 'Helvetica Neue', Arial, Helvetica, 'Nimbus Sans L', sans-serif; font-size: 12px; line-height: 18px; margin: 0px; padding: 9px 24px; vertical-align: baseline;">Keycode</th></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F13</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">105</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F14</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">107</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F15</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">113</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F16</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">106</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F17</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">64</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F18</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">79</td></tr>
<tr style="background: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;"><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">F19</td><td style="background: transparent; border-top-color: rgb(231, 231, 231); border-top-style: solid; border-width: 1px 0px 0px; margin: 0px; padding: 6px 24px; vertical-align: baseline;">80<br /></td></tr>
</tbody></table>
</div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-89804741006248370972015-08-27T16:30:00.002+03:002015-08-27T16:30:55.639+03:00Бортовой журнал разработчика<div>
Многие вещи в жизни осознаешь уже спустя годы. В какой-то момент понимаешь, что и родители были в чем-то правы, и друзья давали не такие уж идиотские советы, да и «катастрофические решения», которые принимал, иногда оказывались чертовски верными. Оглядываясь назад, понимаешь, что попроси тебя кто повторить этот путь — ничего бы не вышло. В том числе и об этом говорил Стив Джобc в своей знаменитой речи о «<a href="http://www.adme.ru/tvorchestvo-reklama/3-istorii-stiva-dzhobsa-3554/" style="border: 0px; color: #9c30b6; cursor: pointer; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;" target="_blank">соединении точек</a>». Вероятно, без тысячи случайностей и нескольких серьезных решений в жизни Стива не видать нам ни айфонов, ни макбуков, ни айпадов.</div>
<div>
Не все истории заканчиваются счастливо. У каждого наверняка найдется пару жизненных моментов, которые он бы исправил, прожил бы по-другому — если б появился шанс. Со временем многое забывается — уже не вспомнить про периоды сомнений, отчаяния и страха, как тебе начинает казаться, что ты всегда был таким и что не мог принять иных решений.</div>
<div>
Тем и ценна память, что позволяет рефлексировать. Беда лишь в том, что и она со временем претерпевает изменения — одни воспоминания уходят, другие появляются. Вот почему полезно вести дневник, иногда записывая свои мысли и состояния — эдакий бортовой журнал капитана — чтоб потом иметь возможность сверить курс.</div>
<h1>Из бортового журнала разработчика:</h1>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">1. Иногда достаточно лишь не опускать рук.</strong> Как <a href="https://www.youtube.com/watch?v=nuHfVn_cfHU" style="border: 0px; color: #9c30b6; cursor: pointer; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;" target="_blank">говорил</a> Шайа Лабаф — «Если ты устал начинать сначала, перестань сдаваться». С кривой обучения человек сталкивается практически в любой области новых знаний, и программирование — не исключение. Потом усвоенное будет казаться чем-то самим собой разумеющимся, но не всё сразу. Сначала придется пройти через период сомнений, страхов, ощущения себя круглым идиотом и даже бездарью. Протяженность этого времени у каждого своя, но его важно пережить, чтоб не оказалось, что ты бросил дело на полпути без серьезных на то оснований. Для этого полезно обозначать для себя контрольные точки в духе «Несмотря ни на что я продержусь ещё минимум полгода, а там будет видно».</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">2. Плато.</strong> Это будет следующий неизбежный отрезок на кривой обучения. Когда ты на плато, то прогресс не ощущается даже при регулярных занятиях. Напоминает блуждания в густом тумане, когда неясно, сколько ты прошел. Здесь снова выручат метрики, нужно лишь взять диапазон пошире — не недели, а месяцы. Если навыки сегодня круче, чем N месяцев назад, значит, прогресс есть. Учеба, как и многие другие процессы в нашей жизни, нелинейна, поэтому лучше сразу распрощаться с иллюзиями, что затратив время T, ты обязательно получишь конкретный результат X. Вспомните, как по несколько часов из-за невнимательности не могли найти лишнюю запятую или пробел. Или сколько времени вам потребовалось, чтобы понять и принять ООП; и как странно видеть человека, которому вроде и объяснишь на пальцах — а он всё равно продолжает плавать?</div>
<div>
<img src="http://s.developers.org.ua/storage-files/platueau.jpg" style="background: 0px 50%; border: 0px; display: block; margin: 0px; max-width: 100%; outline: 0px; padding: 0px; vertical-align: top;" /></div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">3. Страх перед неизведанным.</strong> Он будет всегда (разве что заблаговременно тяпнуть стопочку коньяку): первый коммит, первый откат, первый упущенный дедлайн и деплоймент на продакшн — такие вещи редко проходят без потеющих ладоней и учащенного сердцебиения. Бояться, когда не уверен — это нормально и говорит хотя бы о том, что вам не всё равно. Страх не нужно побеждать, с ним лучше заключить союз. Делая то, чего боишься, получаешь для себя больший результат, чем занимаясь привычными вещами. Но для команды такой подход почти наверняка аукнется выгребанием твоих ошибок.</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">4. Много работать — не значит хорошо работать.</strong> Как и морщить лоб, цокать языком или ходить взад-вперёд у whiteboard’a. Легко впасть в соблазн почитать себя за героя, если засиделся на работе. Но часы, насиженные пятой точкой — это одно, а работающий код (ещё точнее — результат) — это другое. Кто знает, может, лучше было прийти на работу пораньше, чем уходить последним? Тем более, что даже при одинаковых зарплатах, ценность времени каждого разработчика всё равно различается. Разница в продуктивности может быть<a href="http://programmers.stackexchange.com/questions/179616/a-good-programmer-can-be-as-10x-times-more-productive-than-a-mediocre-one" style="border: 0px; color: #9c30b6; cursor: pointer; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;" target="_blank">более чем десятикратной</a> — когда, например, твой день работы равняется одному часу работы вон того тихого парня в углу, который никогда не вылазит из наушников.</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">5. Не стоит хвастаться, что работаешь больше других.</strong> По этому поводу <a href="https://medium.com/life-learning/work-hard-live-well-ead679cb506d" style="border: 0px; color: #9c30b6; cursor: pointer; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;" target="_blank">высказался</a> сооснователь Facebook Дастин Московиц: «Я часто слышу, как молодые разработчики хвалятся своими <nobr>48-часовыми</nobr> спринтами. Такое отношение к работе не только вредит молодым работникам, которые хотят соответствовать ожиданиям, но и порождает возрастную и половую дискриминацию — ведь не каждый сотрудник способен поддерживать такой рабочий график». При этом дискриминация проходит не только по линии возраста и пола, но и вообще по всему живому в офисе, что уходит домой раньше срока. Волей-неволей, уходя с работы на пару часов позже остальных, ты выставляешь остальных коллег в менее «трудолюбивом» свете, забирая себе их лавры труженников. Никто не любит выскочек с геройским выражением лица.</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">6. Самообман.</strong> В глубине души каждый знает что он сделал, а что — нет, где он постарался на 100%, а где протунеядил. Но это знание скрывается под покровом лжи, сотканной из изощреннейших нитей самообмана. Всегда приятней убедить себя, что ты трудолюб, раз N часов подряд искал баг, чем признать, что сам же его и породил или что найти его можно было и за пять минут. Всегда есть соблазн скорчить умную рожу на собрании, обманув тем самым не только начальство и коллег, но и себя. Не надо. Как говорил Мюнхгаузен, «Умное лицо — это ещё не признак ума. Все глупости на земле делаются именно с этим выражением лица.»</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">7. Ментальное рабство — не повод для гордости.</strong> Многие разработчики бахвальствуют о том, что их мозг работает над задачей и в нерабочее время, выполняя, по сути, двойную работу по восьмичасовому тарифу. Скажите об этом соседу с удочкой, который уставился на поплавок и ни о чем не думает, или своей жене во время выполнения супружеского долга. Как вариант можно прийти в гости к друзьям и вместо участия в разговорах и настольных играх, развернуть ноут и срочно начать работать — потому что вас осенило. Посмотрите на их реакцию (конечно, если у вас друзья не на морозе). Поводом для гордости могла бы быть как раз обратная привычка — на работе думать только о работе, в свободное время — об остальном.</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">8. Здоровье важнее.</strong> Для Facebook <nobr>2006-й</nobr> год был одним из лучших, но для того же Дастина Московица — одним из худших:<br />«Неделю назад я общался с талантливыми студентами из Беркли. Некоторые из них задали мне вопросы о том, что бы я хотел узнать или сделать в своей жизни раньше; о сожалениях, касающихся раннего периода моей карьеры. Снова и снова я прихожу к мысли, что мне следовало жить иначе. Больше спать, регулярно заниматься спортом, следить за тем, что я ем и пью — ведь были времена, когда я потреблял энергетиков и газировки больше, чем воды; Тогда бы у меня было не только меньше панических приступов, но и не было бы серьезных проблем со здоровьем, когда в свои 20 с лишним лет спину от боли хоть на свалку выбрасывай; Думаю, я был бы не только более уравновешенным, но и работал бы эффективнее».</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">9. Являть себя.</strong> Или, как говорил Вуди Аллен, «Являться — это 80% жизни. Иногда проще прятаться дома на диване».<br />Потом он добавил: «По моим наблюдениям, стоило человеку таки закончить пьесу или роман, как он существенно продвигался на пути к её постановке или публикации, в отличие от подавляющего большинства людей, которые говорят мне, что они хотят писать, при этом никогда не пишут ни одной пьесы или книги, и таким образом терпят неудачу на самой первой ступеньке». Являть себя можно как физически — например, посещая работу, вечеринки, мероприятия или тренировки (где само появление в любом случае приводит к результату), так и через свой труд — например, написанием приложений или композиций, созданием продукта или сервиса. Таким образом, сидеть дома и ничего не делать — значит расписаться в собственном отсутствии в мире.</div>
<div>
<strong style="border: 0px; margin: 0px; outline: 0px; padding: 0px; vertical-align: top;">10. Не молчать.</strong> Как говорил мой тренер из ЮАР, который является не только топовым бойцом, но и успешным бизнесменом, «Важно говорить о том, что ты делаешь. Минимум 50% твоего успеха — это то, что ты говоришь о себе и то, что люди думают о тебе». Можно быть сколько угодно продуктивным разработчиком, но если ты всё время молчишь (в письмах ли, в дисскуссиях ли), тебя начинают потихоньку забывать. Ещё и премию твою отдадут какому-нибудь холеному выскочке в костюме с улыбкой на миллион. Можно сколько угодно усердно искать работу, но упустить свой шанс лишь потому, что люди вокруг не в курсе. Это относится и ко многим другим сферам жизни, будь то нужда сплавить котят, сдать квартиру или найти подругу.</div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-79309839647177292072015-08-20T17:42:00.001+03:002015-08-20T17:42:43.104+03:00Howto rename branch in mercurial?<blockquote class="tr_bq">
hg update old_name<br />hg branch new_name<br />hg commit -m "Changing old_name branch to new_name."<br />hg update old_name<br />hg commit --close-branch -m "use new_name instead."<br />hg push --new-branch</blockquote>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-10965449380743723082015-06-09T00:13:00.001+03:002015-06-09T00:13:05.370+03:00How to setup a fake SMTP server to catch all mails?<pre>sudo python -m smtpd -n -c DebuggingServer localhost:25
</pre>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-45828977977583072122015-03-18T17:00:00.000+02:002015-04-09T21:42:18.677+03:00MySQL logging - Логируем запросы к MySQLРано или поздно возникает необходимость логированя запросов, которые попадают на MySQL сервер. Это могут быть как slow query так и все запросы.<br />
<br />
До версии 5.1.12 дожно было запустить mysql с параметром log<br />
<blockquote class="tr_bq">
mysqld --log=log_file_name</blockquote>
или же записать в my.cnf параметр<br />
<blockquote class="tr_bq">
log = log_file_name</blockquote>
Начиная с версии >= 5.1.12 имеем три параметра:<br />
<ul>
<li>--log-output=TABLE,FILE</li>
<li>--general_log</li>
<li>--slow-query-log</li>
</ul>
<div>
Либо же выполнив следующий запросы:</div>
<pre class="mysql" style="font-family: monospace;"><pre class="mysql" style="background: rgb(244, 244, 255); border: 1px solid rgb(153, 153, 153); color: #0f0f0f; font-size: 15px; line-height: 20px; padding: 6px;"><span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #990099; font-weight: bold;">global</span> general_log <span style="color: #cc0099;">=</span> <span style="color: teal;">1</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #990099; font-weight: bold;">global</span> log_output <span style="color: #cc0099;">=</span> <span style="color: green;">'table'</span><span style="color: #000033;">;</span></pre>
</pre>
<span style="color: green;">Table</span> - это таблица в mysql.general_log, имеющая следующую структуру:<br />
<pre class="mysql" style="background: rgb(244, 244, 255); border: 1px solid rgb(153, 153, 153); color: #0f0f0f; font-size: 15px; line-height: 20px; padding: 6px;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: green;">`general<span style="color: teal; font-weight: bold;">_</span>log`</span> <span style="color: magenta;">(</span>
<span style="color: green;">`event<span style="color: teal; font-weight: bold;">_</span>time`</span> <span style="color: #999900; font-weight: bold;">timestamp</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #000099;">CURRENT_TIMESTAMP</span>
<span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #990099; font-weight: bold;">UPDATE</span> <span style="color: #000099;">CURRENT_TIMESTAMP</span><span style="color: #000033;">,</span>
<span style="color: green;">`user<span style="color: teal; font-weight: bold;">_</span>host`</span> <span style="color: #999900; font-weight: bold;">mediumtext</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`thread<span style="color: teal; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: magenta;">(</span><span style="color: teal;">21</span><span style="color: magenta;">)</span> <span style="color: #ff9900; font-weight: bold;">unsigned</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`server<span style="color: teal; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: magenta;">(</span><span style="color: teal;">10</span><span style="color: magenta;">)</span> <span style="color: #ff9900; font-weight: bold;">unsigned</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`command<span style="color: teal; font-weight: bold;">_</span>type`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: magenta;">(</span><span style="color: teal;">64</span><span style="color: magenta;">)</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`argument`</span> <span style="color: #999900; font-weight: bold;">mediumtext</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span>
<span style="color: magenta;">)</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #cc0099;">=</span>CSV <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #ff9900; font-weight: bold;">CHARSET</span><span style="color: #cc0099;">=</span>utf8 <span style="color: #990099; font-weight: bold;">COMMENT</span><span style="color: #cc0099;">=</span><span style="color: green;">'General log'</span></pre>
Для slow-query-log структура будет следующей:<br />
<pre class="mysql" style="font-family: monospace;"><pre class="mysql" style="background: rgb(244, 244, 255); border: 1px solid rgb(153, 153, 153); color: #0f0f0f; font-size: 15px; line-height: 20px; padding: 6px;"><span style="color: #990099; font-weight: bold;">CREATE</span> <span style="color: #990099; font-weight: bold;">TABLE</span> <span style="color: green;">`slow<span style="color: teal; font-weight: bold;">_</span>log`</span> <span style="color: magenta;">(</span>
<span style="color: green;">`start<span style="color: teal; font-weight: bold;">_</span>time`</span> <span style="color: #999900; font-weight: bold;">timestamp</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span> <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #000099;">CURRENT_TIMESTAMP</span>
<span style="color: #990099; font-weight: bold;">ON</span> <span style="color: #990099; font-weight: bold;">UPDATE</span> <span style="color: #000099;">CURRENT_TIMESTAMP</span><span style="color: #000033;">,</span>
<span style="color: green;">`user<span style="color: teal; font-weight: bold;">_</span>host`</span> <span style="color: #999900; font-weight: bold;">mediumtext</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`query<span style="color: teal; font-weight: bold;">_</span>time`</span> <span style="color: #999900; font-weight: bold;">time</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`lock<span style="color: teal; font-weight: bold;">_</span>time`</span> <span style="color: #999900; font-weight: bold;">time</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`rows<span style="color: teal; font-weight: bold;">_</span>sent`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: magenta;">(</span><span style="color: teal;">11</span><span style="color: magenta;">)</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`rows<span style="color: teal; font-weight: bold;">_</span>examined`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: magenta;">(</span><span style="color: teal;">11</span><span style="color: magenta;">)</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`db`</span> <span style="color: #999900; font-weight: bold;">varchar</span><span style="color: magenta;">(</span><span style="color: teal;">512</span><span style="color: magenta;">)</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`last<span style="color: teal; font-weight: bold;">_</span>insert<span style="color: teal; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: magenta;">(</span><span style="color: teal;">11</span><span style="color: magenta;">)</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`insert<span style="color: teal; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: magenta;">(</span><span style="color: teal;">11</span><span style="color: magenta;">)</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`server<span style="color: teal; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">int</span><span style="color: magenta;">(</span><span style="color: teal;">10</span><span style="color: magenta;">)</span> <span style="color: #ff9900; font-weight: bold;">unsigned</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`sql<span style="color: teal; font-weight: bold;">_</span>text`</span> <span style="color: #999900; font-weight: bold;">mediumtext</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span><span style="color: #000033;">,</span>
<span style="color: green;">`thread<span style="color: teal; font-weight: bold;">_</span>id`</span> <span style="color: #999900; font-weight: bold;">bigint</span><span style="color: magenta;">(</span><span style="color: teal;">21</span><span style="color: magenta;">)</span> <span style="color: #ff9900; font-weight: bold;">unsigned</span> <span style="color: #cc0099; font-weight: bold;">NOT</span> <span style="color: #9900ff; font-weight: bold;">NULL</span>
<span style="color: magenta;">)</span> <span style="color: #990099; font-weight: bold;">ENGINE</span><span style="color: #cc0099;">=</span>CSV <span style="color: #990099; font-weight: bold;">DEFAULT</span> <span style="color: #ff9900; font-weight: bold;">CHARSET</span><span style="color: #cc0099;">=</span>utf8 <span style="color: #990099; font-weight: bold;">COMMENT</span><span style="color: #cc0099;">=</span><span style="color: green;">'Slow log'</span></pre>
</pre>
<br />
Если же нужна генерация в файл, то можно выполнить следующие запросы:<br />
<pre class="mysql" style="background: rgb(244, 244, 255); border: 1px solid rgb(153, 153, 153); color: #0f0f0f; font-size: 15px; line-height: 20px; padding: 6px;"><span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #990099; font-weight: bold;">global</span> log_output <span style="color: #cc0099;">=</span> <span style="color: green;">'FILE'</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #990099; font-weight: bold;">global</span> general_log_file<span style="color: #cc0099;">=</span><span style="color: green;">'/home/slava/mysql_queries.log'</span><span style="color: #000033;">;</span>
<span style="color: #990099; font-weight: bold;">SET</span> <span style="color: #990099; font-weight: bold;">global</span> general_log <span style="color: #cc0099;">=</span> <span style="color: teal;">1</span><span style="color: #000033;">;</span></pre>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-63101938477426948912015-03-15T20:11:00.001+02:002015-03-15T20:13:45.466+02:00Блог переезжает на новый домен - blog move to www.sundrop.infoУважаемые читатели!<br />
<br />
В связи с тем что 22-го марта истекает срок регистрации предыдущего домена, а регистрационные данные, увы, принадлежали не мне (будет мне уроком) и способа продлить домен я не нашел (ну не хотят GoDaddy брать деньги с меня) было принято решение переехать просто на новое доменное имя.<br />
<br />
Итого, вместо <a href="http://www.sundrop.name/">www.sundrop.name</a> имеем <a href="http://www.sundrop.info/">www.sundrop.info</a><br />
У меня все!Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-4727353738364936242014-12-11T22:47:00.001+02:002014-12-11T22:48:07.632+02:00Многопоточность в MFC (multithreading)<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Поток – отдельная ветвь выполнения программы. Имеет свой стек и работает независимо от других потоков приложения.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Создание простейшего потока</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">AfxBeginThread(ProcName,param,priority)</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">ProcName – имя функции, которая будет выполнятся в новом потоке</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">param – указатель типа LPVOID или void* на аргумент ProcName</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">priority – константа, определяющая приоритет нового потока по отношению к основному</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Может принимать одно из следующих значений:</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">THREAD_PRIORITY_ABOVE_NORMAL <span style="color: green;">// на один пункт ниже нормального
</span>THREAD_PRIORITY_BELOW_NORMAL <span style="color: green;">//на один пункт выше нормального
</span>THREAD_PRIORITY_HIGHEST <span style="color: green;">//на два пункта выше нормального
</span>THREAD_PRIORITY_IDLE <span style="color: green;">//базовый приоритет равный 1
</span>THREAD_PRIORITY_LOWEST <span style="color: green;">//на два пункта ниже нормального
</span>THREAD_PRIORITY_NORMAL <span style="color: green;">//нормальный приоритет
</span>THREAD_PRIORITY_TIME_CRITICAL <span style="color: green;">//приоритет равный 15</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Приоритет потока определяет, как часто по отношению к другим выполняющимся потокам система будет передавать управление данному потоку</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">UINT ThreadProc<span style="color: blue;">(</span>LPVOID param<span style="color: blue;">) </span><span style="color: green;">//Создание потоковой функции
</span><span style="color: blue;">{
::</span>MessageBox<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">, </span><span style="color: magenta;">”Thread activated”</span><span style="color: blue;">,</span><span style="color: magenta;">”Message from Thread”</span> <span style="color: blue;">,</span>MB_OK<span style="color: blue;">);
</span><span style="color: navy;">return </span><span style="color: blue;">0;
}
</span>SomeFunc<span style="color: blue;">()
{
</span>AfxBeginThread<span style="color: blue;">(</span>ThreadProc<span style="color: blue;">,</span>GetSafeHwnd<span style="color: blue;">()); </span><span style="color: green;">//Запуск потока
</span><span style="color: blue;">}</span></pre>
<b style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Синхронизация работы потоков.</b><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">1. </span><i style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Глобальная переменная</i><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;"><span style="color: navy;">bool </span>bThreadstop<span style="color: blue;">; </span><span style="color: green;">//контрольная переменная
</span>UINT ThreadProc<span style="color: blue;">(</span>LPVOID param<span style="color: blue;">) </span><span style="color: green;">//Создание потоковой функции
</span><span style="color: blue;">{
::</span>MessageBox<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">, </span><span style="color: magenta;">”Thread activated”</span><span style="color: blue;">,</span><span style="color: magenta;">”Message from thread”</span><span style="color: blue;">,</span>MB_OK<span style="color: blue;">);
</span><span style="color: navy;">while</span><span style="color: blue;">(!</span>bThreadstop<span style="color: blue;">)
{
</span><span style="color: green;">//Выполнение опреаций
</span><span style="color: blue;">}
::</span>MessageBox<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">, </span><span style="color: magenta;">”Thread ended”</span><span style="color: blue;">,</span><span style="color: magenta;">”Message from thread”</span><span style="color: blue;">,</span>MB_OK<span style="color: blue;">);
</span><span style="color: navy;">return </span><span style="color: blue;">0;
}
</span>SomeFunc<span style="color: blue;">()
{
</span>bThreadstop<span style="color: blue;">=</span><span style="color: navy;">false</span><span style="color: blue;">;
</span>AfxBeginThread<span style="color: blue;">(</span>ThreadProc<span style="color: blue;">,</span>GetSafeHwnd<span style="color: blue;">()); </span><span style="color: green;">//Запуск потока
</span><span style="color: blue;">}
</span>StopThread<span style="color: blue;">()
{
</span>bThreadstop<span style="color: blue;">=</span><span style="color: navy;">true</span><span style="color: blue;">; </span><span style="color: green;">//остановка потока
</span><span style="color: blue;">} </span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">2. </span><i style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Взаимодействие с помощью сообщений </i><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;"><span style="color: navy;">const </span>WM_THREADENDED <span style="color: blue;">= </span>WM_USER<span style="color: blue;">+1; </span><span style="color: green;">//Это надо добавить в катры сообщений
</span>afx_msg LONG OnThreadEnded<span style="color: blue;">(</span>WPARAM wParam<span style="color: blue;">,</span>LPARAM lParam<span style="color: blue;">);
</span>ON_MESSAGE<span style="color: blue;">(</span>WM_THREADENDDED<span style="color: blue;">,</span>OnThreadEnded<span style="color: blue;">)
</span><span style="color: navy;">bool </span>bThreadstop<span style="color: blue;">; </span><span style="color: green;">//контрольная переменная
</span>UINT ThreadProc<span style="color: blue;">(</span>LPVOID param<span style="color: blue;">) </span><span style="color: green;">//Создание потоковой функции
</span><span style="color: blue;">{
::</span>MessageBox<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">, </span><span style="color: magenta;">”Thread activated”</span><span style="color: blue;">,</span><span style="color: magenta;">”Message from thread”</span><span style="color: blue;">,</span>MB_OK<span style="color: blue;">);
</span><span style="color: navy;">while</span><span style="color: blue;">(!</span>bThreadstop<span style="color: blue;">)
{
</span><span style="color: green;">//Выполнение опреаций
</span><span style="color: blue;">}
::</span>PostMessage<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">,</span>WM_THREADENDED<span style="color: blue;">,(</span>WPARAM<span style="color: blue;">)</span>param<span style="color: blue;">,0); </span><span style="color: green;">//Сообщение
</span><span style="color: navy;">return </span><span style="color: blue;">0;
}
</span>SomeFunc<span style="color: blue;">()
{
</span>bThreadstop<span style="color: blue;">=</span><span style="color: navy;">false</span><span style="color: blue;">;
</span>AfxBeginThread<span style="color: blue;">(</span>ThreadProc<span style="color: blue;">,</span>GetSafeHwnd<span style="color: blue;">()); </span><span style="color: green;">//Запуск потока
</span><span style="color: blue;">}
</span>StopThread<span style="color: blue;">()
{
</span>bThreadstop<span style="color: blue;">=</span><span style="color: navy;">true</span><span style="color: blue;">; </span><span style="color: green;">//остановка потока
</span><span style="color: blue;">}
</span>LONG OnThreadEnded<span style="color: blue;">(</span>WPARAM wParam<span style="color: blue;">, </span>LPARAM lParam<span style="color: blue;">)
{
::</span>MessageBox<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>wParam<span style="color: blue;">,</span><span style="color: magenta;">”Thread Ended”</span><span style="color: blue;">,</span><span style="color: magenta;">”Message from thread”</span><span style="color: blue;">, </span>MB_OK<span style="color: blue;">);
}
</span><span style="color: green;">//Данный пример закрывает главное окно после выполнения потоковой функции</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">3. </span><i style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Взаимодействие с помощью объектов событий</i><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Объект событий CEvent может находится в одном из двух состояний – сигнализирует или молчит. Потоки отслеживают момент, когда объект события начинает сигнализировать, и начинаю выполнение операций.</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">CEvent ThreadStart<span style="color: blue;">; </span><span style="color: green;">//объект автоматически устанавливается в состояние молчания
</span>ThreadStart<span style="color: blue;">.</span>SetEvent<span style="color: blue;">(); </span><span style="color: green;">//установка состояния сигнализации</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Отслеживание состояния объекта осуществляется с помощью функции WinAPI WaitForSingleObject();</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;"><span style="color: blue;">:: </span>WaitForSingleObject<span style="color: blue;">(</span>ThreadStart<span style="color: blue;">.</span>m_hObject<span style="color: blue;">,</span>INFINITE<span style="color: blue;">);</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">- первый параметр – дескриптор отслеживаемого события.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">- второй параметр – время отслеживания. INFINITE – бесконечно.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">В момент установки события WaitForSingleObject() вернет управление потоку.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">В момент сброса события поток должен прекратить свою работу.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Для этого надо организовать постоянный опрос состояния события.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Это можно сделать следующим способом:</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;"><span style="color: blue;">::</span>WaitForSingleObject<span style="color: blue;">(</span>ThreadStart<span style="color: blue;">.</span>m_hObject<span style="color: blue;">,0);</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Время 0 говорит о том, что надо опросить событие.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Если результат вызова этой функции равен WAIT_OBJECT_0, то объект в остоянии сигнализации. В других случаях – молчит.</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">CEvent ThreadStart<span style="color: blue;">; </span><span style="color: green;">//Объект начала работы потока
</span>CEvent ThreadEnd<span style="color: blue;">; </span><span style="color: green;">//Объект окончания работы потока
</span>UINT ThreadProc<span style="color: blue;">(</span>LPVOID param<span style="color: blue;">) </span><span style="color: green;">//Создание потоковой функции
</span><span style="color: blue;">{
:: </span>WaitForSingleObject<span style="color: blue;">(</span>ThreadStart<span style="color: blue;">.</span>m_hObject<span style="color: blue;">,</span>INFINITE<span style="color: blue;">); </span><span style="color: green;">//ожидание запуска потока
</span><span style="color: blue;">::</span>MessageBox<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">, </span><span style="color: magenta;">”Thread activated”</span><span style="color: blue;">,</span><span style="color: magenta;">”Message from thread”</span><span style="color: blue;">,</span>MB_OK<span style="color: blue;">);
</span><span style="color: navy;">bool </span>Running<span style="color: blue;">=</span><span style="color: navy;">true</span><span style="color: blue;">;
</span><span style="color: navy;">int </span>result<span style="color: blue;">;
</span><span style="color: navy;">while</span><span style="color: blue;">(</span>Running<span style="color: blue;">)
{
</span><span style="color: green;">//Выполнение опреаций
</span>result<span style="color: blue;">=:: </span>WaitForSingleObject<span style="color: blue;">(</span>ThreadEnd<span style="color: blue;">.</span>m_hObject<span style="color: blue;">,0); </span><span style="color: green;">//проверка завершения
</span><span style="color: navy;">if</span><span style="color: blue;">(</span>result<span style="color: blue;">==</span>WAIT_OBJECT_0<span style="color: blue;">)
</span>Running<span style="color: blue;">=</span><span style="color: navy;">false</span><span style="color: blue;">;
}
::</span>PostMessage<span style="color: blue;">((</span>HWND<span style="color: blue;">)</span>param<span style="color: blue;">,</span>WM_CLOSE<span style="color: blue;">,0,0); </span><span style="color: green;">//Сообщение
</span><span style="color: navy;">return </span><span style="color: blue;">0;
}
</span>Start<span style="color: blue;">() </span><span style="color: green;">//запуск потока
</span><span style="color: blue;">{
</span>ThreadStart<span style="color: blue;">.</span>SetEvent<span style="color: blue;">();
}
</span>End<span style="color: blue;">() </span><span style="color: green;">//завершение потока
</span><span style="color: blue;">{
</span>ThreadEnd<span style="color: blue;">.</span>SetEvent<span style="color: blue;">();
}</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Поток нужно создавать независимо от состояния событий.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><b style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Синхронизация работы нескольких потоков</b><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Для синхронизации нескольких потоков используют следующие объекты: критические секции, семафоры, защелки. </span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">1. </span><i style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Критические секции.</i><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Критические секции используются для контроля доступа к защищенным данным.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Их можно использовать внутри одного класса для синхронизации чтения-доступа к данным.</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;"><span style="color: navy;">class </span>cls
<span style="color: blue;">{
</span><span style="color: navy;">private</span><span style="color: blue;">:
</span><span style="color: navy;">int </span>val<span style="color: blue;">;
</span>CCriticalSection section<span style="color: blue;">;
</span><span style="color: navy;">public</span><span style="color: blue;">:
</span><span style="color: navy;">void </span>write<span style="color: blue;">(</span><span style="color: navy;">int</span><span style="color: blue;">);
</span><span style="color: navy;">void </span>read<span style="color: blue;">(</span><span style="color: navy;">int</span><span style="color: blue;">*);
}
</span><span style="color: navy;">void </span>cls<span style="color: blue;">::</span>write<span style="color: blue;">(</span><span style="color: navy;">int </span>n<span style="color: blue;">)
{
</span>section<span style="color: blue;">.</span>Lock<span style="color: blue;">();
</span>val<span style="color: blue;">=</span>n<span style="color: blue;">;
</span>section<span style="color: blue;">.</span>Unlock<span style="color: blue;">();
}
</span><span style="color: navy;">void </span>cls<span style="color: blue;">::</span>read<span style="color: blue;">(</span><span style="color: navy;">int </span><span style="color: blue;">* </span>n<span style="color: blue;">)
{
</span>section<span style="color: blue;">.</span>Lock<span style="color: blue;">();
*</span>n<span style="color: blue;">=</span>val<span style="color: blue;">;
</span>section<span style="color: blue;">.</span>Unlock<span style="color: blue;">();
}</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">При вызове метода Lock() происходит блокировка секции, и последующие вызовы этого метода не возвратят управление вызывающему потоку до тех пор, пока секция не будет освобождена.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Из данного примера видно, что при записи нового значения невозможно прочитать старое. Соответственно при чтении значения его невозможно изменить. Если в работе участвуют большие объемы данных, то для предотвращения сбоя необходим контроль. Критические секции обеспечивают минимальную защиту от сбоев.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">2. </span><i style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Защелки(MUTEXes) </i><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Использование защелок CMutex при синхронизации потоков одного приложения не отличается от использования критических секций. Работа с ними осуществляется с использованием следующих объектов: CSingleLock и CMultiLock. Для получения доступа к защелке используется методо Lock(). Для освобождения защелки нужно вызвать метод Unlock()</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">CMutex mutex<span style="color: blue;">; </span><span style="color: green;">//создание защелки
</span>CSingleLock sLock<span style="color: blue;">(&</span>mutex<span style="color: blue;">); </span><span style="color: green;">//захват защелки
</span>sLock<span style="color: blue;">.</span>Lock<span style="color: blue;">();
</span>sLock<span style="color: blue;">.</span>Unlock<span style="color: blue;">(); </span><span style="color: green;">//освобождение защелки
</span><span style="color: navy;">class </span>cls
<span style="color: blue;">{
</span><span style="color: navy;">private</span><span style="color: blue;">:
</span><span style="color: navy;">int </span>val<span style="color: blue;">;
</span>CMutex mutex<span style="color: blue;">;
</span><span style="color: navy;">public</span><span style="color: blue;">:
</span><span style="color: navy;">void </span>write<span style="color: blue;">(</span><span style="color: navy;">int</span><span style="color: blue;">);
</span><span style="color: navy;">void </span>read<span style="color: blue;">(</span><span style="color: navy;">int</span><span style="color: blue;">*);
}
</span><span style="color: navy;">void </span>cls<span style="color: blue;">::</span>write<span style="color: blue;">(</span><span style="color: navy;">int </span>n<span style="color: blue;">)
{
</span>CSingleLock sLock<span style="color: blue;">(&</span>mutex<span style="color: blue;">);
</span>sLock<span style="color: blue;">.</span>Lock<span style="color: blue;">();
</span>val<span style="color: blue;">=</span>n<span style="color: blue;">;
}
</span><span style="color: navy;">void </span>cls<span style="color: blue;">::</span>read<span style="color: blue;">(</span><span style="color: navy;">int </span><span style="color: blue;">* </span>n<span style="color: blue;">)
{
</span>CSingleLock sLock<span style="color: blue;">(&</span>mutex<span style="color: blue;">);
</span>sLock<span style="color: blue;">.</span>Lock<span style="color: blue;">();
*</span>n<span style="color: blue;">=</span>val<span style="color: blue;">;
}</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Использование метода Unlock() в данном случае необязательно т.к. при вызове деструктора sLock защелка автоматически освобождается.</span><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">3. </span><i style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Семафор</i><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><br style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;" /><span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">Использование этого объекта ничем не отличается от использования предыдущих. Разница заключается в том, что семафор дает право на использование контролируемых параметров определенному числу потоков. В семафоре хранится количество объектов, которые в данный момент имеют доступ к данным. </span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">CSemaphore semaphore<span style="color: blue;">(2,2); </span><span style="color: green;">//создание семафора</span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">При создании семафора указывается начальное и максимальное значение счетчика </span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">CSingleLock sLock<span style="color: blue;">(&</span>semaphore<span style="color: blue;">); </span><span style="color: green;">//Захват семафора
</span>sLock<span style="color: blue;">.</span>Lock<span style="color: blue;">(); </span></pre>
<span style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 20px; text-align: justify;">При вызове метода Lock() значение счетчика внутри семафора уменьшается. Когда оно достигнет нуля, метод Lock() будет ждать освобождения семафора. После этого захватит семафор и вернет управление вызывающей функции</span><br />
<pre class="code" style="background-color: #f8f8f8; border: 1pt solid silver; color: #900090; font-family: Courier; font-size: 13px; line-height: 20px; padding: 10pt;">sLock<span style="color: blue;">.</span>Unlock<span style="color: blue;">(); </span><span style="color: green;">//Освобождение семафора</span></pre>
<div>
<span style="color: green;"><br /></span></div>
Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-91032047154034875042014-12-09T15:59:00.000+02:002014-12-09T15:59:51.017+02:00Закон Конвея - Conway's lawИтак, <a href="https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BD%D0%B2%D0%B5%D0%B9,_%D0%94%D0%B6%D0%BE%D0%BD_%D0%A5%D0%BE%D1%80%D1%82%D0%BE%D0%BD">Джон Конвей</a> когда-то заявил что:
<br />
<blockquote>
Organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations</blockquote>
что можно перевести как:
<br />
<blockquote>
Организация которая разрабатывает систему ... вынуждена делать систему по структуре повторяющую структуру коммуникаций внутри организации</blockquote>
В общем если в компании разрабатывающей ПО есть 3 отдела, которые занимаются этим проектом, то он, с точки зрения архитектуры, будет представлять из себя 3 больших модуля.<br />
<br />
Или если у вас есть 2 офшорные команды, то и проект будет состоять из двух частей.<br />
<br />
Причем если эти команды тесно общаются, например устраивая ежедневные skype митинги и вообще, то и модули будут тесно связаны — например единая сборка, репозиторий, документация, трекер, но разные библиотеки лежащие рядом. Но если общаются лишь переписываясь по email, то получите связь через какой нибудь RESTful API.<br />
Десятки раз видел подобные примеры.<br />
<br />
Или, как сказал <a href="https://ru.wikipedia.org/wiki/%D0%A0%D1%8D%D0%B9%D0%BC%D0%BE%D0%BD%D0%B4,_%D0%AD%D1%80%D0%B8%D0%BA">Эрик Реймонд</a>:
<br />
<blockquote>
Если у вас есть 4 команды разрабатывающие один компилятор — вы получите компилятор работающий в 4 прохода (4-pass compiler)</blockquote>
См. закон на википедии: <a href="http://en.wikipedia.org/wiki/Conway%27s_law">Conway's law</a>Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0tag:blogger.com,1999:blog-744074031699369708.post-10766956665528836532014-11-07T12:04:00.002+02:002014-11-07T12:04:36.393+02:00PHP: конструктор по умолчанию (default constructors)Рассмотрим следующий код:
<!-- Stylesheet link -->
<link href="http://www.thecomplex.plus.com/styles/SyntaxHighlighter.css" rel="stylesheet" type="text/css"></link>
<!-- Code -->
<br />
<div class="dp-highlighter" id="hlDiv">
<div class="bar">
</div>
<ol class="dp-c" start="1">
<li class="alt"><span class="keyword">class</span> Animal { </li>
<li class=""> <span class="keyword">protected</span> <span class="vars">$what</span> = <span class="string">"nothing"</span>; </li>
<li class="alt"> <span class="keyword">function</span> sound() { </li>
<li class=""> <span class="func">echo</span> get_class(<span class="vars">$this</span>).<span class="string">" says {$this->what}"</span>; </li>
<li class="alt"> } </li>
<li class="">} </li>
<li class="alt"> </li>
<li class=""><span class="keyword">class</span> Cow <span class="keyword">extends</span> Animal { </li>
<li class="alt"> <span class="keyword">protected</span> <span class="vars">$what</span> = <span class="string">"moo"</span>; </li>
<li class=""> <span class="keyword">protected</span> <span class="vars">$owner</span>; </li>
<li class="alt"> <span class="keyword">public</span> <span class="keyword">function</span> __construct(<span class="vars">$owner</span>) { </li>
<li class="alt"> <span class="comment">// parent::__construct(); (?)</span> </li>
<li class=""> <span class="vars">$this</span>->owner = <span class="vars">$owner</span>; </li>
<li class=""> } </li>
<li class="alt">} </li>
<li class=""> </li>
<li class="alt"><span class="vars">$a</span> = <span class="keyword">new</span> Cow(<span class="string">"Old McDonald"</span>); </li>
<li class=""><span class="vars">$a</span>->sound(); </li>
</ol>
</div>
В данном коде представлена простая иерархия классов.<br />
Теперь посмотрим на 12-ую строку кода отмеченную (?). Конечно, в данном случае мы можем не вызывать родительский конструктор, но...<br />
<br />
Предположим, со временем мы дополнили родительский класс:
<!-- Code -->
<br />
<div class="dp-highlighter" id="hlDiv">
<div class="bar">
</div>
<ol class="dp-c" start="1">
<li class="alt"><span class="keyword">class</span> Animal { </li>
<li class=""> <span class="keyword">protected</span> <span class="vars">$born</span>; </li>
<li class="alt"> <span class="keyword">public</span> <span class="keyword">function</span> __construct() { </li>
<li class=""> <span class="vars">$this</span>->born = time(); </li>
<li class="alt"> } </li>
<li class="">} </li>
</ol>
</div>
Вроде бы, мы ничего не поменяли, но теперь все наследуемые классы работают неверно, т.к. не вызывают родительский конструктор. Для того чтобы это исправить, нам нужно пройтись по всем классам потомкам и добавить вызов родительского конструктора.<br />
<br />
Мы могли бы избежать этой проблемы, если бы придерживались простого правила: вставлять вызов родительского конструктора, даже когда он пустой. Если родительский конструктор не определен, то вызов parent::__construct() не будет делать ровным счетом ничего. Но, если мы когда либо внедрим родительский конструктор, все наши дочерние классы будут готовы.Вячеслав Конашковhttp://www.blogger.com/profile/10086823589931595886noreply@blogger.com0