Recent Questions

متن مرتبط با «dell xps laptop not powering on» در سایت Recent Questions نوشته شده است

GitHub patch release previous version

  • On Github you way from time to time need to patch release the previous version of a published release.  This took me longer than I care to admit to understand the steps involved. Hence I'm documenting them in this post. Step 1: Check out the branch corresponding to the previous version of your code. git checkout 7.3.0 Step 2: Fix the bug in the code. Let's say it's a breaking change that's been fixed in the code. Step 3: Commit the changes with a version number that indicates the patch release. Commit the fix git commit -m "Fix bug in 7.3.0" Next, create a new tag git tag 7.4.0 Step 4: Push the changes to the remote repository. git push origin 7.4.0 Step 5: Create a new release for the patch version on GitHub. Navigate to the main page of the repository on GitHub.com, click on the Releases tab, and then click on the "Draft a new release" button. Step 6: Fill in the details for the release in the form, select the tag created from Step 3, and fill in the release notes. Once you have filled in the details, click on the "Publish release" button to publish the release. بخوانید, ...ادامه مطلب

  • How to disable Laravel console commands

  • Suppose you find yourself in a situation where you need to disable or intercept a console command in Laravel. This tutorial will primarily focus on how to intercept the php artisan migrate command. We'll delve into the command method app/Console/Keel.php and explore how to prevent the migrate command from executing any actions. Inside the command method of app/Console/Keel.php In Laravel 11 use routes/console.php Intercept command You can intercept php artisan migrate and, instead, catch it and use a closure. Artisan::command('migrate', function () { // }); This would essentially stop the migrate command from doing anything. You could then print a message out: Artisan::command('migrate', function () { $this->info('Command NOT AVAILABLE. Use this: php artisan app:migrate'); }); Running an alteative command: To run a different command: Artisan::command('migrate', function () { $this->call('app:migrate'); }); In this case, a new command called app:migrate would be executed. Run command with a --path option: Artisan::command('migrate', function () { $this->call('app:migrate', [ '--path' => 'database/migrations' ]); }); Now when running php artisan migrate you will get an error: The "--path" option does not exist. The reason for this is the custom command does not have a path option. Lets create the command and add the option. Create a command: php artisan make:command AppMigrate This creates a class called AppMigrate.php inside, ...ادامه مطلب

  • I'm writing a new Laravel book on testing called Laravel Testing Cookbook

  • Laravel Testing Cookbook will cover common use cases and will be ready in a few months time. Sign up for the waitlist to be notified when it's ready! The book will cover both PestPHP and PHPUnit. Use the book as a reference for practical examples of testing URLs, Forms, Interactions, Transactions, using third-party API's and more. Join the waitlist or pre-order at https://laraveltestingcookbook.com/ بخوانید, ...ادامه مطلب

  • Running Docker on M1 Mac - docker: compose is not a docker

  • When upgrading from an Intel mac to an Apple Silicone I noticed docker fails to run. I'm using Laravel Sail when Sail is installed or when a sail up command is attempted I get an error:  docker: 'compose' is not a docker command The reason for this is a docker-compose is now a plugin. Docker needs docker-compose to be installed. Use brew to install docker-compose brew install docker-compose Once installed sail will function normally without any extra setup. بخوانید, ...ادامه مطلب

  • Use PHP to generate table of contents from heading tags

  • I wanted to create a table of contents from the post's heading tags automatically without having to change the headings like adding an id or anchor. I started to look at existing solutions and came across this custom function on Stackoverflow by sjaak-wish function generateIndex($html) { preg_match_all('/<h([1-6])*[^>]*>(.*?)</h[1-6]>/',$html,$matches); $index = "<ul>"; $prev = 2; foreach ($matches[0] as $i => $match){ $curr = $matches[1][$i]; $text = strip_tags($matches[2][$i]); $slug = strtolower(str_replace("--","-",preg_replace('/[^da-z]/i', '-', $text))); $anchor = '<a name="'.$slug.'">'.$text.'</a>'; $html = str_replace($text,$anchor,$html); $prev <= $curr ?: $index .= str_repeat('</ul>',($prev - $curr)); $prev >= $curr ?: $index .= "<ul>"; $index .= '<li><a href="#'.$slug.'">'.$text.'</a></li>'; $prev = $curr; } $index .= "</ul>"; retu ["html" => $html, "index" => $index]; } This will generate a list of links based on the headings. To use the function call it and pass in your content, then specify the array key to use. html for the body and index for the table of contents. Table of contents: toc($post->content)['index'] Content: toc($post->content)['html'] بخوانید, ...ادامه مطلب

  • Expression Web Tutorial: How to Design a Website with Microsoft Expression Web

  • Microsoft's free web editor is a sophisticated WYSIWYG web editor with many features usually only found in commercial offerings (and no wonder, since it was previously something you had to buy). This tutorial series takes you through the process of designing a fully functional multi-page website with Expression Web., ...ادامه مطلب

  • [Updated] BlueGriffon Tutorial: Design a website using the open source BlueGriffon web editor

  • The entire BlueGriffon Tutorial has been updated for the version 3 series of BlueGriffon. Those thinking of using it to create a website can find the complete series online., ...ادامه مطلب

  • What To Do If You Do Not Own Your Website's Domain Name

  • What if someone else owns the domain on which your website sits? For example, as it was in the case of one of my visitors, someone may have bought the domain for you, and retained ownership of it. Or perhaps your website is on a free web host, or a blog host, and you are using the web address given to you by them. This article deals with how you can solve that problem (or potential problem)., ...ادامه مطلب

  • How to Insert a Bullet Point (Unordered) List with BlueGriffon

  • This article shows you how to insert a bullet point list (where each item on the list is marked with a solid black circle rather than numbered) into a web page using the BlueGriffon web editor., ...ادامه مطلب

  • How to Draw a Rectangular Box Around Your Content in BlueGriffon

  • This article deals with how to use the BlueGriffon web editor to draw lines around text and/or images on a web page, so as to put them into a box, setting them apart from their surrounding content. , ...ادامه مطلب

  • How to Add an Audio or Music File to a Web Page with BlueGriffon

  • BlueGriffon has built-in facilities for you to insert an audio clip or music file into your web page. This article shows you how to use it., ...ادامه مطلب

  • How to Change the Colour (Color) of Links on a Web Page with BlueGriffon

  • There may be times you need to change the default colour of a link on your web page, for example, because the background colour clashes with it or renders it nearly invisible. This article shows you how to do it using the free BlueGriffon web editor., ...ادامه مطلب

  • How to Change the Colour (Color) of Links on a Website with Expression Web

  • This article deals with how to change the colour of the links on a web page using the free Microsoft Expression Web editor. It also addresses how you can change the colour of a link that has been clicked, as well as its colour when a mouse pointer is hovering over it., ...ادامه مطلب

  • [Updated] How to Add a CAPTCHA Test to Your Feedback Form Script: Reducing Spam in Your Contact Form

  • The article on how to add a CAPTCHA to your contact form has been updated to include information on how you can use the newest CAPTCHA option (the one that potentially pays you for using them) of the Feedback Form Wizard. , ...ادامه مطلب

  • [Updated] Free Feedback Form Wizard: new CAPTCHA option for reducing spam

  • The Feedback Form Wizard has been updated to include an additional CAPTCHA option. This one is not only free, it apparently even pays you when your visitors solve the CAPTCHA challenges. For those wondering, CAPTCHAs are those "I am not a robot" or "I am human" checkboxes on forms, used to make sure that a human is at the helm, and not some spam robot., ...ادامه مطلب

  • جدیدترین مطالب منتشر شده

    گزیده مطالب

    تبلیغات

    برچسب ها