This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Node { | |
public $value; | |
public $next; | |
public function __construct($val) { | |
$this->value = $val; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: atlassian/default-image:2 | |
definitions: | |
services: | |
redis: | |
image: redis:3.2 | |
memory: 512 | |
mysql: | |
image: mysql:5.7 | |
environment: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | year | title | |
---|---|---|---|
tt1711425 | 2013 | 21 & Over | |
tt1343727 | 2012 | Dredd 3D | |
tt2024544 | 2013 | 12 Years a Slave | |
tt1272878 | 2013 | 2 Guns | |
tt0453562 | 2013 | 42 | |
tt1335975 | 2013 | 47 Ronin | |
tt1606378 | 2013 | A Good Day to Die Hard | |
tt2194499 | 2013 | About Time | |
tt1814621 | 2013 | Admission |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Get all reviews from iTunes store for a given podcast | |
* | |
*/ | |
$podcast_id = '1204701206'; | |
$countries = ['DZ', 'AO', 'AI', 'AG', 'AR', 'AM', 'AU', 'AT', 'AZ', 'BH', 'BB', 'BY', 'BE', 'BZ', 'BM', 'BO', 'BW', 'BR', 'VG', 'BN', 'BG', 'CA', 'KY', 'CL', 'CN', 'CO', 'CR', 'HR', 'CY', 'CZ', 'DK', 'DM', 'DO', 'EC', 'EG', 'SV', 'EE', 'FI', 'FR', 'DE', 'GH', 'GR', 'GD', 'GT', 'GY', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IE', 'IL', 'IT', 'JM', 'JP', 'JO', 'KZ', 'KE', 'KR', 'KW', 'LV', 'LB', 'LT', 'LU', 'MO', 'MK', 'MG', 'MY', 'ML', 'MT', 'MU', 'MX', 'MD', 'MS', 'NP', 'NL', 'NZ', 'NI', 'NE', 'NG', 'NO', 'OM', 'PK', 'PA', 'PY', 'PE', 'PH', 'PL', 'PT', 'QA', 'RO', 'RU', 'SA', 'SN', 'SG', 'SK', 'SI', 'ZA', 'ES', 'LK', 'KN', 'LC', 'VC', 'SR', 'SE', 'CH', 'TW', 'TZ', 'TH', 'BS', 'TT', 'TN', 'TR', 'TC', 'UG', 'GB', 'UA', 'AE', 'UY', 'US', 'UZ', 'VE', 'VN', 'YE']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://api.drupal.org | |
http://drupal.org/developing/modules | |
http://drupal.org/project/examples | |
http://drupal.org/coding-standards | |
http://drupal.org/writing-secure-code | |
http://api.drupal.org/api/search/7/%s | |
# versões do módulo | |
# Versão com um papel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$area = array_pop(array_pop(field_get_items($entity_type, $entity, 'field_area'))); | |
$preco = array_pop(array_pop(field_get_items($entity_type, $entity, 'field_preco'))); | |
if ($preco > 0) { | |
$entity_field[0]['value'] = number_format(($preco / $area), 2, ',', '.'); | |
} else { | |
$entity_field[0]['value'] = 0; | |
} |