count(): Parameter must be an array or an object that implements Countable
It is because of phpmyadmin’s library try to counting some parameter but got wrong a code. So by looking at line 613, we find:
class Animal { | |
} | |
class Penguin extends Animal { | |
public function __construct($id) { | |
$this->getPenguinFromDb($id); | |
} | |
public function getPenguinFromDb($id) { | |
// elegant and robust database code goes here |
$states = [ | |
'Andaman and Nicobar Islands', | |
'Andhra Pradesh', | |
'Arunachal Pradesh', | |
'Assam', | |
'Bihar', | |
'Chandigarh', | |
'Chhattisgarh', | |
'Dadra and Nagar Haveli and Daman and Diu', | |
'Goa', |
<?php | |
class OverloadingTest | |
{ | |
public function __call($method, $params) | |
{ | |
if($method === "select") | |
{ | |
$this->testing1($params[0]); | |
} elseif($method === "insert") { |
<?php | |
class Test | |
{ | |
public function testing(...$args) | |
{ | |
$x = func_num_args(); | |
print_r($x); | |
echo "</br>"; | |
print_r($args); |
<?php | |
$letters = ['a','b','c']; | |
$words = []; | |
$words['name'] = 'Akash'; | |
$words['skills'] = array(); | |
$words['vocab'] = 10; | |
$words['temp'] = array(); | |
foreach($letters as $letter) { | |
$words['skills'][] = htmlentities($letter); |
--To create a database with proper character set and collation | |
CREATE DATABASE IF NOT EXISTS profile_maker CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; | |
--To see the default character set and collation for a given database, use these statements: | |
USE db_name; | |
SELECT @@character_set_database, @@collation_database; | |
--Alternatively, to display the values without changing the default database: | |
SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME | |
FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'db_name'; |
MySQL can create composite indexes (that is, indexes on multiple columns). An index may consist of up to 16 columns.
MySQL can use multiple-column indexes for queries that test all the columns in the index, or queries that test just the first column, the first two columns, the first three columns, and so on. If you specify the columns in the right order in the index definition, a single composite index can speed up several kinds of queries on the same table.
A multiple-column index can be considered a sorted array, the rows of which contain values that are created by concatenating the values of the indexed columns.
Suppose that a table has the following specification:
CREATE TABLE test (
id INT NOT NULL,
<?php | |
// Noncompliant Code Example | |
if ($booleanVariable == true) { /* ... */ } | |
if ($booleanVariable != true) { /* ... */ } | |
if ($booleanVariable || false) { /* ... */ } | |
doSomething(!false); | |
$booleanVariable = condition ? true : exp; | |
$booleanVariable = condition ? false : exp; |
!pip install boilerpy3
from boilerpy3 import extractors
extractor = extractors.CanolaExtractor()
doc = extractor.get_doc_from_url('https://www.newsrain.in/petrol-diesel-prices/Odisha')
page_title = doc.title