Shows the score curves when given different settings for the three types of scoring functions available in Elasticsearch.
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 | |
// Variables used in this script: | |
// $summary - text title of the event | |
// $datestart - the starting date (in seconds since unix epoch) | |
// $dateend - the ending date (in seconds since unix epoch) | |
// $address - the event's address | |
// $uri - the URL of the event (add http://) | |
// $description - text description of the event | |
// $filename - the name of this file for saving (e.g. my-event-name.ics) | |
// |
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 | |
function get_ip_address() { | |
$ip_keys = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR'); | |
foreach ($ip_keys as $key) { | |
if (array_key_exists($key, $_SERVER) === true) { | |
foreach (explode(',', $_SERVER[$key]) as $ip) { | |
// trim for safety measures | |
$ip = trim($ip); | |
// attempt to validate IP | |
if (validate_ip($ip)) { |
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
pragma solidity 0.6.6; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@chainlink/contracts/src/v0.6/VRFConsumerBase.sol";contract | |
AdvancedCollectible is ERC721, VRFConsumerBase { | |
uint256 public tokenCounter; | |
enum Breed{PUG, SHIBA_INU, BRENARD} | |
// add other things | |
mapping(bytes32 => address) public requestIdToSender; | |
mapping(bytes32 => string) public requestIdToTokenURI; | |
mapping(uint256 => Breed) public tokenIdToBreed; |
This document contains a common database updates in Drupal 7 projects.
Let's suppose we want to change field_article_summary
from text to textarea, but we do not care
about loosing its current data.
Start by removing the field through the Admin Interface in your local environment. Then, add the field with the new configuration and recreate the feature where it was exported. Finally, add the following database update: