Dropdown with hypelink in title that displays contents on click - dropdown

I'm looking a way to display the text to appear down from a hyperlink. In the current page I need to include links to different pages, website links, link to text to same page once the link is clicked it will expand down.
I'm able to achieve the same using below code using sphinx-panels.
* `Web Interface <https://example.com>`__
.. dropdown:: * Software Stack
Line1
Line2
.. code:: bash
$ some commands
Here I'm actually looking the hyperlink should be in same format. But in my code, you can the second one is a dropdown link. This looks my overall looks of that page is not perfect.

Using the sphinx-design extension this can be achieved by writing the hyperlink directly into the directive argument, in your example if you write:
.. dropdown:: `Web Interface <https://example.com>`__
*Software Stack*
Line1
Line2
.. code-block:: bash
$ some commands
You get a dropdown with a clickable hyperlink in the title that expands and collapses the dropdown (usually directives don't allow hyperlinks in the argument but .. dropdown:: supports it). Any further styling would have to be done using custom CSS and setting one of the class properties on the directive.

Related

toctree dropdown menu

I want to get a dropdown menu when listing pages in Sphinx. I am using toctree.
But when this list appears, all the subsections also appear in the list. Is there a way to either:
Get a dropdown menu or
Not show the subsections
If you want to make a dropdown you can use the dropdown directive.
.. dropdown:: Dropdown menu title
Dropdown text only
Dropdown text with an internal link :doc:`directory/file_name`
Keep in mind that in order to use the dropdown directive, you will need to install the dropdown directive by running pip install sphinx-panels in your environment.
Make sure to also add 'sphinx_panels' to your extensions inside of your conf.py file.
You can find more examples for how to do that here

Abbreviations in PhpStorm

IntelliJ comes with 2 abbreviations that I have used a lot in the past, but cannot find in PhpStorm:
iter Iterate (for each..in)
itar Iterate elements of array (traditional loop)
So whenever I typed iter and pressed tab, it generated an enhanced for-loop. How can I achieve this in PhpStorm?
PHPStorm has live template so you can use it to generate several types of code snippets.
Live templates can be used to insert frequently-used constructs into your source code, for example, loops, conditions, various declarations, print statements, tags, and so on. To expand a code snippet, type the corresponding template abbreviation and press Tab. Keep pressing Tab to jump from one variable in the template to the next. Press Shift+Tab to move to a previous variable
I think this link is useful and also suggest that you read this link
for creating a new snippet you can go settings > Editor > Live Template

How can I enter a literal <TAB> character in IntelliJ/IDEA/PyCharm?

My configuration indents with four spaces, and I want to keep that. Occasionally (e.g. in a Makefile) I want to input a literal TAB character.
How can I force the IntelliJ-IDEs to input a tab or space, when it would not do so when I hit tab or space in that instance?
You seem to be asking two questions here:
1. How do I force IntelliJ IDE to input a tab, when it would not do so when I hit tab?
and
2. How do I force IntelliJ IDE to input a space, when it would not do so when I hit space?
I don't understand how the second case can arise. However, I have provided a solution to it as well.
Case 1. Insert a tab character when an IntelliJ IDE wants to replace it with spaces due to configuration
Solution
Use search and replace.
Details
Place the cursor where you want the tab to be
Press the X key
Select the X you just typed
From the main menu, choose Edit | Find | Replace to bring up the search and replace pane
Make sure there is an X in the search field
Enter \t in the replace field
Be sure the option Regex is checked
Be sure the option In Selection is checked
Click the Replace button
Case 2. Insert a space character when an IntelliJ IDE won't just let you type one (???)
Solution
Use search and replace.
Details
Place the cursor where you want the space to be
Press the X key
Select the X you just typed
From the main menu, choose Edit | Find | Replace to bring up the search and replace pane
Make sure there is an X in the search field
Enter a single space into the replace field
Be sure the option In Selection is checked
Click the Replace button
Install the plugin for Makefile support: https://plugins.jetbrains.com/plugin/9333-makefile-support
When I tried it today, this automatically use hard tabs in the editors for Makefile files.
Open another text editor, type a tab, and then copy and paste into the PyCharm editor. In MacOSX this worked for me using both Sublime Text 2 and TextEdit.
I can't think of any "direct" way. Probably the easiest way that I can think of is to write a Live Template to do it. See the help page on Live Templates for more information. When you write it, you may need to copy and paste a tab character in from another application.
However, when I tried it, IDEA saw it as just empty text and would not save it. So I used a variable with the "capitalize" function to capitalize a tab character.
Here's the template I created that you can paste into your templates. Now I type tab, hit the Tab key and I get a tab character. Of course you can change the abbreviation.
<template name="tab" value="$TAB$" description="Enter a tab Character" toReformat="false" toShortenFQNames="true">
<variable name="TAB" expression="capitalize(" ")" defaultValue=" " alwaysStopAt="false" />
<context>
<option name="OTHER" value="true" />
</context>
</template>
You could extend the idea to have multiple ones that enter multiple tabs. For example tab to enter 1 tab, tab2 for 2 tabs, etc.
Screenshot of it after use:
There may also be a way to hack a macro to do it. You could then assign the macro to a keyboard shortcut. I'll see if I can figure something out and update this if I do.
Use the menu option: Edit -> Convert Indents -> To Tabs.
Whenever I edit a makefile I do the "to tabs" conversion before I save the file.
UPDATE: Really sadly, I think the generated character still gets converted to spaces... Am checking...
There is an Action in JetBrains IDEs to enter a Tab character.
Here are the steps to use the Tab character action: (discovered in PyCharm 2020.3)
Double-tap the Shift key OR Help -> Find Action...
Type the 3 characters tab
Click on the action that is called Tab and shows the icon for the Tab character...
It remembers the last action you did, so if you have several tabs to add, you can get into a quick process by doing ShiftShift then Return each time.
Answer based on #Morfic's comment to the question. I think this is the cleanest and most sensible reply here so I figured it deserves a place as an answer (and needless to say, it worked for me).
If they're different types of files you could configure File -> Settings -> Editor -> Code style -> Tabs and Indents for each one to use either space or tab depending on how you want it.
One way to do this is to copy a TAB character from another text editor, then right click in your PyCharm file and use Copy / Paste Special -> Paste as Plain Text (Ctrl+Alt+Maj+V)
I guess this was not available in older PyCharm versions, because no other answer proposed it. Regular paste (Ctrl+V) doesn't work (replaced by spaces), but this one works. The function will also bypass other automatic formatting.
Inspired of Clare's suggestion,
assign the left tab key after finding 'tab' action.
At Actions tab, search by 'tab' and move your up/down arrow key and place there.
Then type Ctrl+1, you will see a popup. Select as follows and click OK.
Then, you might be asked "Do you want to remove other assignments?" if Tab key was already assigned. Click Leave because your usage won't conflict with the existing setup.

Issue on using "scrolling text" module in Joomla

I have downloaded and installed various module for scrolling text horizontally using these websites.
After I created new module and point out the position of that module, I can view that module in my web page. The text didn't appear because I didn't mention it in my module.
In Both of those modules, I couldn't find out that where have to I place the text to be scrolled in that particular modules?
I have searched a lot. But I couldn't get anything.
Any help will be appreciated!
Thank you in advanced!
These extensions display text from articles. So all you have to do is simpley:
Create a category in the Content Manager
Create some articles and assign them to your newly created category
In the Module settings, there will be an option to choose which category you wish to display the articles from, simply select your category
Hope this helps
There is no need of using any other modules for scrolling the text.
I used Custom HTML as menu type and write the code on editor.
The steps I have done as below:
Go to site -> Global configuration -> set Editor-None in default editor
Go to Extension-> module Manager -> New -> select the module type as Custom HTML
Copy the html code for scrolling text and Paste it in the text part and save the module.
Check your site. Now, your site is having the scrolling text. Then, You can change the Editor as before.

reset fck editor values yii

I am using yii framework and i have fck editor in form. If i click reset button all the fields in the form get empty but the editor doesn't. This is the code for fck editor
$this->widget('application.extensions.fckeditor.FCKEditorWidget',array(
"model"=>$model, # Data-Model
"attribute"=>'content', # Attribute in the Data-Model
"height"=>'400px',
"width"=>'100%',
"fckeditor"=>Yii::app()->basePath."/../fckeditor/fckeditor.php",
# Path to fckeditor.php
"fckBasePath"=>Yii::app()->baseUrl."/fckeditor/",
# Relative Path to the Editor (from Web-Root)
"config" => array("EditorAreaCSS"=>Yii::app()->baseUrl.'/css/index.css',),
# Additional Parameters
How can i do that?
AFAIK FCKEditor (and any other similar) is based on simple textbox (HTML element textarea).
If you're using jQuery, I would consider adding a simple piece of code to onDocumentReady function in the view that is generated after reset of the form (or directly to the Reset Button's onClick code, if you're not reloading page after reset). In this code I would simply force field that is used as base for FCKEditor to make sure it is empty.
Something like this:
$('#editor').val('');
Written from memory, not tested though.