<div class="container">
<div class="inner">1</div>
<div class="inner">2</div>
<div></div>
</div>
.container
{
display:flex;
flex-direction : row;
justify-content : space-between;
align-items: center;
width: 900px;
height: 200px;
border: 1px solid red;
}
.inner
{
width: 40px;
height: 40px;
border: 1px solid red;
}
function mouseMove()
{
console.log('Запуск функции');
window.onmousemove = ttt;
window.onmousedown = yyy;
}
function ttt() {
console.log('Движение');
}
function yyy() {
console.log('click');
window.onmousemove = null;
}
$num = 128.40;
$arr = explode(".", $num );
list( $arub, $acop ) = $arr ;
$acop *= 10;
echo "$arub : $acop";
$num = 128.40;
$arub = floor( $num );
$acop = floor( ( $num - $arub ) * 100 );
echo "$arub : $acop";
let arr = [ 3,3,3,3,2 ]
let main_digit = ( arr.reduce( (a,b) => a + b, 0 ) / arr.length ).toFixed(0)
let excess_digit = ( arr.filter( ( item, index ) => item != main_digit ))[0]
console.log( excess_digit )
class Model
{
...
private title;
private contents;
...
public function setTitle( $title )
{
$object->title = $title;
}
public function setContent( $contents )
{
$object->contents = $contents;
}
public function save()
{
...
}
}
...
$model = new Model();
$model->setTitle( "Заголовок" );
$model->setContent( "Описание" );
$model->save();
...
let arr = [...document.getElementsByClassName("test_class")]
for (let i=0; i < arr.length; i++) {
arr[i].onclick = function(){
alert("Click!");
}
};
arr.forEach(function(entry) {
entry.onclick = function(){
alert("Click!");
}
});
arr.map(function(entry) {
entry.onclick = function(){
alert("Click!");
}
return entry;
}
SELECT DISTINCT `tagRelation`.tagId
FROM `model`
INNER JOIN `tagRelation` ON `tagRelation`.`modelId` = `model`.id
WHERE 1
SELECT DISTINCT `tagRelation`.tagId
FROM `model`
INNER JOIN `tagRelation` ON `tagRelation`.`modelId` = `model`.id
WHERE `tagRelation`.`tagId` IN (1, 2, 3)
...
0 0 * * * date >> /var/phppass.txt
0 0 * * * date >> php /var/script.php
...