#Usage
- Launch Automator (Applications > Utilities > Automator)
- Select Utilities from the Library
- Drag "Run AppleScript" into workflow
- Paste and edit the below as appropriate.
###The AppleScript
| private static HashMap<String, String> getAttribute( JSONObject attributesJson ) | |
| { | |
| HashMap<String, String> attribute = new HashMap<String, String>(); | |
| try | |
| { | |
| attribute.put( "key", attributesJson.getString( "key" ) ); | |
| attribute.put( "value", attributesJson.getString( "value" ) ); | |
| } |
#Usage
###The AppleScript
| = CBDE - Pràctica Neo4j | |
| :neo4j-version: 2.0.3 | |
| :author: Martí Zamora Casals & Javier Ferrer González | |
| :twitter: @JavierCane | |
| == Disclaimer | |
| Pràctica feta per en Martí Zamora Casals i en https://twitter.com/JavierCane[Javier Ferrer González]. + |
| == Neo4j training | |
| === System init | |
| We'll initialize the system with the actors, movies and directors dataset provided with the Neo4j installation. | |
| // setup | |
| // hide | |
| [source,cypher] | |
| ---- | |
| CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'}) |
| == Neo4j training (inserts, deletes and updates) | |
| === System init | |
| We'll initialize the system with the actors, movies and directors dataset provided with the Neo4j installation. | |
| // setup | |
| // hide | |
| [source,cypher] | |
| ---- | |
| CREATE (TheMatrix:Movie {title:'The Matrix', released:1999, tagline:'Welcome to the Real World'}) |
| <?php | |
| class GildedRose { | |
| public static function updateQuality( | |
| $items | |
| ) { | |
| for ($i = 0; $i < count($items); $i++) { | |
| if (("Aged Brie" != $items[$i]->getName()) && ("Backstage passes to a TAFKAL80ETC concert" != $items[$i]->getName())) { | |
| if ($items[$i]->getQuality() > 0) { | |
| if ("Sulfuras, Hand of Ragnaros" != $items[$i]->getName()) { |
| { | |
| "name": "unique-name/kata-name", | |
| "description": "Kata description", | |
| "type": "project", | |
| "license": "proprietary", | |
| "require": { | |
| "php": "^7.3" | |
| }, | |
| "require-dev": { | |
| "symfony/var-dumper": "^4.2", |
| <?php | |
| namespace AppBundle\Controller; | |
| use FOS\RestBundle\Controller\FOSRestController; | |
| use Symfony\Component\HttpFoundation\Request; | |
| final class CourseController extends FOSRestController | |
| { | |
| public function getCourseAction(Request $request) | |
| { | |
| return $this->getDoctrine() | |
| ->getEntityManager() |
| <?php | |
| namespace AppBundle\Controller; | |
| use FOS\RestBundle\Controller\FOSRestController; | |
| use Symfony\Component\HttpFoundation\Request; | |
| final class CourseController extends FOSRestController | |
| { | |
| public function getCourseAction(Request $request) | |
| { | |
| return $this->getDoctrine() | |
| ->getEntityManager() |
| <?php | |
| namespace AppBundle\Tests\Controller; | |
| use AppBundle\Controller\CourseController; | |
| use Doctrine\Bundle\DoctrineBundle\Registry; | |
| use Doctrine\ORM\AbstractQuery; | |
| use Doctrine\ORM\EntityManager; | |
| use Doctrine\ORM\QueryBuilder; | |
| use PHPUnit_Framework_TestCase; |