How to find show_in_menu.xml Formatter file in ServiceNow? - servicenow

In Navigator, System UI -> UI Formatter(Search for: Name=Show In Menu) as below
https://instancename.service-now.com/sys_ui_formatter_list.do?sysparm_query=name%3DShow%20In%20Menu&sysparm_list_mode=grid
I am wondering where I can find this Formatter: show_in_menu.xml?

So this is considered a black-box thing of SN. This exists in the file system on the installation of your instance, but not in the code. Same with the activity formatter. Look it up. It's the same.
Now if it weren't black-boxed you'd be able to find it on the sys_ui_macro table or the sys_ui_page table. But alas, this one isn't there.

Try with different query: sysparm_query=formatterLIKEmenu

Related

How do I lookup custom methods in RubyMine?

If there is a method like def cookie_monster somewhere in the project and I'm in a file which is using cookie_monster, how do I quickly find the file and line where cookie_monster is defined?
I saw "Navigate Code, Not Text: How to Navigate Effectively in RubyMine" from PivotalLabs which says I can use command + option/alt + O but perhaps my key mappings are different (default RubyMine 6). That does nothing for me.
Well I see you got your answer, but that isn't really the best solution, rubymine already caches all the function names and index it to find it fast without doing a search, try this method instead, it should be faster
Navigate -> Symbol
You'll get a small popup search bar, as soon as you write cook you should probably find your function in an auto complete, depending on your layout settings you'll find a nice shortcut to open it.
As a plus there's also
Navigate -> File
I never search for a file on the side bar to navigate, use this, it's always faster and will list all files with auto complete
The normal find function mentioned is used when you're trying to find a normal line of code, not a name of a function or a file.
Note that in both these popups you don't need to write the full name, for example to open the cookie_monster function, you can search for it as this comon ( co for cookie, and mon for monster ) you'll find it fun and very fast.
As for the find usages it's common usage for me is to find where a certain partial is called, or a certain function is used.
Select the word.
Edit -> Find -> Find Usages
or
Edit -> Find -> Find in Path
For keyboard shortcut, use the one against the menu.

How to make the cities/countries dropdown like facebook does?

See the screenshot here:
I'd like the user to just type a city or country name and the autocompleter will show suggested items.
How should I start for creating it?
Are there any API(s) or web services for me to call?
Where can I find the database of all cities/countries in the world?
I think this would be the best database for your situation, check it out:
http://www.geodatasource.com/cities-free.html
You first need a autocomplete plugin.
I recommend to use the jQuery-Ui Auto Complete Plugin.
The database could as example be this, but eventually try to search a bit for yourself.
There was already a question on stackoverflow about a database for cities of the world.
A simple text file with all cities may also be this.
There are very much of those libraries, but you have to chose the right one for you.
My solution may not be the best, but it's a starting point:
Google a list with all countries (ISO-Standard), paste it into a txt-file. Then you can simply read that file with PHP an create a select menu with the contents of the file.
It does not incorporate the cities, but maybe it helps you in some way.

Using wildcards in Selenium IDE

I'm somewhat new to automation, and am learning everything auto-didactically, so forgive me if my terminology is a bit off. I've searched hi and low for an answer to this question, and I can't seem to find anything. I presume it's my small vocabulary when it comes to this stuff... anyway...
I'm attempting to write a test that performs all the actions necessary to complete a tutorial by using the recorder. However, for one particular step, the element ID changes. For example, the ID I'm trying to click is this:
//li[#id='message_661119']/div[2]/div[2]/a/img
However, for each new user that is performing the tutorial "quest", the number of the id changes.
Is there anyway to get Selenium to recognize, or use, wildcards? Example:
//li[#id='message_******']/div[2]/div[2]/a/img
Of course, the example above does not work.
Any advice would be immensely helpful. Thank you!!
You can use starts-with() for this:
//li[starts-with(#id, 'message_')]/div[2]/div[2]/a/img
It's one of the examples mentioned in Locating Techniques in Selenium's docs for starts-with().
In Target field of the command in Selenium IDE where you can see message_123123 click on a dropdownlist and choose an option which is related to xpath:idRelative or if this one doesn't work then try another options which do not include that annoying message_123123 so this way you'll identify webpage element by it's location but not id. I solved my issue this way

Steps to compare notebooks in Workbench

What, exactly, are the steps involved in using Wolfram Workbench (version 2) to compare two notebooks?
Please be explicit even in such things as what I do in order to open the two notebooks in Workbench.
(I find Workbench fiendishly difficult to use. Its built-in documentation is, I find, of limited value. The tutorial screencasts about it are just too rushed to be able to follow, even with stopping and starting. And there's still a confusion, at least for me, among various versions of sample files that are to accompany the tutorial.)
I have never used the workbench but when I fired it up I was comparing documents in minutes, so it can't be that hard.
The steps:
Create a project using the File > New > New Project menu (EDIT: many project types will do I think. I have tried both the Application and the Basic Mathematica type)
Add the two files to be compared to the project using import (in the File menu or the right mouse button context menu). EDIT: The best approach is probably using "General/File system". It will ask for a directory to import from. After that you may select the files you want to import from that directory.
Select both files in the package explorer view
Right mouse button > Compare with> Each other
Compare editor fires up showing the two documents side by side
(Welcome to StackOverflow Murray, it's good to see you here!)
This is not a direct answer to your question, but I think you might find it useful to know that the << AuthorTools` package includes functionality for comparing notebooks. Evaluate the following to open the ("hidden") documentation:
NotebookOpen#
FileNameJoin[{$InstallationDirectory, "AddOns", "Applications",
"AuthorTools", "Documentation", "English", "AuthorToolsGuide.nb"}];
Then you can compare them using CreateDocument#NotebookDiff[notebook1, notebook2], or perhaps using the somewhat more convenient
CreateDocument#NotebookDiff[SystemDialogInput["FileOpen"], SystemDialogInput["FileOpen"]]
which will let you select the files more easily.
Alternatively, you can open the two notebooks in the front end, and use this little control panel:
Dynamic#Column[
{PopupMenu[Dynamic[nb1],
Thread[Notebooks[] -> NotebookTools`NotebookName /# Notebooks[]]],
PopupMenu[Dynamic[nb2],
Thread[Notebooks[] -> NotebookTools`NotebookName /# Notebooks[]]],
Button["Show differences",
CreateDocument#NotebookTools`NotebookDiff[nb1, nb2]]}
]
It's interesting to mention that in Mathematica 8 there's some undocumented notebook-related functionality in the NotebookTools context, including a NotebookTools`NotebookDiff[] function.
Related question: Is it possible to invoke Mathematica's diff functionality from the command line?

What search options are available with StarTeam?

Is it possible with the StarTeam Client to find files in the current server/project/view? What about text in files? File properties (locked by, checked in on date, ..., etc)?
I'm just starting to use this software and so far I can't find that feature in the menus or the user's guide.
In the File menu, you can select "Find" to search by file name. (If you want to search all the files in the view I think you need to select "Files In View" and press the "All Descendants" before you go into the File menu.)
You can also setup filters and queries. Basically, a filter determines what columns you see and the query determines what rows you see. To combine them, you can setup a filter and then attach a query to it.
Normally, we check out the complete project from the StarTeam-Server to our harddisk, and then we make a simple search in Windows. That way, you can search on filenames, but also on a textstring in the filecontent. It doesn't seems me to be userfriendly, but you have to make the best out of it... If somebody knows a better solution, don't hesitate to let me know. ( p_dekeyzer#hotmail.com in Flanders, one of the United States of Belgium ).

Resources