Choose one:
- Write a guessing game where the user has to guess a secret number.
- After every guess the program tells the user whether their number was too large or too small.
- At the end the number of tries needed should be printed.
/* Smartphones (portrait and landscape) ----------- */ | |
@media only screen | |
and (min-device-width : 320px) | |
and (max-device-width : 480px) { | |
/* Styles */ | |
} | |
/* Smartphones (landscape) ----------- */ | |
@media only screen |
core = 7.23 | |
api = 2 | |
projects[drupal][version] = "7.23" | |
; Modules | |
projects[] = ctools | |
projects[] = devel | |
projects[] = entity | |
projects[] = features | |
projects[] = fences |
<?php | |
foreach($content['field_my_field_collection']['#items'] as $entity_uri) { | |
$item = entity_load('field_collection_item', $entity_uri); | |
foreach ($item as $entity_obj) { | |
dpm($entity_obj->field_my_individual_field); | |
} | |
} | |
?> |
<?php | |
// Link to /download_file/$fid to force download rather than view in browser | |
/* | |
* Implements hook_menu() | |
*/ | |
function download_file_menu(){ | |
$items = array(); | |
$items['download_file/%'] = array( |
<?php // view, display, any additional contextual filters ?> | |
<?php $view = views_embed_view("view_name", "display_name", $node->nid); ?> | |
<?php if(strpos($view, "view-content") !== FALSE){ ?> | |
<?php echo $view; ?> | |
<?php } ?> |
git archive -o latest.zip later-commit $(git diff --name-only earlier-commit later-commit) |
# USE THIS SCRIPT AT YOUR OWN RISK | |
# Make sure your work is backed up / in version control. | |
# Quick and dirty script to recursively replace all | |
# headers of the format ###heading with ### heading. | |
# (Works through all .md files in the directory, and subdirectories) | |
filelist = Dir.glob("**/*.md") | |
for filename in filelist |
You are tasked with creating an e-commerce platform. Your online store may sell anything you wish. It could be a niche, boutique store or a more general 'amazon' type. Customers will log in, add items to their basket and purchase them.
Your shop should include; A stock class with quantity, price and availability.
stops = ["Croy", "Cumbernauld", "Falkirk High", "Linlithgow", "Livingston", "Haymarket"]