| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| <?php | |
| namespace App\Console\Commands; | |
| use App\Models\User; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\Validator; | |
| class CreateUser extends Command | |
| { |
The screenshots were taken on different sessions.
The entire sessions are included on the screenshots.
I lost the original prompts, so I had to reconstruct them, and still managed to reproduce.
The "compressed" version is actually longer! Emojis and abbreviations use more tokens than common words.
| // Get the UTM parameters from the URL | |
| var search = window.location.search; | |
| var params = new URLSearchParams(search); | |
| // Keep track of if an event has already been logged | |
| var eventLogged = false; | |
| // Loop through each UTM parameter | |
| for (var [key, value] of params.entries()) { | |
| // Check if the parameter is "utm_source", "utm_medium", "utm_campaign", "utm_term", or "utm_content" |
Create an empty git repo or reinitialize an existing one
git init| //Pete's tracker | |
| function petesTracker(action,category,label) { | |
| window.uetq = window.uetq || []; | |
| window.gtag = window.gtag || []; | |
| window.fbq = window.fbq || []; | |
| window._paq = window._paq || []; | |
| if (typeof gtag != "undefined") { | |
| gtag('event', action, {event_category: category, event_label: label}); |
| // JS for grabbing utm params and parsing into url | |
| var getRefQueryParam = function() { | |
| var temp = {}; | |
| document.location.search.replace(/\??(?:([^=]+)=([^&]*)&?)/g, function() { | |
| var decode = function(s) { | |
| return decodeURIComponent(s.split("+").join(" ")); | |
| }; | |
| temp[decode(arguments[1])] = decode(arguments[2]); | |
| }); | |
| return temp; |
| <?php | |
| namespace Mpociot\BotMan\Drivers; | |
| use Mpociot\BotMan\Answer; | |
| use Mpociot\BotMan\Message; | |
| use Mpociot\BotMan\Question; | |
| use Illuminate\Support\Collection; | |
| use Symfony\Component\HttpFoundation\Request; | |
| use Symfony\Component\HttpFoundation\Response; |
| import 'package:flutter/material.dart'; | |
| import 'theme.dart' as Theme; | |
| void main() { | |
| runApp( | |
| new MaterialApp( | |
| title: 'CompanyApp', | |
| color: Theme.CompanyColors.blue[500], | |
| theme: Theme.CompanyThemeData, | |
| home: new Scaffold( |
| <?php | |
| Blade::directive('active', function ($expression) { | |
| return "<?php echo active_url($expression); ?>"; | |
| }); |