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 | |
$entityTypeManager = \Drupal::entityTypeManager(); | |
$storage = $entityTypeManager->getStorage('node'); | |
// Replace <article> with your nodetype. | |
$query = $storage->getQuery() | |
->condition('type', 'article') | |
->execute(); | |
// Chunk in case you have thousands of nodes to update. | |
foreach (array_chunk($query, 200) as $chunk) { |
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
#include <iostream> | |
#include <set> | |
#include <string> | |
#include <vector> | |
#include <iterator> | |
#include <algorithm> | |
using std::set; | |
using std::string; | |
using std::cin; |
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
import React from "react" | |
const fetch = require("isomorphic-fetch"); | |
const { compose, withProps, withHandlers, withStateHandlers } = require("recompose"); | |
const demoFancyMapStyles = require("./demoFancyMapStyles.json"); | |
const FaAnchor = require("react-icons/lib/fa/anchor"); | |
const { | |
withScriptjs, | |
withGoogleMap, | |
GoogleMap, | |
Marker, |
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 | |
namespace Drupal\general\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* List tests arranged in groups that can be selected and run. | |
*/ |
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 | |
namespace Drupal\general\Form; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* List tests arranged in groups that can be selected and run. | |
*/ |
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 | |
$users = \Drupal::entityQuery('user') | |
->execute(); | |
$max = count($users); | |
$pointer = 0; | |
foreach (array_chunk($users, 100) as $chunk) { | |
foreach ($chunk as $user_id) { | |
$pointer++; |