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 | |
$dom = new DOMDocument(); | |
$html = '<head><meta garbage="what"/></head>'; | |
$head = $dom->createDocumentFragment(); | |
$head->appendXML($html); | |
$html = '<body><h1>Hello</h1></body>'; | |
$body = $dom->createDocumentFragment(); | |
$body->appendXML($html); |
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
22 Apr | |
Steam Labs Search Experiment 4.1: Query Expansion | |
Steam Blog - christen | |
Now We're Thinking with Queries | |
In this experiment, Query Expansion, we improve Steam Search by treating tags more like a human would: using logic! Take the three tags RTS, Real-Time, and Strategy, for instance. If a game is tagged RTS but not Real-Time and Strategy, a search for Real-Time + Strategy won’t find that game using Steam's existing Search tech. Query Expansion fixes that. | |
You can experience our new Search Results - including those surfaced thanks to Query Expansion - when you visit Steam Labs Experiment 004.1: Search Query Expansion. Here, many searches which leverage tags will now cast a wider net and display more titles. As always, we’d love your feedback; You can let us know what you think of your new Search Results in the discussions. | |
Read on to learn about how Query Expansion gives better search results. |
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 Ssl | |
{ | |
private $cipher = "aes-128-gcm"; | |
private $options = 0; | |
/** | |
* @param string $plaintext | |
* @return array | |
*/ | |
public function encrypt($plaintext) |
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 Meta\Library\Development; | |
use Meta\Common\Collections\Collection; | |
/** | |
* Class Timer | |
* | |
* Inspired by javscripts console.time/console.timeEnd |
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
ECONOMIC | |
1. We can pool and share British-wide resources. This means Scotland can help pay for the rest of the UK's needs, and the rest of the UK can help Scotland, when and where necessary to the tune of millions and billions. | |
- The UK overspends its budget EVERY YEAR leaving us with a 13 billion pound black hole | |
2. We can redistribute wealth, via the British-wide tax system. This helps to safeguard welfare benefits, the state pension, and protect us from fluctuating oil revenues. | |
- welfare and pensions are the worst in the western world | |
3. We can remain part of the overall UK domestic market with no internal tariffs. Firms in Scotland sell twice as much to the rest of the UK as we do to the rest of the world combined. | |
- We are about to go out on WTO terms. Better in the EU. |
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
<script> | |
function createMap() { | |
$("#map").kendoMap({ | |
center: [30.2681, -97.7448], | |
zoom: 3, | |
layers: [ | |
{ | |
type: "shape", | |
dataSource: { | |
type: "geojson", |
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
{ | |
"type": "Feature", | |
"id": "SEA", | |
"properties": { | |
"name": "The Sea", | |
"risk": 0 | |
}, | |
"style": { | |
"backgound-color": "light-blue" | |
}, |
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 | |
class Singleton | |
{ | |
protected static $instance; | |
private function __construct(){} | |
private function __clone(){} | |
public static function getInstance(): self |
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 | |
class PaginatorException extends Exception | |
{ | |
public const NO_PAGE_COUNT = 'No total page count'; | |
public const NO_URL = 'No URL set'; | |
public const NO_URL_PART = 'No URL part set'; | |
public const NO_CURRENT_PAGE = 'No current page count'; | |
} |
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
RewriteEngine On | |
# The following rule tells Apache that if the requested filename | |
# exists, simply serve it. | |
RewriteCond %{REQUEST_FILENAME} -s [OR] | |
RewriteCond %{REQUEST_FILENAME} -l [OR] | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^.*$ - [NC,L] |
NewerOlder