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
#!/usr/bin/ruby2.7 | |
class House | |
attr_accessor :balcony | |
def initialize() | |
@balcony = "#####" | |
end | |
def siesta() |
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
#!/usr/bin/php8.1 | |
<?php | |
class House { | |
public string $balcony = "#####"; | |
// public function __costruct() { | |
// $this->balcony = "######"; | |
// } |
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
#!/usr/bin/python3 | |
import unittest | |
import yaml | |
import pathlib | |
import validators | |
from bs4 import BeautifulSoup | |
class TestHtmlDocumentMustHave(unittest.TestCase): |
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 Dummy | |
{ | |
public function action_index() | |
{ | |
$device_id = $this->_get_read_request_params('device_id'); | |
$device = new Model_DeviceSettings_Device($device_id); |
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
## Creating and set up the tables | |
CREATE TABLE subject | |
( | |
id INTEGER PRIMARY KEY, | |
shortname varchar(32) NOT NULL UNIQUE, | |
fullname varchar(128), | |
description TEXT, | |
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, |
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 CsvFileIterator implements Iterator | |
{ | |
protected $file; | |
protected $key = 0; | |
protected $current; | |
public function __construct($file) | |
{ |
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
/*! | |
* Bootstrap v3.0.0 | |
* | |
* Copyright 2013 Twitter, Inc | |
* Licensed under the Apache License v2.0 | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Designed and built with all the love in the world by @mdo and @fat. | |
*/ |
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 places set of items in table with given number of columns. | |
* Free spaces are properly disposed in table so that they don't contact if it's possible. | |
*/ | |
class Itemboard { | |
/** | |
* States of gaps number and maximal blacks fields number in checkerboard ratio. |
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 modeling checkerboard. | |
* Table with boolean values in the cells, alternately true and false. | |
*/ | |
class Checkerboard { | |
/** | |
* Table with indexes of the fields with false value. |
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 | |
$quantity = $argv[1]; | |
$columns = $argv[2]; | |
$rows = ceil($quantity / $columns); | |
$places = $columns * $rows; | |
$gaps = array(); |
NewerOlder