Per the great bloggers, it helps your cause to put your message in a box But, how? I mean, easily? :) Do it once (use these steps, which I got from chatGPT) and, once you have a blog that you can look at in edit mode, you can always cut and paste. Go into Edit HTML mode. If necessary, use a tool like freeformatter.com to make the HTML that your blogging platform creates for you readable (with indentation, etc). Now, locate the text you want to enclose in a box and surround it with : <div style="border: 2px solid COLOR_OF_CHOICE; padding: 10px;"><p><span style="font-family: FONT_OF_CHOICE;"> and </span></p> </div> NOTE : With very little text, you may benefit from adding : display: inline-block; max-width: max-content; //within the style setting For chatGPT: (click to select) When I say 'FORMAT,COLOR,WIDTH,PAD:', followed by some text, please generate HTML tags that ...
Click to Copy with a Toast Message (No Alert) Here’s how you can display code like the one below: hiSetBindKey("Schematics" " F5" "hiDeiconifyWindow(window(1)) && hiRaiseWindow(window(1))") ...and allow users to: Click the code to copy it to clipboard See a small toast saying Copied! next to the label All without triggering an alert box 🔧 Full HTML + CSS + JS (Paste in a blog post) This version is safe even with quotes and parentheses — it programmatically sets the text to avoid HTML escaping issues. <style> .copy-container { position: relative; margin: 1.5em 0; } .copy-label { font-weight: bold; margin-bottom: 0.4em; } .copy-text { display: inline-block; padding: 0.5em 0.8em; border: 1px solid #ccc; background: #f4f4f4; font-family: monospace; white-space: pre-wrap; cursor: pointer; user-select: none; transition: background 0.2s ease; } .copy-text:h...
Computing the new average by going over the entire box for each pixel is obviously wrong.. you should subtract the edge column that's leaving and add the one that's entering the box.. but, at least, it works 😊 https://codepen.io/chipdesigner/pen/YzONwOo function doBlur(){ var w = img.getWidth(); var h = img.getHeight(); var x,y; var imgBlur = new SimpleImage(width=img.getWidth(), height=img.getHeight()); var p, pb, pij, avgR,avgG,avgB,total; for( p of img.values() ){ avgR = 0; avgG = 0; avgB = 0; total = 0; x = p.getX(); y = p.getY(); for( let i = Math.max(0,x-BOX); i <= Math.min(w-1,x+BOX);i++ ){ for( let j = Math.max(0,y-BOX); j <= Math.min(h-1,y+BOX);j++){ pij = img.getPixel(i,j); avgR += pij.getRed(); avgG += pij.getGreen(); ...
Comments
Post a Comment