Search
new [^\(](null, ([^,]+), ("[^"]+").?(?:\r)
Replace
[$2] = $0z
Against
// Add non-existing bar to page | |
let buttonPanel = `<div><div class="landing-filters" style="display: flex; | |
align-items: baseline;"><h2 style="font-size: 17px; margin-right: 10px">Filament Diameter:</h2> | |
<div class="button-group"><button class="filament-button filament-175-button" onclick="showItems('1.75mm')">1.75mm</button><button class="filament-button filament-300-button" onclick="showItems('2.85mm')">2.85mm</button></div></div></div>`; | |
let newItem = $('<div>').addClass('.product-collections-header'); | |
$('.main').prepend(newItem); | |
newItem.html(buttonPanel); |
def count_upper_words(str): | |
words = str.split(' '); | |
print('\n\n---- %s ----' % str) | |
return sum([word.isupper() for word in words]) | |
print(count_upper_words('Fast')) | |
print(count_upper_words('SLOW')) | |
print(count_upper_words('first MIDDLE Last')) |
def capital_chars(word): | |
return [c.isupper() for c in word] | |
def analyze(str): | |
has_words = ' ' in str | |
if has_words: | |
words = str.split(' '); | |
for word in words: |
import os | |
from os import path | |
def import_settings(file_path): | |
with open(file_path) as gcode_file: | |
all_lines = gcode_file.readlines() | |
# Filter to comments with equals | |
comments = [comment for comment in all_lines if comment.startswith('; ') and len(comment.split('=')) == 2] |
import os | |
from os import path | |
def import_settings(file_path): | |
with open(file_path) as gcode_file: | |
all_lines = gcode_file.readlines() | |
# Filter to comments with equals | |
comments = [comment for comment in all_lines if comment.startswith('; ') and len(comment.split('=')) == 2] |
// https://octicons.github.com/ | |
jQuery('.js-icon-item').each(function(f) { | |
var el = $(this); | |
el.attr('title', el.attr('data-name').replace('octicon-', '')); | |
}); | |
Search
new [^\(](null, ([^,]+), ("[^"]+").?(?:\r)
Replace
[$2] = $0z
Against
docker run -it ubuntu | |
apt install wget | |
apt install zip | |
# perform the download - stackoverflow:https://stackoverflow.com/questions/23446635/ | |
wget -r -np -nH --cut-dirs=3 -R index.html https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/ | |
# zip the content | |
cd /samples/svg-files | |
zip -r svg.zip . |
string filePath = Path.Combine(path, mode + ".json"); | |
var theme = JsonConvert.DeserializeObject<ThemeSet>( | |
File.ReadAllText(filePath); | |
if (theme.AccentColors == null || theme.AccentColors.Count <= 0) | |
{ | |
theme.AccentColors = this.Colors; | |
File.WriteAllText( | |
filePath, |
foreach(var mode in item.Value.Modes) | |
{ | |
string directory = $@"c:\temp\themes\{item.Key}"; | |
Directory.CreateDirectory(directory); | |
var theme = item.Value.GetTheme(mode, item.Value.DefaultColor); | |
theme.ThemeName = $"{item.Key} {mode}"; | |
File.WriteAllText( | |
Path.Combine(directory, $"{item.Key}-{mode}.json"), |