Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
Delete binary logs
Deletes binary logs created before the specified date
purge binary logs before ‘2022-03-03’;
by Valeri Tandilashvili
3 years ago
0
MySQL
0
File & folder sizes
Shows files and folders with their sizes in the current directory
du -h --max-depth=1
by Valeri Tandilashvili
3 years ago
0
Linux
0
Error log file address
Error log file location:
/var/www/website.com/storage/logs/laravel.log
by Valeri Tandilashvili
3 years ago
0
Laravel
0
Export all table except ...
Exports all table from
dbname
except the two table:
table1
and
table2
mysqldump -u root -p --ignore-table=dbname.table1 --ignore-table=dbname.table2 dbname > dbname.sql
by Valeri Tandilashvili
3 years ago
0
Linux
MySQL
0
Example provoking a corrupt image to be download in a controller 4
public function downloadImage($post_id) {
    $post = Post::find($post_id);
    $file = public_path()."/uploads/Koala.jpg";
    $headers = array('Content-Type' => ' image/jpeg');
    return Response::download($file,'Koala.jpg',$headers);
}
If I remove the first line of the function it works. The only way I found to fix this issue was to modify the code this way:
public function downloadImage($post_id) {
    $post = Post::find($post_id);
    $file = public_path()."/uploads/Koala.jpg";
    $headers = array('Content-Type' => ' image/jpeg');
    $response = Response::download($file,'Koala.jpg',$headers);
    ob_end_clean();
    return $response;
}
by გიორგი უზნაძე
3 years ago
0
Laravel
PHP
Download
File
Images
0
Returns value of
title
element from
$xml
function value_in($element_name, $xml, $content_only = true) {
    if ($xml == false) {
        return false;
    }
    $found = preg_match('#<'.$element_name.'(?:\s+[^>]+)?>(.*?)'.
            '</'.$element_name.'>#s', $xml, $matches);
    if ($found != false) {
        if ($content_only) {
            return $matches[1];  //ignore the enclosing tags
        } else {
            return $matches[0];  //return the full pattern match
        }
    }
    // No match found: return false.
    return false;
}

