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 | |
final class OrderLevelShippingCalculatorTest extends TestCase | |
{ | |
public function testItEnsuresOrderIncludeShippingFeeCollection() | |
{ | |
$order = SalesOrderBuilder::initialOrder(); | |
$invoice = InvoiceBuilder::initialInvoice(); | |
$calculator = $this->createCalculator( |
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
CREATE TABLE order_info( | |
order_id INT NOT NULL, | |
product_id INT NOT NULL, | |
option_attribute VARCHAR(20), | |
option_value VARCHAR(20), | |
PRIMARY KEY(order_id,product_id,option_attribute,option_value) | |
); | |
INSERT INTO order_info VALUES | |
(1,10,'Colour','Red'),(1,10,'Size','Large'),(1,10,'Sleeve','Short'), | |
(2,10,'Colour','Blue'),(2,10,'Size','Small'),(2,10,'Sleeve','Long'); |
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 | |
/** | |
* Reverse Words In Array Of Charachters | |
* | |
* @param array $input | |
* | |
* @return array | |
*/ | |
function reverseWords(array $input) : array | |
{ |
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
#################################################################################################### | |
# Usage.sh # | |
# Written by Ali Hallaji # | |
# If any bug, report me in my Github page at below # | |
# Free to use/edit/distribute the code below by # | |
# giving proper credit to Author # | |
# Link: https://github.com/ali-hallaji/system-usage-bash # | |
#################################################################################################### | |
#! /bin/bash | |
# unset any variable which system may be using |
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 | |
$CHUNK = 8192; | |
try { | |
if (!($putData = fopen("php://input", "r"))) | |
throw new Exception("Can't get PUT data."); | |
// now the params can be used like any other variable | |
// see below after input has finished |
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 getPrimingSeriesIndex($index) | |
{ | |
if ( $index <= 0 ) | |
return false; | |
if ($index == 1) | |
return 2; |
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 | |
public function postFile() | |
{ | |
$file_url = "test.txt"; //here is the file route, in this case is on same directory but you can set URL too like "http://examplewebsite.com/test.txt" | |
$eol = "\r\n"; //default line-break for mime type | |
$BOUNDARY = md5(time()); //random boundaryid, is a separator for each param on my post curl function | |
$BODY=""; //init my curl body | |
$BODY.= '--'.$BOUNDARY. $eol; //start param header | |
$BODY .= 'Content-Disposition: form-data; name="sometext"' . $eol . $eol; // last Content with 2 $eol, in this case is only 1 content. | |
$BODY .= "Some Data" . $eol;//param data in this case is a simple post data and 1 $eol for the end of the data |
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 | |
/** | |
* As per the Bearer spec (draft 8, section 2) - there are three ways for a client | |
* to specify the bearer token, in order of preference: Authorization Header, | |
* POST and GET. | |
* | |
* @param ServerRequestInterface $request | |
* | |
* @return null|string Token | |
*/ |
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 Client | |
{ | |
public function get($url, array $options = []) | |
{ | |
$options = array_merge([ 'method' => 'get', 'url' => $url ], $options); | |
return $this->request($options); | |
} | |
public function post($url, array $data = [], array $options = []) |
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
0815.ru | |
0815.ru0clickemail.com | |
0815.ry | |
0815.su | |
0845.ru | |
0clickemail.com | |
0-mail.com | |
0wnd.net | |
0wnd.org | |
10mail.com |
NewerOlder