How do you manually open an expandable? - materialize

I want to trigger the opening and closing of a collapsible from javascript. Does anyone know how, or else does anyone know about a more complete documentation than materializecss.com?

Here is a tip:
Go here: http://materializecss.com/collapsible.html
Open your Dev tool panel (Tab: Console)
Paste this:
$('#introduction > ul > li:nth-child(1) > div.collapsible-header').click();
And hit Enter
Just to say that you only need to trigger click on the .collapsible-header class to achieve this.

Related

How to make my own Code abbreviation in intellij idea

in IDEA ,I can type soutto represent System.out.println();and I want to know how to make my own code abbreviation.For example, alias System.out.print(); to sounor any other names
This is called a Live Template in IntelliJ.
Go to File > Settings > Editor > Live Templates. From there, select Java and on the right, you'll see a plus sign. By clicking it, you'll get a 1. Live Template and that will get you a new abbreviation.
Name it soun and the text should be
System.out.print($END$);
Once you're done, make sure you've enabled that abbreviation by clicking the check box next to it.
The docs of IntelliJ cover in detail what the syntax is for these templates.
The $END$ syntax indicates the position of the cursor when the code snippet is complete, and you can no longer press Tab to jump to the next variable.
There are more variables to look at as well and other configurations to do!
Edit: there is an answer here for this question, but it looks like it doesn't necessarily answer the question asked on that post, so that's why I've decided to post a dedicated answer (tackling the issue at hand).

Intellij IDEA, how to revert operation "Remember, don't ask again"?

When I add a file in IntelliJ IDEA, it shows me a dialog 'Add File to Git', and I choose 'remember, don't ask again' by mistake. Now I want the dialog to show again. What can I do to revert this operation besides reset settings?
Try changing the following option:
Preferences > Version control > Confirmation > When files are created > Add silently.

VS Code Intellisense don't suggest snippet at first

I want to use code snippets in VSCode. But when I type, for example, for in javascript file, the Intellisense doesn't suggest snippet "for-loop" - I need to manually scroll the dropdown and select it. Is there any way to make VSCode to suggest snippets at first? Thank you!
UPD: I have found the person with same problem, but he has no answers - link
You need to use editor.snippetSuggestions config option with "top" value. Please, see Customizing IntelliSense article for more tips and tricks.
There is one more way to deal with this issue by setting
"editor.tabCompletion": true,
that way whenever there is a snnipet available it will use it automatically without even opening the list by using tab twice.
File > Preferences > Settings (Code > Preferences > Settings on Mac)
open "Editor" menu on the left
edit "editor.tabCompletion": true
more info: https://code.visualstudio.com/docs/editor/intellisense#_customizing-intellisense
Now that VS Code mostly abstracted away the settings.json file, you can do the instructions shown by Kavu, with this bonus tip:
go to Preferences > Settings
find the Search settings text input, at the top
type in "snippet"
The setting should be at the top of the result set:
Setting editor.snippetSuggestions to top only works for certain snippets: for but not foreach. With top, the snippet does appear higher in the completion list, but for some reason the keyword version is what is highlighted, with the snippet option scrolled out of view (and the scrollbar quickly fades, giving the impression there's nothing hidden)
The editor.tabCompletion to true approach works for both for and foreach.

Intellij 12 Code Completion ShortCut

I just started using Intellij 12, and I cannot get Code Completion to work. According to the manual, I should be able to hit enter or tab to select the suggestion. For example, if write the code below, a suggestion box shows up showing a couple of suggestions (put, putAll). How do I actually select one of those? Very frustrated. Thanks.
map.put
Try up and down cursors to select one and then hit enter.
In addition to the answer #user1888440 provided, you may want to look at the "Preselect the first suggestion" option in File > Settings > [IDE Settings] > Editor > Code Completion. When on that settings page, click the Help button to see the an explanation of the different options for the "Preselect the first suggestion" option.

Eclipse Plugin Development: Adding a menu on right click on Tab of editor

When we right click on a tab of an JavaEditor in eclipse, we get three options
1. Close
2. Close Others
3. Close All
I wanted to add an extra menu like this:
1. Close
2. Close Others
3. Close All
4. Open File in Folder
After my own study I was able to locate the command/handler that does these operations in the org.eclipse.ui plugin. But I wasn't able to view the menu contributuion anywhere.
Specifically My questions are:
How can I add the 4th menu option in the popup menu?
In which plugin is the menuContribution that actually displays those 3 menus when I right click on a tab?
I have attached the screenshot of the closeOthers command in te plugin editor..Hope it makes my question clear.
There is a bug about this: Bug 103045. As you can see from the bug's history, it has not been solved, but there seems to be a workaround written there. Good luck.