Example of how to do TODO Filtering in Webstorm - webstorm

So I am trying to figure out how to filter my TODO list as when I look at it now it has 527 most of which are in my included libraries. I looked at this link but really felt I needed an example.
I would like to be able to put in my code something like this:
//TODO name
Then when I bring up the TODO tab be able to see just those one.

Found an example in the documentation.
basically I need to create a pattern:
\btodo name\b.*
Then create a filter and choose that pattern.

Related

How to implement move filter on Construction Heuristic (like local search)

How can I create and import a move filter on construction heuristics?
Solution
optaplanner at configuration may show some errors when you try to add and on configuration. It is possible to need one more tag or something else, but for something was missing or was doing it totaly wrong.. I finaly managed to add my filter by creating customfilter class whis implements SelectionFilter and add to the annotation of the entity class. Find in the documentation the SelectionFilter class.##
<constructionHeuristic>
<constructionHeuristicType>FIRST_FIT_DECREASING</constructionHeuristicType>
<changeMoveSelector>
<filterClass>...</filterClass>
</changeMoveSelector>
</constructionHeuristic>

OTRS search via deep link possible?

I want to link to our OTRS (version 5) -- is it possible to create a URL in such a way that a special parametrized search is performed within OTRS?
I'd like to link from a webpage to something like:
https://otrs.charite.de?Ralf.Hildebrandt#charite.de
and that should display all tickets in the queue XYZ and customeruser == Ralf.Hildebrandt#charite.de
Unfortunately that's not possible out of the box - at least in the way you probably intend to use it. All real search functions in OTRS (that I'm aware of) use HTTP-POST. Parameterized POST request using an URL is in principle possible, but strongly discouraged and wouldn't really work if you intend to store those searches as bookmarks or something like that.
The good news - you can create a saved search and trigger that via a URL like this:
https://url.to.otrs.de/otrs/index.pl?Action=AgentTicketSearch;Subaction=Search;TakeLastSearch=1;SaveProfile=1;Profile=current%20Changes
In this case the Profile=current%20Changes would be replaced by the name of the search profile (Special Characters must be encoded).

parameter order for drag( ) in Raphael.js

The drag method in Raphael has three parameters : onmove, onstart , onend.
Most examples in books show examples in that order , like this
drag(onmove, instart, onend)
and then declare them in any order.
Some examples show the parameters in a different order like:
drag(onstart, onmove, onend)
I have't been able to make it work this 2nd way but there are too many examples in books and the web for me to dismiss as just wrong. But is it wrong?
The docs here say...
Element.drag(onmove, onstart, onend, [mcontext], [scontext], [econtext])
And looking in the code here it supports this.
I'm not sure where you've seen the 2nd form you mention, but it looks wrong, and not sure why 'any order' for parameters would make sense. Maybe if you post a link to those examples, it may give further context. But for your own code, I would follow the docs, and then if that doesn't work, post an example jsfiddle or similar of your code for people to look at.

QScintilla - Add color to words in a custom lexer

I am trying to create a custom lexer based off of JavaScript for QScintilla. I have figured out how to add keywords the the lexer. However, I can not figure out how to alter the way they look when typed in like it does when you type the word function, for example.
I need to figure out how to do this with, for example, the word "fill".
Here's the code I currently have:
QsciLexer *lexer=new QsciLexerJavaScript;
QsciAPIs *api = new QsciAPIs(lexer);
api->add("fill");
api->prepare();
ui->textEdit->setLexer(lexer);
You need to subclass the QsciLexerCustom class. Then you need to make/configure several QsciStyle objects inside that class. The actual syntax highlighting is done in the styleText() function, which you need to override.
You can find detailed explanation on this website:
https://qscintilla.com/
More specifically on this page:
https://qscintilla.com/syntax-highlighting/
I hope it helps

Regex to change method call parameter

Regexs make me cry, so, I came here for help.
I'm looking for some tips on Find & Replace in Panic's Coda. I know the F&R
is pretty advance but I'm just looking for the best way to do this.
I'm trying to rewrite a 'template engine' (very basic) I have going on with a
webapp I'm coding in PHP (CodeIgniter).
Currently I'm calling my template like so:
$this->load->view('subviews/template/headerview');
$this->load->view('subviews/template/menuview');
$this->load->view('subviews/template/sidebar');
$this->load->view('The-View-I-Want-To-Load'); // This is the important line
$this->load->view('subviews/template/footerview');
However it's inefficient using five lines of code every time I want to
load up a different page, in every different controller. So I rewrote it like this:
$data['view'] = 'The-View-I-Want-To-Load';
$this->load->view('template',$data);
That way if I need to make any major changes to the design it can
easily be done from the template.php view file (which contains the header, menu, sidebar views etc. etc.).
However I use the previous 5-lines all over the place in many
different controllers and functions. So, my question is --- How can I
find and replace the old template engine (5 lines of code) for the new
one - substituting in the name of the view in the important, unique
line for the one in $data['view]?
Does that make any sense?! If not I'll try and rephrase! I mean, is there a way of doing this via a Regex or something? Or am I on completely the wrong lines here?
your regex will look something like this :
\$this->load->view\('subviews/template/headerview'\);\n\$this->load->view\('subviews/template/menuview'\);\n\$this->load->view\('subviews/template/sidebar'\);\n\$this->load->view\('([^']*)'\);\n\$this->load->view\('subviews/template/footerview'\);
and replace with
\$data['view'] = '$1';\n\$this->load->view('template',\$data);