This file contains hidden or 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 Megagroup; | |
interface CurrencyGrabberInterface | |
{ | |
/** | |
* @brief Downloads currency rates from the remote server | |
* and saves in database. | |
* | |
* @return boolean |
This file contains hidden or 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 Megagroup; | |
class Db extends \mysqli { | |
protected static $instance; | |
protected static $options = array(); | |
private function __construct() { | |
$o = self::$options; |
This file contains hidden or 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 | |
require(__DIR__ .'/db.php'); | |
require(__DIR__ .'/CurrencyGrabber.php'); | |
//fot test method MyCurrencyGrabberInterface::convert() | |
$from = 'USD'; | |
$to = 'UZS'; | |
$symbol = 'uzs'; | |
header('Content-Type: text/html; charset=utf-8'); |
This file contains hidden or 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 S3\Cms; | |
/** | |
* Class to call remote methods via protocol JSON-RPC 2.0 | |
* Includes server and client functionality | |
* | |
* According to official JSON-RPC 2.0 specification | |
* http://groups.google.com/group/json-rpc/web/json-rpc-2-0 | |
* Excluding "notifications" and "batch mode" | |
*/ |
This file contains hidden or 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
JSON-RPC 2.0 Спецификация | |
Дата создания: | |
2010-03-26 (в зависимости от версии 2009-05-24) | |
Обновлено: | |
2013-01-04 | |
Автор: | |
Рабочая группа JSON-RPC <[email protected]> | |
Содержание | |
Обзор |
This file contains hidden or 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 Faker\Generator as Faker; | |
$factory->define(App\People::class, function (Faker $faker) { | |
return [ | |
'first_name' => $faker->firstName, | |
'last_name' => $faker->lastName, | |
'twitter' => '@'.$faker->userName | |
]; |
This file contains hidden or 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
$factory->define(App\Article::class, function (Faker $faker) { | |
return [ | |
'author_id' => $faker->numberBetween(1,100), | |
'title' => $faker->sentence() | |
]; | |
}); |
This file contains hidden or 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 Faker\Generator as Faker; | |
$factory->define(App\Comment::class, function (Faker $faker) { | |
return [ | |
'article_id' => $faker->numberBetween(1,200), | |
'author_id' => $faker->numberBetween(1,100), | |
'body' => $faker->text() | |
]; |
This file contains hidden or 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
<div class="container"> | |
<h1 class="text-center">Js - 2 dars</h1> | |
<div class="card bg-light mb-3 w-50 mx-auto"> | |
<div class="card-header">Valyuta aiyirboshlash kalculyatori</div> | |
<div class="card-body"> | |
<h5 class="card-title">Summani kiriting</h5> | |
<div class="form-group"> | |
<input type="text" name="summa" class="form-control" id="summa" autofocus="true"> | |
</div> | |
<p class="text-center"> |
This file contains hidden or 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 Category extends Model { | |
//each category might have one parent | |
public function parent() { | |
return $this->belongsToOne(static::class, 'cat_parent_id'); | |
} | |
//each category might have multiple children | |
public function children() { | |
return $this->hasMany(static::class, 'cat_parent_id')->orderBy('cat_name', 'asc'); |
OlderNewer