Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
control how a webpage is displayed on different devices by adjusting the width and initial zoom level of the viewport to match the device's screen size
<meta name="viewport" content="width=device-width, initial-scale=1">
width=device-width
- sets the width of the viewport to be equal to the width of the device's screen. This ensures that the webpage adapts and fills the entire width of the device, regardless of its specific screen size or resolution.
CSS media query
works properly with any device by setting device width to viewport
initial-scale=1
- sets the initial zoom level when the webpage is first loaded. A value of 1 means that the webpage will be displayed at a 1:1 ratio, without any zooming or scaling applied
by Valeri Tandilashvili
2 years ago
0
HTML
meta tags
0
Difference between route:clear and route:cache
php artisan route:cache
This command will generate a cached version of our routes. Once the routes are cached,
Laravel
will use the cached version instead of parsing and compiling the routes on each request, which helps to improve the overall performance of your application When we make changes to our routes, we need to regenerate it to reflect the updated routes
php artisan route:clear
This command will remove the cached routes, and the application will revert to parsing and compiling the routes dynamically
by Valeri Tandilashvili
2 years ago
0
Laravel
0
cURL Request example
Makes
cURL
request To
http://10.0.0.1/api/sms?PersonalID=19011111114
With headers: Channel-Name:
SMS
Authorization:
9s2EkGCDhv3eVwQY5BPSc
curl -H "Channel-Name: SMS" -H "Authorization: 9s2EkGCDhv3eVwQY5BPSc" "http://10.0.0.1/api/Sms?PersonalID=19011111114"
by Valeri Tandilashvili
2 years ago
0
Linux
0
strtotime
The following expressions return the same time
echo strtotime("2031-05-28T00:00:00").PHP_EOL;
echo strtotime("2031-05-28 00:00:00").PHP_EOL;
echo strtotime("2031-05-28").PHP_EOL;
The result is:
1937692800
1937692800
1937692800
by Valeri Tandilashvili
2 years ago
0
PHP
0
Make sure to await ajax promise before reloading page in FIrefox
Make sure to await the resolved promise in Firefox before u refresh, redirect the page or window.history.back() or you might encounter some weird buggy scenarios where the promise javascript error is shown after the page reload for example
let requestPromise = return new Promise(function (resolve, reject) {
    $.ajax({
      url: url,
      type: "POST",
      data: data,
      // ...
      success: function success(response) {
        resolve(response);
      }
     // ...
    })
});
you need to make sure to await this promise inside
async function
before any page reload is executed
async function waitResponse(request_promise){
  let response = await request_promise;
  if(response.success == true){
        // DO WHATEVER YOU WANT WITH THE RESPONSE
        window.history.back(); // <--- and after that u can reload or go back to page or whatever
    }
  }
}

waitResponse(requestPromise);
by გიორგი უზნაძე
2 years ago
0
JavaScript
Ajax
Promise
0
DescriptionUSE 11111111 edit 2 edit 3
asdjaosdjasiodjaio sdj 
edit 4 last line edited 6
by გიორგი უზნაძე
2 years ago
0
Bootstrap
CSS
Laravel
0
The new note
source 
code4123 new code line one more line1h
by Valeri Tandilashvili
2 years ago
0
CSS
1
12<img src="https://sibrdzne.ge/d1_images/logo.png" alt="Logo" class="image">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam a nunc at ante eleifend tempor. In vel ullamcorper tellus, et vulputate metus. Integer pulvinar, ipsum in efficitur fringilla, dolor lacus sollicitudin tortor, vitae tincidunt nunc elit id ipsum. Proin laoreet, est ut placerat sollicitudin, lectus mi pellentesque est, vel accumsan velit sem id felis.
<p>New P</p>
by Valeri Tandilashvili
2 years ago
0
CSS
0
$password = "your_password";
Hash the password with cost factor
9
$start9 = microtime(true);
$hash9 = password_hash($password, PASSWORD_BCRYPT, ['cost' => 9]);
$end9 = microtime(true);
$executionTime9 = $end9 - $start9;
Hash the password with cost factor
10
$start10 = microtime(true);
$hash10 = password_hash($password, PASSWORD_BCRYPT, ['cost' => 10]);
$end10 = microtime(true);
$executionTime10 = $end10 - $start10;
Calculate the speedup factor
$speedupFactor = $executionTime10 / $executionTime9;

// Display the hashed passwords, execution times, and speedup factor
echo "Hashed password with cost 9: " . $hash9 . "\n";
echo "Execution time with cost 9: " . $executionTime9 . " seconds\n\n";
echo "Hashed password with cost 10: " . $hash10 . "\n";
echo "Execution time with cost 10: " . $executionTime10 . " seconds\n\n";
echo "Speedup factor (9 vs 10): " . $speedupFactor . " times faster\n";
by Valeri Tandilashvili
2 years ago
0
PHP
Password hashing
0
$start = microtime(true);

sleep(3);
// Your script code here

$end = microtime(true);
$latency = round($end - $start, 2);
echo "Script execution time: " . $latency . " seconds";
The
round
function will round the result to
2
decimals
by Valeri Tandilashvili
2 years ago
0
PHP
0
Results: 1578