$title = value_in('title', $xml);
by Valeri Tandilashvili
3 years ago
0
PHP
preg_match
0
JS Projects
To-Do App (adding / deleting items to the list) https://codepen.io/Tandilashvili/pen/BaYdqMz?editors=1010 https://www.youtube.com/watch?v=HQuJzGU7TWg http://sibrdzne.ge/ot/projects/JS/to-do-app/index.html To-Do List App (adding / deleting / editing items to the list) https://codepen.io/Tandilashvili/pen/OJQBoRQ https://www.youtube.com/watch?v=b8sUhU_eq3g http://sibrdzne.ge/ot/projects/JS/to-do-app-with-edit/index.html Multiple Choice Quiz App https://codepen.io/Tandilashvili/pen/GRQYGGb https://www.youtube.com/watch?v=49pYIMygIcU http://sibrdzne.ge/ot/projects/JS/multiple-choice-quiz/index.html Dogs, (API 🐶 Fetch, Promises & Async Await) https://codepen.io/learnwebcode/pen/LYNWQgg https://www.youtube.com/watch?v=AVmGmLFcukM http://sibrdzne.ge/ot/projects/JS/dog-api/index.html Weather App (API) https://codepen.io/Tandilashvili/pen/WNMXPoB https://www.youtube.com/watch?v=KqZGuzrY9D4 http://sibrdzne.ge/ot/projects/JS/weather-app/index.html Image Carousel https://codepen.io/Tandilashvili/pen/RwQxMVm https://www.youtube.com/watch?v=9HcxHDS2w1s http://sibrdzne.ge/ot/projects/JS/image-carousel/index.html Clock https://codepen.io/Tandilashvili/pen/vYdVXVR https://www.youtube.com/watch?v=Ki0XXrlKlHY http://sibrdzne.ge/ot/projects/JS/clock/index.html Calculator https://codepen.io/Tandilashvili/pen/OJQBBZL https://www.youtube.com/watch?v=QS6Y0ezhyCs http://sibrdzne.ge/ot/projects/JS/calculator/index.html Movie App (API) https://codepen.io/Tandilashvili/pen/BaYqbNK https://www.youtube.com/watch?v=9Bvt6BFf6_U http://sibrdzne.ge/ot/projects/JS/movie-app/index.html Books List App (class, localStorage) https://codepen.io/Tandilashvili/pen/RwQqgVw?editors=1010 https://www.youtube.com/watch?v=JaMCxVWtW58 http://sibrdzne.ge/ot/projects/JS/books-list-app/index.html Budget App (edit, delete, localStorage) https://codepen.io/Tandilashvili/pen/ExQOvxB https://www.youtube.com/watch?v=SQbCwfGC7EM http://sibrdzne.ge/ot/projects/JS/budget-app/index.html Task Management (Draggable, with statuses) https://codepen.io/Tandilashvili/pen/wvyRMLE https://www.youtube.com/watch?v=m3StLl-H4CY http://sibrdzne.ge/ot/projects/JS/task-management/index.html Navigation Bar https://codepen.io/Tandilashvili/pen/WNMLwOq https://www.youtube.com/watch?v=hy2OwJE_OEA http://sibrdzne.ge/ot/projects/JS/navigation-bar/index.html Multi Step Form https://codepen.io/Tandilashvili/pen/dydwMqe https://www.youtube.com/watch?v=JFfVilQSius http://sibrdzne.ge/ot/projects/JS/multi-step-form/index.html Piano https://codepen.io/Tandilashvili/pen/GRQPXNj https://www.youtube.com/watch?v=vjco5yKZpU8 http://sibrdzne.ge/ot/projects/JS/piano/index.html Math Game (+ - * two numbers) https://codepen.io/learnwebcode/pen/mdPMBjL https://www.youtube.com/watch?v=EVze4Cq-dZ8 http://sibrdzne.ge/ot/projects/JS/math-game/index.html Word Beater Game https://codepen.io/Tandilashvili/pen/XWZxOOV?editors=1010 https://www.youtube.com/watch?v=Yw-SYSG-028 http://sibrdzne.ge/ot/projects/JS/word-beater-game/index.html Tic Tac Toe Game https://codepen.io/Tandilashvili/pen/jOZeQWw https://www.youtube.com/watch?v=B3pmT7Cpi24 http://sibrdzne.ge/ot/projects/JS/tic-tac-toe-game/index.html Snake Game (Canvas) https://codepen.io/Tandilashvili/pen/abqVXOm https://www.youtube.com/watch?v=9TcU2C1AACw http://sibrdzne.ge/ot/projects/JS/snake-game/index.html Pong Game https://codepen.io/Tandilashvili/pen/RwQEBqw https://www.youtube.com/watch?v=PeY6lXPrPaA http://sibrdzne.ge/ot/projects/JS/pong-game/index.html
by Valeri Tandilashvili
3 years ago
0
JavaScript
0
Fetch with promises
async function start() {
  try {
    fetch("https://dog.ceo/api/breeds/list/all").then(function(response) {
      return response.json()
    }).then(function(data) {
      createBreedList(data.message)
    })
  } catch (e) {
    console.log("There was a problem fetching the breed list.")
  }
}
Fetch with
async
&
await
keywords
async function start() {
  try {
    const response = await fetch("https://dog.ceo/api/breeds/list/all")
    const data = await response.json()
    createBreedList(data.message)
  } catch (e) {
    console.log("There was a problem fetching the breed list.")
  }
}
by Valeri Tandilashvili
3 years ago
0
JavaScript
The 10 Days of JavaScript
0
Affects only the first element with the specified class
.slide
document.querySelector('.slide').remove()
Removes all the elements with the specified class
document.querySelectorAll('.slide').remove()
by Valeri Tandilashvili
3 years ago
0
JavaScript
The 10 Days of JavaScript
0
The
inset
property in CSS is a shorthand for the following four properties:
top
,
right
,
bottom
and
left
.exampleText {
  position: absolute;
  inset: 10px 30px 60px 40px;
  background-color: yellow;
}
Its parent element needs to have
position
property with
relative
value
div {
  background-color: green;
  height: 200px;
  position: relative;
  color: blue;
}
by Valeri Tandilashvili
3 years ago
0
CSS
properties
0
Results: 1580