Show ruler based on editor.wordWrapColumn, without hardcoding the number - visual-studio-code

Basically, I want to be able to say (in settings.json):
{
...
"editor.rulers": [
${config:editor.wordWrapColumn}
]
}
The issue is that this variable can only be expanded in a string, but editor.rulers requires a list of numbers.
Is this possible?

Show ruler based on editor.wordWrapColumn, without hardcoding the number [...] Is this possible?
Not that I know of.
There's a feature-request (#30609) on the VS Code GitHub to get a setting to achieve what you're looking for, but it's currently closed and not being looked at. You can show your support by giving it a thumbs up reaction there, or you can consider writing a different proposal if you think you have a better idea.

Related

How to mix bar and lines in Grafana in one chart

How can I display one dataseries as bar and another as a line in one graph like it is used in the last comment of: see last picture
Short answer:
It's not possible (yet) using the Grafana UI, only by hand.
Long answer:
As far as I know there is no way of doing this using the UI switches; you'll have to use the use the "alias or regex" fields below the visualisation configuration.
Prepare your data
Before you start, make sure that your queries A and B retrieve actual data. You won't see your data otherwise and be confused why they're not showing.
Adding fields and values to the aliases
Once you are selecting the correct data you want to display, just add the following on the visualisation section of the graph at the 'alias or regex' fields:
Add 2 overrides, one for each value you want to display using the 'Add series override' button.
Add a "Bars:false" option flag and a "Lines:true" for the value you want as a line.
Be sure to use the exact opposite values for your bars ("Bars:true" & "Lines:false")
Add a 'Y-axis: 2' to the value you want to have on the right side of your graph.
Optionally, you can add a "Z-index: 3" for the value that you want to have on top (I added this option to the line to make sure it's always drawing on top of the bars).
Enjoy
You should now have a nice graph with 2 types of data and visualisations in one; something like this:
For those who were asking in the comment section, yes this isn't available in version 8, however, you can still change the time series visualization to graph(old) so you can set the alias/regex.

cannot find css element in protractor

How do I locate the element with the following html, I have 4 Start buttons each in different color. I tried using css by class and is not working. There are no unique ids as well. Pls help
Start
As Ben Mohorc points out, you really need to give us a bit more to go on. But if you are saying there are multiple start buttons, but only one of each color, it ought to look like this. For now I assume all they say is "Start". If that is only part of what they say, use partial buttontext.If it is background color that differs, you may need to adapt that, too.
var coloredButton = element.all(by.buttonText('Start')).filter(function(elem) {
return elem.getCssValue('color').then(function(color) {
return (color == '#00ff00')//fill in the desired color here, in this format
})
});
Then do your stuff on coloredButton.first(), which will be the only one, according to what you are saying.
For more on the format to expect from the color, see http://www.protractortest.org/#/api?view=webdriver.WebElement.prototype.getCssValue

How to change what I've set a key to do in ahk

I'm trying to make a script for a game called Hearthstone. The script will be used to press a certain button and play a certain card. The only problem I have is that the cards change position based on how many you have. So I want to know how I could make buttons to choose the amount of cards in my hand.
I've come across the Hotkeys command but it seems to be more of a toggle thing. All the cards are bound from 1-10 and was thinking that I could make it so ^1-^10 represents how many cards I have but I don't know how I could do that.
Oleg's comment was more of my answer than I thought.
setting ^1 to ^1::numCards=1 and so on, I was able to set an if statement to do what I wanted something to do when the variable numCards equated to different things. Such as:
1:
if numCards = 1
{
do thing
}
return
and so on...

Bokeh - How to use box tool without default selections?

I have built a bokeh app that allows users to select windows in data and run python code to find and label (with markers) extreme values within these limits. For ease of interaction, I use the box select tool for the range selection. My problem arises when repeating this process for subsequent cases. After markers are placed for the results, they are rendered invisible by setting alpha to zero and another case needs to be chosen. When the new select box includes previous markers, they become visible based on the selection. How do I override this default behavior? Can markers be made unselectable? or can I add code to the customJS to hide them after they are selected?
Thanks in advance for any help!
There are a few possible approaches. If you just want non-selected glyphs to "disappear" visually, you can set a policy to do that as described here:
http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs
Basically, for bokeh.plotting, pass
nonselection_fill_alpha=0.0,
nonselection_line_alpha=0.0,
as arguments to your plot.circle call or whatever. Or if you are using the low level bokeh.models interface, something like:
renderer.nonselection_glyph = Circle(fill_alpha=0.0, line_alpha=0.0)
But be aware (I think you already are) that the invisible markers are still there, and still selectable if the user happens to draw a box over them with the selection tool.
If you truly want only a subset of the data to be visible and selectable after a selection, I'd say you want to replace the data in the column data source wholesale with the subset in your selection callback.

How to increase the number of submenu items displayed in sugarcrm?

I am trying to get rid of the menu fold (grouping in "more" sub-menu) in SugarCRM or at least increase number of sub-menu items before folding occurs. I have searched code so far and can't find where this is implemented.
Not exactly the answer I was looking for, but found a setting in config.php default_max_tabs = '7' which increases the number before folding.
Yes currently the only way is to override this config value in config_override.php and define default_max_tabs setting. This is available only since SugarCRM 6.2