Box Search API - Does it support regex? - box-api

I am referring to Search API below.
https://box-content.readme.io/#searching-for-content
I want to know if "query" parameter supports regex?

No, it doesn't.
(...extra characters to make answer longer...)

Related

How I can translate words in Cesium JavaScript Library?

How I can translate words in Cesium JS? Its possible? For example, I want translate hint text "View Home" button, search button and etc. There is nothing in the official documentation about translating words into another language. I did not find any configs.
For example, the hint "view home" can be replaced. Here is the documentation. https://cesium.com/docs/cesiumjs-ref-doc/HomeButtonViewModel.html
See field 'tooltip'.

Direct link to MediaWiki page section

In my Wikipedia page, I have a section called subtitleA. Before arriving at this point when reading, I have one sentence that has a link that jumps to the content of that section.
To be more clear, this is a simple illustration:
To do this, you will need `this` (link to subtitleA).
To do that, you will do another thing..
== SubtitleA ==
this is how you do it....
I found the following solution:
To do this, you will need [http://wikisite.com/pageName#SubtitleA this].
This has already been proven correct; however, one of my subtitles contains spaces, brackets and directory like the following:
== SubtitleA (balabalaA\balabalaB\balabala....) ==
I can no longer use the solution I found because of those spaces... Can anyone provide me an alternative solutions? Thanks.
To do this, you will need [[pageName#SubtitleA|this]].
Use the exact same format as in the section title.
Anchor encoding is similar to percent encoding (with a . instead of a %) but not exactly the same (e.g. spaces are collapsed and encoded to _). If you really, really need to do it directly, you can use {{anchorencode|original title}}.
I found the solution:
URL encoder is the key, but not using standard %xx as the replacements for special characters. Use .xx (e.g. .5C .28) would work in the mediawiki framework.

How to enable image search in Google Custom Search API

Please help me with GET request parameters.
The problem: How to enable image search in Google Custom Search API?
The manual is here, but it woks only for web search.
For example doing a web search with text flowers returns:
{https://www.googleapis.com/customsearch/v1?key={MY-KEY}&cx=013036536707430787589:_pqjad5hr1a&q=flowers&alt=json}
Image search should have the extra parameter searchType=image
{https://www.googleapis.com/customsearch/v1?key={MY-KEY}&cx=013036536707430787589:_pqjad5hr1a&q=flowers&searchType=image&alt=json}
But it returns JSON with 0 search results.
Please tell me what I’m doing wrong.
Thanks in advance.
This should be enabled in the search engine configuration (disabled by default). I also spent some time on why it wouldn't work.
I had the same situation, then I tried to configure the search engine and it worked afterwards
Go to "programmablesearchengine.google.com/controlpanel/all"
FInd your using engine and click
The website will navigate to the control panel
"Overview -> Search function"
Turn on "image search" and "search the entire web
Refer to the image below:
I used the API Explorer to emulate a search and got the corrected URL that way
https://www.googleapis.com/customsearch/v1?q={QUERY}&cx={CX}&{OPTIONS}={VALUES}&key={YOUR_API_KEY}&searchType=image&alt=json
As silly as it sounds, apparently the exact order matters for it to work.

Search box microformat?

Is there any microformat/standard for implementing search form on the site?
(access keys, naming etc.)
Any good practices?
The only things I can think of are that searches should be GET requests, and that you may want to implement a RESTful API that allows developers to query JSON and XML results in addition to HTML
If you are trying to implement a plugin for browsers like IE and Firefox to allow for search/autocomplete in the search box of the browser, check out this: https://developer.mozilla.org/en/creating_opensearch_plugins_for_firefox
Here are some conventions I follow. Forgive me if these are not exactly on topic with microformats, or "technically not" in the way I describe the various parts to my answer.
I have found validation in these few standards I've copied from others:
HTML form ID = "search"
Action URL for the form is //root-of-site/search/
Search Results URL construct:
//root-of-site/search?q=queryClause1+Clause2&AnotherParamName=foo
[personally that structure bugs me a little because search-forward-slash appears to be a directory, and the search-question-mark looks like a page taking a query string, and IMO a page should have a suffix. I've been tempted to use search.cgi or search.app, but I see the big guys using /search?q= and so it is]
ID of search query is "q" (this is nearly universal in adoption)

HTML form method with nice URL

I just want to know whether there is a way to answer this question with "Yes" without using JavaScript.
What I want to do is have a search form that automatically generates URLs like http://example.com/search/my+search+term or something similar when I enter my search term into a search text field.
EDIT: Due to some mis-understanding (and not being clear on my part), a clarification: I want the browser to generate that URL based on the value of the text field when the form is submitted.
No, it's not possible without using JavaScript.
The best you can do is using a GET action and have an url like http://example.com/search/?q=my+search+term, where q is the name of the input search box.
Using html only, no.
You could have something server side that might work. You could have the server respond with a 302 response code. If you are using Apache, you could probably use mod_rewrite to take the GET request and generate a new url.
For example, the browser might ask for http://example.com/search/?q=blah+foo+bar, the server could then take that and send the browser a 302 redirect for http://example.com/search/blah+foo+bar.
See more information at the Apache url rewriting guide, or by using your favorite search engine.
You could still use javascript to generate the correct url, but if someone has javascript disabled, this would work as a fallback.
The answer is No
No if you want it to be client side, if you can do it server side (by submitting the form) you can use something like PHP
Yes you could perform something like this server-side pretty easily as long as you don't mind submitting a form.
EDIT: Upon further clarification from the author in comments below: It is not possible in a pure client-side manner without JavaScript or some other client-side tool like Flash/Silverlight (which is admittedly overkill).