1,947
questions
1
vote
0
answers
41
views
nvim snippets how to create custom peace of codes
I try to write some custom snippets. For that I install and configure Luasnip in my nvim.cmp. Also installed rafamadriz/friendly-snippets
So far it is ok; means autocompletion shows snippets from ...
0
votes
0
answers
38
views
I need to send more than one value to another form using formidable forms in wordpress
please excuse me I'm new here and I am not a coder at all. I have a wordpress website using formidbale forms, and I want to create entries in form B when form A is submitted. I stumbled across this ...
0
votes
1
answer
40
views
Snippets stopped working after updating Visual Studio
I have just updated Visual Studio 2022 from version 17.10.6 to the latest version (17.11.2) and noticed that my C++-snippets stopped working.
To make sure, I tested it on my laptop with the same ...
0
votes
0
answers
58
views
VS Code editor not able to ignore comment lines
I am using Visual Studio Code for writing Latex documents, using snippets both in math environment and global environment, with different triggering methods. However, if I write a comment in Latex ...
0
votes
0
answers
12
views
Cannot determine classpath for Ivy Jar for Gradle task wrapping Ant build
I have a library built with Ant, which uses Ivy for dependency management. Feel free to see repo branch.
I would like to make the library a gradle project, and wrap the Ant build in a gradle build ...
-1
votes
0
answers
47
views
Looking for code to export a SQLite3 database in Android 13 and Java
I'm hoping someone can provide a code snippet to show how to export my Android app's SQLite3 database to the Download or Documents directory on the phone. I'm wanting Android 13 and Java (11). I've ...
0
votes
1
answer
23
views
ACF get_field not returning value inside function with foreach loop
I have a function that loops all Woocommerce subcategories for the current category. Inside the subcategory loop there is an advanced-custom-field that is supposed to display an icon. But I do ...
0
votes
0
answers
17
views
sending sms to dokan vendors on order processing status [duplicate]
This snippet hooks into the WooCommerce order status change event and sends an SMS to each vendor associated with the products in the order. The SMS will notify the vendor of the new order and prompt ...
1
vote
1
answer
46
views
Is there a way to generate all public members object initializer in vs code?
I'm looking for behaviour similiar to JB Rider. When contructing object through initializer there's an option to generate all public property assignments. Is there a way to add this feature to vs code?...
0
votes
1
answer
31
views
How can I make hashing algorithm for code snippets?
I would like to make an algorithm, which can detect code snippets when iterating through source codes, based on some hashing algorithms.
So for example, here is that short code snippet from a fragment ...
1
vote
0
answers
8
views
Embedding promotion text into article at diffrent points
We have promotional text (text A) that we want to embed into in article (text B) at specific different points, e.g. at 25% or 50% etc. The problem is, after adding it, text A is not displaying in text ...
0
votes
0
answers
33
views
Macros, Code Snippets, or even Keyboard Shortcuts not working in Visual Studio 2008 for C++
I am working in Visual Studio 2008 and cannot update due to constraint of my software compatibility issue. I search everywhere on the Internet, read many posts here as well, but no solution found to ...
1
vote
0
answers
61
views
What are the effects of "Show new snippet experience (experimental)" setting in Visual Studio 2022?
Recently, I have encountered a new option in Visual Studio 2022 "Show new snippet experience (experimental)" setting in Visual Studio 2022?".
It is located in the VS Options: "Text ...
0
votes
0
answers
14
views
I am having issues to get the piece of code in my snippet whith the html labels
This is my snippet and what I hope to get when I write "html-em" in my html file:
{
"HTML EM template": {
"prefix": "html-em",
"body": [
...
0
votes
1
answer
36
views
"Code Snippets" snippet does not work for `big_image_size_threshold` setting
I have WordPress 6.5.2, "Code Snippets" plugin 3.6.4 installed and following snippet code:
add_filter( 'big_image_size_threshold', '__return_false' );
but it does not work, WordPress still ...
0
votes
0
answers
28
views
Retrive the value of the Active variation of the product and then link it to the "read more" to dynamically change
Here is the code snippet where Only the tab description is attached to the "Read-more". How to make it dynamically change based on the currently active value of the Variation - material ...
0
votes
0
answers
187
views
Add custom VSCode style snippets to NVChad
Using Neovim with NVChad.
I have read the documentation but can't get it to work unless I add my custom snippets to the default friendly-snippets folder.
According to the NVChad docs:
-- vscode format ...
-2
votes
1
answer
97
views
Code Snippet for Add to Cart Redirect only works for the Add to Cart Button in SINGLE PRODUCT PAGE
The code snippet for redirecting the add to cart to the checkout page only works when I press the add to cart on the SINGLE PRODUCT PAGE. It does not work when I click the add to cart button on the ...
0
votes
0
answers
12
views
Snippet - Change Add to Cart Button
I need a snippet code to change add to cart button to below text (if the product is on back order:
Back Order (1-5 weeks to arrive)
Do anyone knows how to make the snippet!
What I need is the below:
...
0
votes
0
answers
24
views
neovim making snippets write in lua with nvim_set_keymap
i want to set keymap for lua to be sinppets for example:
vim.api.nvim_set_keymap("n", "<leader>rs", ":call append(line('.'), [[welcome]])<CR>")
and now i ...
0
votes
0
answers
48
views
WooCommerce Add to cart issue
I have been trying to add a custom functionality via code snippet to my WooCommerce product page, there are two error in the logs :
ajax-single-add-to-c….min.js?ver=2.2.9:1POST https://...
0
votes
0
answers
67
views
VS Code react-bootstrap quick import and snippet not showing
Why is my react-bootstrap snippets suddenly not showing? I was working on a project with React JS and the react-bootstrap element suggestions are displaying fine. However just recently, it stopped ...
0
votes
1
answer
41
views
jMeter - How to escape quotes?
I need help to escape quotes in jMeter!
I've to put into a var some words with quotes, for example "dummy", so I've tried with:
vars.put("example", '"dummy"')
vars.put(&...
0
votes
0
answers
31
views
How do I remove and replace line breaks from my clipboard while using snippets in Visual Studio Code?
I am planning to replace every line break in my clipboard with a space, followed a vertical bar and then another space.
For instance, if my clipboard has the following text:
My
Clipboard
Content
the ...
2
votes
3
answers
145
views
Auto delete old posts using Snippets for special category
Dears,
I want to delete the old post automatically without using a plugin and the Snippets will be the choice, I want to delete any post older than one day from a special category an using this ...
1
vote
1
answer
216
views
Snippet of current time in nvim
I'm trying to create a snippet for vimwiki. The snippet must change __ to current time.
local line_begin = require("luasnip.extras.expand_conditions").line_begin
return {
s(
{...
0
votes
0
answers
45
views
Woocommerce sort products by multiple meta keys
I'm adding extra sorting options for products, like by sku, or stock status.
It works, but I would like to have a sorting result by multiple meta keys: all the products in stock must appear before the ...
0
votes
0
answers
22
views
Can you create custom VS Code snippets variables? [duplicate]
According to the VS Code documentation: snippets variables , one can use certain variables to properly customize the snippets. They also work with Transformations, which make the custom snippets even ...
0
votes
1
answer
43
views
How can I apply a Postfix Completion to an expression separated by spaces in PyCharm
I'm new in PyCharm IDE and I'm now personalizing my code snippets (Live Templates | Postix Completion) but don't know the syntax and limits of which.
I've seen there is a Postfix Completion whose ...
0
votes
1
answer
82
views
PHP Code Snippet Not Working in CartFlows (WooCommerce Plugin)
I followed THIS tutorial to change the coupon field and button text, using the following script in a Code Snippet:
/**
* Change the CartFlows Coupon Field text and Button text.
*
* @param array $...
0
votes
1
answer
21
views
Sublime text snippet : how to define choices as value?
is there a solution to create a snippet in sublime text where the value can have several methods (choices) . For example , in Python a list can have multiple methods (append , clear , copy) .
It's ...
1
vote
1
answer
136
views
Unexpected token error while using javascript snippet with WPCode in wordpress
I am trying to add custom javascript into my website for a widget on wordpress using the wpcode plugin but I keep getting an unexpected token error. There is a already created that isn't accessible ...
0
votes
0
answers
262
views
Descriptive auto-complete comments for python in Visual Studio Code
In VSCode for C++ by typing /** then "enter" it will produce an 'intelligent' comment block depending on whether it is the file header or a function descriptor. In the following code block, ...
1
vote
0
answers
372
views
How can i add a css code snippet to vs code
is there any possibility to add a css code snippet that contains multiple elements or tags with their styles in vs code.
i already have an idea about the basic way that adds just the properties and ...
0
votes
0
answers
34
views
Using MJML in conjunction with Litmus Builder / partials and snippets
I'm wondering if anyone has some insight on this topic. My team and I have been using MJML to create a large library of emails. Everyone is trained to use MJML, but I'm thinking about re-factoring ...
2
votes
1
answer
1k
views
Neovim nvim-cmp and LuaSnip: Tab Key Not Navigating Completion Menu or Expanding Snippets
I'm working on setting up my Neovim configuration for development, specifically focusing on integrating nvim-cmp for autocompletion and LuaSnip for snippet support. However, I'm encountering an issue ...
0
votes
0
answers
89
views
How to create custom snippets in Visual Studio 2022 for Blazor files (*.razor)
Is there a way that I can create my own custom snippets for Blazor files in Visual Studio 2022? I'm able to create custom snippets for C# using <Code Language="CSharp"> in the .snippet ...
0
votes
1
answer
83
views
Is it possible to use html snippets inside of Razor (cshtml) pages in ASP.NET MVC
I tried so many ways but I didn't achieve to do it . I can't use html snippets inside of cshtml razor page and it sucks.I don't wanna use VS Code to write ASP.NET MVC because I'm used to use Visual ...
0
votes
1
answer
231
views
Color Swatch Display Issues on Shopify Store: Image Integration
I have a color metafield on my shopify store, where inserting a specific color should reflect on both the website and phone devices simultaneously. Each color swatch is associated with an image tile ...
1
vote
0
answers
43
views
How can I hide or override built-in code snippets?
I edit the built in code snippet propdp for personal preferences. My problem is that Visual Studio updates reset the edited propdp to its default.
I could add a custom snippet with the same shortcut ...
0
votes
2
answers
126
views
Is there a way to refresh a webpage using only javascript and browser DevTools?
Problem -Browser Out of Memory
I am in charge of a browser (Edge) tab that runs a Grafana dashboard playlist 24/7 to track stats. After an unpredicted period of time, the tab will show the "Out ...
0
votes
0
answers
20
views
Custom Snippet, if first choice is "this" then second choice has to be "this"
I have a little question about custom code snippets. Is it possible to make multi choice snippets have if conditions?
So if you chose "Level" in the first choice you can only pick "...
-1
votes
1
answer
237
views
Hide the Default Edit button in Wordpress Page and Post types
I a couple of WordPress sites that uses Elementor Page builder. Currently, when I go to Pages, Posts, or custom post types, I see two Edit buttons. One for WordPress editor another for Elementor.
I ...
0
votes
0
answers
58
views
Change order of products out of stock on Woocommerce
I was using the code below to order the products by stock.
But I don't know why it stops working, I can't remember if it was related with 8.4.0 update or Elementor maybe, but I'm using normal archieve ...
0
votes
0
answers
123
views
Wordpress open accordion code snippet. Request failed with status code 418 on dreamhost
I am very new to javascript and php.
I am trying to write script in the Code Snippets plugin for a wordpress site to make anchor links to accordions open the accordion.
For example, the URL https://...
0
votes
0
answers
25
views
Drupal 9 - Load library from code snippet module
I am stuck on an issue. I have installed codesnippet module in Drupal 9. I am aware that we have to upload this into /libraries root folder.
My problem is that on on my local dev environment, it is ...
0
votes
0
answers
22
views
How to create a Visual-studio shortcut "con+tab" for console.log
how can i create a snippet or shortcut under VISUAL STUDIO so when i write "con"+tab" it edits and completes console.log on Visual Studio
i'd want it to be re usable on every project ...
0
votes
0
answers
20
views
How to run code snippets in PyCharm like in Devtools in browsers? [duplicate]
In devtools, you can add snippets and run them instantly:
screenshot with devtools code snippets
How to do something like this in PyCharm? *Without creating a project
I try google it and check PyCharm ...
0
votes
0
answers
97
views
Automatic Birthday Notification on User's Birth Date
I have a WordPress and BuddyPress website. And I want to be able to send a Birthday Greeting to my users on the day of their Birthday.
I have this Code:
// Add this code to your theme's functions....
0
votes
0
answers
60
views
How to display a thumbnail of product variation in custom table? I just make a custom variation table in woocommerce
I created a custom variation table in WooCommerce, and I need to display product variations thumbnails in that custom table.
What is it the right way?
What is the code to create this?
Here is a ...