This file contains hidden or 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 | |
/** | |
* Created by PhpStorm. | |
* User: Lex | |
* Date: 20.10.2015 | |
* Time: 9:05 | |
*/ | |
/** | |
* This plugin array is more or less self documenting |
This file contains hidden or 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
/** | |
* Created by Lex on 01.03.2016. | |
*/ | |
/** | |
* Provide the HTML to create the modal dialog. | |
*/ | |
(function ($) { | |
Drupal.theme.prototype.login_modal = function () { | |
var html = ''; |
This file contains hidden or 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 | |
/** | |
* Created by PhpStorm. | |
* User: Lex | |
* Date: 20.10.2015 | |
* Time: 2:05 | |
*/ | |
function bras_profile_menu() { | |
$items = array(); |
This file contains hidden or 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
s = list(map(int, input().split())) | |
#input() | |
print(s) | |
if s[0] < s[1]: | |
print(2 * s[0] - 1) | |
elif s[0] > s[1]: | |
print(2 * s[1] - 1) | |
elif s[0] == s[1]: | |
print(2 * s[1] - 1) |
This file contains hidden or 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
allstep = {1: {'x':-1, 'y': 2}, | |
2: {'x':1, 'y': 2}, | |
3: {'x':2, 'y': 1}, | |
4: {'x':2, 'y': -1}, | |
5: {'x':1, 'y': -2}, | |
6: {'x':-1, 'y': -2}, | |
7: {'x':-2, 'y': -1}, | |
8: {'x':-2, 'y': 1}, | |
} | |
liters = {1:'A', 2:'B', 3:'C', 4:'D', 5:'E', 6:'F', 7:'G', 8:'H'} |
This file contains hidden or 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
private function getViewRender($views_id, $display_id, $arguments = [], $class = NULL, $is_title = TRUE) { | |
if(is_null($class)) { | |
$class = $views_id . '-' .$display_id; | |
} | |
$build = [ | |
'#prefix' => '<div class="' . $class . '">', | |
'#suffix' => '</div>', | |
]; | |
// get the view machine id | |
$view = Views::getView($views_id); |
This file contains hidden or 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\booking_journal\Form; | |
use Drupal\Core\Entity\EntityForm; | |
use Drupal\Core\Form\FormStateInterface; | |
/** | |
* Class JournalEventTypeForm. |
This file contains hidden or 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 | |
/** | |
* @file | |
* Contains metatag_custom_route.module. | |
*/ | |
use Drupal\Core\Routing\RouteMatchInterface; | |
use Drupal\metatag_custom_route\Entity\MetatagRouteInterface; |
This file contains hidden or 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\housing_port; | |
use Drupal\Core\Url; | |
use Drupal\node\Entity\Node; | |
use Drupal\Core\Database\Database; | |
use Drupal\node\NodeInterface; | |
use Drupal\taxonomy\Entity\Term; |
This file contains hidden or 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\housing_port\Form; | |
use Drupal\Core\Entity\Query\QueryFactory; | |
use Drupal\Core\Form\FormBase; | |
use Drupal\Core\Form\FormStateInterface; | |
use Drupal\Core\Queue\Batch; | |
use Drupal\file\Entity\File; |