By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| <?php | |
| $ch = curl_init('https://www.howsmyssl.com/a/check'); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
| $data = curl_exec($ch); | |
| curl_close($ch); | |
| $json = json_decode($data); | |
| echo "<pre>TLS version: " . $json->tls_version . "</pre>\n"; |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| <?php | |
| namespace App\ActiveRecord; | |
| class PostRepository | |
| { | |
| private $cache; | |
| public function __construct(Cache $cache) | |
| { | |
| // Any set() / get() cache implementation. |
TLDR: The cascade={"remove"} is like a "software" onDelete="CASCADE", and will remove objects from the database only when an explicit call to $em->remove() occurs. Thus, it could result in more than one object being deleted. orphanRemoval can remove objects from the database even if there was no explicit call to ->remove().
I answered this question a few times to different people so I will try to sum things up in this Gist.
Let's take two entities A and B as an example. I will use a OneToOne relationship in this example but it works exactly the same with OneToMany relationships.
class A| //* | |
| //* See the JS Fiddle: http://jsfiddle.net/sxcjmoj5/3/ | |
| //* | |
| //* | |
| // make sure ngSanitize module is installed: | |
| // https://docs.angularjs.org/api/ngSanitize | |
| // | |
| // To convert links from plaintext, you must use the linky filter which is included with ngSanitize | |
| // https://docs.angularjs.org/api/ngSanitize/filter/linky | |
| // |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| -- Add these to speed up OpenCart | |
| ALTER TABLE `oc_product` ADD INDEX(`date_available`, `status`); | |
| ALTER TABLE `oc_product` ADD INDEX(`status`); | |
| ALTER TABLE `oc_url_alias` ADD UNIQUE(`query`); | |
| ALTER TABLE `oc_product_to_store` ADD INDEX(`store_id`); | |
| ALTER TABLE `oc_category_path` ADD INDEX(`path_id`, `category_id`); | |
| ALTER TABLE `oc_category_path` ADD INDEX(`category_id`, `path_id`); | |
| ALTER TABLE `oc_product_description` ADD INDEX(`language_id`); | |
| ALTER TABLE `oc_category` ADD INDEX (`parent_id`, `status`, `sort_order`); | |
| ALTER TABLE `oc_category` ADD INDEX(`sort_order`); |