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 | |
/** | |
* To create some typesafe enums, just extend this class, declare some static | |
* properties, then call YourClassName::setUp(). Example follows. | |
* | |
* Disadvantages: | |
* - Since the enums are public properties, they could be modified by | |
* mistake (or intentionally by malicious code). | |
* - YourClassName::setUp() must be called. |
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 | |
/** | |
* To create some typesafe enums, just extend this class, declare and initialize | |
* to null a protected static property called $values, and implement getNames() | |
* to return an array with the enums you want. Then you can access your | |
* enums with YourClassName::ENUM_NAME(). Also, your subclass should be final. | |
* | |
* Disadvantages: | |
* - Usage is ugly. |
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 data1 = { prop: "hi" }; | |
var data2 = data1; | |
data2 = {}; | |
console.log ( data1 ); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
use pgehres; | |
RENAME TABLE squidlog TO files; | |
ALTER TABLE files | |
ADD COLUMN directory VARCHAR(256) NOT NULL, | |
ADD COLUMN sample_rate INT(2) UNSIGNED DEFAULT NULL, | |
ADD COLUMN status ENUM('processing', 'consumed') NOT NULL, | |
ADD COLUMN consumed_events INT UNSIGNED DEFAULT NULL, | |
ADD COLUMN ignored_events INT UNSIGNED DEFAULT NULL, | |
ADD COLUMN invalid_events INT UNSIGNED DEFAULT NULL, |