Results: 1578
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
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 გიორგი უზნაძე
10 months ago
0
JavaScript
Ajax
Promise
0
DescriptionUSE 11111111 edit 2 edit 3
asdjaosdjasiodjaio sdj 
edit 4 last line edited 6
by გიორგი უზნაძე
11 months ago
0
Bootstrap
CSS
Laravel
0
The new note
source 
code4123 new code line one more line1h
by Valeri Tandilashvili
11 months 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
11 months 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
11 months 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
11 months ago
0
PHP
0
Git tag
Git, tags are used to typically to indicate important milestones such as
releases 
or
version 
numbers. Lightweight tags:
git tag v1.0.0 // tags for previous commits (refers to the last commit)
git tag v1.0.0 <commit-hash> // tag for specific commit
Annotated tags:

git tag -a v1.0.0 -m "Version 1.0.0 release"
checkout to tag:
git checkout v1.0.0
git checkout master // to return the last commits again
Listing all tags:
git tag
Deleting a tag: // deletes only tag - not commits
git tag -d v1.0.0
Create a tag for a branch:
git tag v1.0.0 master
push tag to a remote repository
 git push origin v1.0.0
by Luka Tatarishvili
11 months ago
0
Git
commands
0
Fresh and Seed only one table/seeder
 php artisan db:seed --class=RoleSeeder
While using docker
./vendor/bin/sail php artisan db:seed --class=RoleSeeder
by Luka Tatarishvili
11 months ago
0
PHP
0
git reflog
Using the git reflog command should reveal Git's internal diary of all of the commits that HEAD has pointed to in your local repository—even the ones you thought were lost forever (assuming they weren’t old enough to have expired).
by Tinatin Kvinikadze
11 months ago
0
Git
git reflog
0
git whatchanged --since='2weeks ago'
Shows commit logs and diff output each commit introduces.
by Tinatin Kvinikadze
11 months ago
0
Git
Git whatchanged
0
Results: 1578