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 | |
//php artisan make:command Price | |
//php artisan price:update p1 param2 array_param1 array_param2 --queue | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class Price extends Command | |
{ |
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 ControllerStartupError extends Controller { | |
public function index() { | |
$this->registry->set('log', new Log($this->config->get('config_error_filename'))); | |
set_error_handler(array($this, 'handler')); | |
//error_reporting(E_ALL & ~E_NOTICE); | |
//set_error_handler(array($this, 'handler'),E_ALL & ~E_NOTICE); //E_ERROR | E_WARNING | E_USER_WARNING);//просто игнорировать NOTICE | |
} | |
public function handler($code, $message, $file, $line) { |
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
DROP TRIGGER `products_update_row`; | |
DROP TRIGGER `products_insert_row`; | |
DELIMITER ;; | |
CREATE TRIGGER `products_update_row` BEFORE UPDATE ON `products` FOR EACH ROW | |
IF NEW.price=0 THEN | |
SET NEW.`priceon` = 0; | |
ELSE | |
SET NEW.`priceon` = 1; |
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
# -*- coding: UTF-8 -*- | |
import pandas as pd | |
from lxml import etree | |
import wget | |
import os | |
yml_df = pd.DataFrame() | |
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
package main | |
import ( | |
"fmt" | |
"os" | |
) | |
//https://fizzbuzzer.com/weird-faculty/ | |
func main() { | |
answers := []int{1, 0, 0, 0, 1, 1, 0} | |
summ := summAnswers(answers) //далее в цикле summ по сути будет friendScore |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
"strconv" | |
) |
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
-- Adminer 4.2.5 MySQL dump | |
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
DROP TABLE IF EXISTS `categories`; | |
CREATE TABLE `categories` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, |
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 Tweet | |
{ | |
private $id; | |
private $content; | |
public function __construct(int $id, string $content) | |
{ | |
$this->id = $id; |
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 NGram | |
{ | |
/** | |
* The length of the n-gram. | |
* | |
* @var int | |
*/ | |
protected $n; |
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
APP_NAME=Laravel | |
APP_ENV=local | |
APP_KEY= | |
APP_DEBUG=true | |
APP_URL=http://0.0.0.0:8080 | |
LOG_CHANNEL=stack | |
DB_CONNECTION=mysql | |
DB_HOST=db |
OlderNewer