$weekdayCalculator = new WeekdayCalculator();
$weekdayCalculator->addSpecialWorkday(new Date('2022-01-08')); // Override Saturday as a workday.
// Sunday stays a normal holiday as usual.
$weekdayCalculator->addSpecialHoliday(new Date('2022-01-10')); // Override the following Monday as a holiday.
// As a result, we've shifted the workday one day back.
var_dump(
$weekdayCalculator->isWorkday(new Date('2022-01-08')), // Returns TRUE - we manually set this date as a workday.
$weekdayCalculator->isHoliday(new Date('2022-01-09')), // Returns TRUE - normal holiday.
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
.icon:before { | |
font-family: "your-font-name"; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
font-style: normal; | |
font-variant: normal; | |
font-weight: normal; | |
text-decoration: none; | |
text-transform: none; | |
} |
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
.icon:before { | |
font-family: "your-font-name"; | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
font-style: normal; | |
font-variant: normal; | |
font-weight: normal; | |
text-decoration: none; | |
text-transform: none; | |
} |
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 | |
use PHPUnit\Framework\TestCase; | |
class ExceptionTestCase extends TestCase | |
{ | |
public function testException() | |
{ | |
$this->expectException(TypeError::class); | |
$this->expectExceptionMessage('call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object'); | |
$this->getMockBuilder(Foo::class) |
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
@echo off | |
set main_branch=master | |
REM store current branch name in variable | |
for /f "delims=" %%a in ('git rev-parse --abbrev-ref HEAD') do @set branch=%%a | |
git checkout %main_branch% & git pull upstream %main_branch% & git push | |
REM this GOTO crap is only necessary because CMD doesn't support IF (foo && bar) |
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
server { | |
listen 80; | |
server_name ~^(?<project>.+)\.(?<username>.+)\.hhvm\.dyninno\.net$; | |
if (!-d /home/$username/public_html/$project) { | |
return 405; | |
break; | |
} | |
set $root /home/$username/public_html/$project; |
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 Warning: PDO::query(): MySQL server has gone away in C:\Users\Juris\Desktop\test\test.php on line 23 | |
Warning: PDO::query(): MySQL server has gone away in C:\Users\Juris\Desktop\test\test.php on line 23 | |
PHP Warning: PDO::query(): Error reading result set's header in C:\Users\Juris\Desktop\test\test.php on line | |
23 | |
Warning: PDO::query(): Error reading result set's header in C:\Users\Juris\Desktop\test\test.php on line 23 | |
Exception: connection problem. Message: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away |
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
diff --git a/ui/jquery.ui.dialog.js b/ui/jquery.ui.dialog.js | |
index c5bd42a..9512c10 100644 | |
--- a/ui/jquery.ui.dialog.js | |
+++ b/ui/jquery.ui.dialog.js | |
@@ -26,6 +26,7 @@ $.widget( "ui.dialog", { | |
autoOpen: true, | |
buttons: [], | |
closeOnEscape: true, | |
+ closeOnOverlayClick: false, | |
closeText: "Close", |
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 java.util.HashSet; | |
import java.util.Set; | |
import listeners.IBlockingAltListener; | |
import listeners.IBlockingListener; | |
import listeners.IItemReceiveListener; | |
import listeners.IPlayerDeathListener; | |
public enum EventDispatcher | |
{ |