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
Given an array of integers, can you find the sum of its elements? | |
Input Format | |
The first line contains an integer, , denoting the size of the array. | |
The second line contains space-separated integers representing the array's elements. | |
Output Format | |
Print the sum of the array's elements as a single integer. | |
// If variable is an array | |
// If array has all numbers |
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
// is this a photo stored in the site (for a Person node)? | |
// if so, we can use Image Styles to generate the different sizes needed | |
if(strpos($photo_uri,"public:") === 0){ | |
$regular = image_style_url($preset,$photo_uri); | |
$retina = image_style_url($preset . "_2x",$photo_uri); | |
$img_properties = image_get_info(image_style_path($preset, $photo_uri )); | |
$photo_height = $img_properties['height']; | |
$photo_width = $img_properties['width']; | |
} else { | |
// We have to explicitly specify the dimensions for photos coming from the photo services feed |
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
https://acquia-academy.gitbooks.io/study-guide-drupal-8-site-builder-exam/content/study-guide.html | |
http://www.tanay.co.in/blog/cracking-acquia-certified-drupal-site-builder-certification.html | |
https://www.4sitestudios.com/blog/when-to-use-content-types-taxonomies-and-custom-entities-in-drupal | |
What are blocks? | |
- https://www.drupal.org/docs/8/core/modules/block/overview | |
- https://www.drupal.org/docs/user_guide/en/block-concept.html | |
- Blocks are individual pieces of your site’s web page layout. |
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
vagrantfile: | |
target: local | |
vm: | |
provider: | |
local: | |
box: puphpet/ubuntu1404-x64 | |
box_url: puphpet/ubuntu1404-x64 | |
box_version: '0' | |
chosen_virtualizer: virtualbox | |
virtualizers: |
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
class puphpet_php ( | |
$php, | |
$mailhog | |
) { | |
include ::php::params | |
class { 'puphpet::php::settings': | |
version_string => $php['settings']['version'], | |
} |
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
#!/bin/bash | |
export DEBIAN_FRONTEND=noninteractive | |
VAGRANT_CORE_FOLDER=$(cat '/.puphpet-stuff/vagrant-core-folder.txt') | |
OS=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" ID) | |
RELEASE=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" RELEASE) | |
CODENAME=$(/bin/bash "${VAGRANT_CORE_FOLDER}/shell/os-detect.sh" CODENAME) |
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
require 'date' | |
puts Date.today.to_s | |
puts " _ _ " | |
puts " | | | | " | |
puts " _ __ _ __ ___ __| |_ _ ___| |_ ___ " | |
puts "| '_ \\| '__/ _ \\ / _` | | | |/ __| __/ __|" | |
puts "| |_) | | | (_) | (_| | |_| | (__| |_\\__ \\" | |
puts "| .__/|_| \\___/ \\__,_|\\__,_|\\___|\\__|___/" | |
puts "| | " |
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
<!DOCTYPE html> | |
<html ng-app="MyApp"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title>My AngularJS App</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> |
This file has been truncated, but you can view the full file.
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
{"Provider":[{"ID":"18934","ProviderName":{"FirstName":"Vandana","MiddleName":"Gupta","LastName":"Abramson","Prefix":"Dr.","Suffix":{},"PreferredName":{},"FormerLastName":{}},"Gender":"Female","BirthDate":"0001-01-01T00:00:00","Status":"Active","ImageUrl":"https:\/\/apd.mc.vanderbilt.edu\/ProviderImages\/Abramson Vandana Gupta-18934.jpg","Verified":"true","WhenVerified":"2014-07-21T08:58:32","TakesAppointments":"true","TitlesList":{"ProviderTitle":{"ID":"19","Title":"Assistant Professor of Medicine"}},"EducationList":{"ProviderEducation":{"Degree":"MD","Description":"Doctor of Medicine","Institution":"University of Chicago","GraduationYear":"2000"}},"PostGraduateTrainingList":{"ProviderPostGraduateTraining":[{"PostGraduateTrainingType":"Fellowship","Institution":"University of Pennsylvania","StartYear":{},"EndYear":"2006"},{"PostGraduateTrainingType":"Residency","Institution":"Brigham and Women's Hospital - Harvard Medical School","StartYear":{},"EndYear":"2003"}]},"BoardCertificationsList":{"ProviderBoardCer |
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
var doctorsFilter = angular.module('findADoc', []); | |
doctorsFilter.controller('doctorsController', ['$scope', '$http', function($scope, $http) { | |
$http.get('../css/findadoc.json').success(function(data) { | |
$scope.doctors = data; | |
}); | |
$scope.options = { | |
stores: [ | |
{id :"Cart", name : 'Ma commande', speciality: 'Ma commande'}, |
NewerOlder