How to fix TypeError: transform(...) is null - dojo

Another individual said this error is generally caused by "a widget template that is referencing a property via ${...} that doesn't actually exist in the widget."
I've researched and can't seem to find a way to resolve this error. Any advice or leads to help solve this issue? How do you FIND this bit of code to correct the issue?

Got some assistance from SitePen.
Here's the trace Stack -
**string.substitute/<()string.js (line 147) string.substitute()string.js
(line 141) ._updatePaginationStatus()Pagination.js (line 395)
.gotoPage/
return transform(value, key).toString();
instrum...tion.js (line 20)**
The Pagination was failing - potentially trying to pull data before it was actually there.
"Code is trying to do a string.substitute call, but the transformation you're trying to do isn't valid. It looks like the Pagination extension is failing on this. Given the number of steps related to Deferreds, it looks like something is trying to parse data before that data is available. For example, you have an async call, but are treating the data synchronously.
That said, when using the Pagination extension, I think you use the normal Grid rather than the OnDemandGrid."
I switched from OnDemandGrid to Grid - left pagination. Error still there. Switched back to OnDemandGrid - eliminated Pagination. Error Gone.
Also found this little note that I had overlooked in documentation: "Note that the Pagination extension is incompatible with OnDemandGrid, since each has its own way of dealing with collection ranges. Pagination should be mixed into Grid, not OnDemandGrid."
http://dgrid.io/tutorials/0.4/grids_and_stores/
thankyousitepen

Related

SSAS TokenizationBehavior

Within the dimension properties for an attribute within SSAS, there is an option called TokenizationBehavior which is defaulted to TokenizationNone. The alternative is TokenizationText.
I tried it out and it gives an error message as per below. There is little content on the internet about anybody trying this out or what it is actually for. Any ideas? I'm not sure if this Tokenization is for parsing text or a security mechanism? And why it doesn't work or how it's supposed to work in SSAS?
The ddl500:TokenizationBehavior element (namespacehttp://schemas.microsoft.com/analysisservices/2013/engine/500) cannot appear under Envelope/Body/Execute/Command/Batch/Alter/ObjectDefinition/Database/Dimensions/Dimension/Attributes/Attribute
I looked at the XML code which adds the below line if you put TokenizationText in the dimension attribute properties:
<ddl500:TokenizationBehavior valuens="ddl500_500">TokenizationText</ddl500:TokenizationBehavior>

Load a nullable repeated field in BigQuery

I have a JSON payload like this that I’d like to stream insert into a table I’m managing:
{
“Field1”: “value1”,
“Field2”: [“value1”, “value2”],
}
Sometimes field2 is not present at all in the JSON. I thought repeated fields with type “STRING” could be null but I’m getting insert errors from the API saying it cannot be empty.
I’m doing the loading from python so can transform if necessary, I’m just not sure the best way to set the schema and JSON payload.
I think I have been able to reproduce your issue using the method insert_rows, I’m going to assume that that is the method you used. The error returned by that method was [1]. Please let me know if you are accessing the API in a different way or getting a different error.
There seems to be an issue in that method of the library, since REPEATED fields are not being treated the way we would expect.
I have filled an issue regarding this problem [2].
As a workaround I recommend using the method insert_rows_json [3]. This method has the same functionality as insert_rows but not its issues.
[1] {'index': 0, 'errors': [{u'debugInfo': u'', u'reason': u'invalid', u'message': u'Field value cannot be empty.', u'location': u'field2'}]}
[2] https://github.com/googleapis/google-cloud-python/issues/9602
[3] https://googleapis.dev/python/bigquery/latest/generated/google.cloud.bigquery.client.Client.html#google.cloud.bigquery.client.Client.insert_rows_json

How do I write a robust structural search template to report Mockito times(1)/Times(1) passed to verify in IntelliJ IDEA?

In my project Mockito.times(1) is often used when verifying mocks:
verify(mock, times(1)).call();
This is redundant since Mockito uses implicit times(1) for verify(Object), thus the following code does exactly what the code above does:
verify(mock).call();
So I'm going to write an a structural search drive inspection to report such cases (let's say, named something like Mockito.times(1) is redundant). As I'm not an expert in IntelliJ IDEA structural search, my first attempt was:
Mockito.times(1)
Obviously, this is not a good seach template because it ignores the call-site. Let's say, I find it useful for the following code and I would not like the inspection to trigger:
VerificationMode times = Mockito.times(1);
// ^ unwanted "Mockito.times(1) is redundant"
So now I would like to define the context where I would like the inspection to trigger. Now the inspection search template becomes:
Mockito.verify($mock$, Mockito.times(1))
Great! Now code like verify(mock, times(1)).call() is reported fine (if times was statically imported from org.mockito.Mockito). But there is also one thing. Mockito.times actually comes from its VerificationModeFactory class where such verification modes are grouped, so the following line is ignored by the inspection:
verify(mockSupplier, VerificationModeFactory.times(1)).get();
My another attempt to fix this one was something like:
Mockito.verify($mock$, $times$(1))
where:
$mock$ is still a default template variable;
$times$ is a variable with Text/regexp set to times, Whole words only and Value is read are set to true, and Expression type (regexp) is set to (Times|VerificationMode) -- at least this is the way I believed it should work.
Can't make it work. Why is Times also included to the regexp? This is the real implementation of *.times(int), so, ideally, the following line should be reported too:
verify(mockSupplier, new Times(1)).get();
Of course, I could create all three inspection templates, but is it possible to create such a template using single search template and what am I missing when configuring the $times$ variable?
(I'm using IntelliJ IDEA Community Edition 2016.1.1)
Try the following search query:
Mockito.verify($mock$, $Qualifier$.times(1))
With $Qualifier$ text/regexp VerificationModeFactory|Mockito and occurrences count 0,1 (to find it when statically imported also).
To also match new Times(1) you can use the following query:
Mockito.verify($mock$, $times$)
With $times$ text/regexp .*times\s*\(\s*1\s*\) and uncheck the Case sensitive checkbox.

Openrefine not working as expected

I'm very new to OpenRefine, so please bear with me if i have made a simple mistake.
I'm parsing a HTML website to gather some date.
Everything went fine with fetching the individual pages, but now the parsing of the HTML fails.
I'm creating a new column, based on the one holding all the page's HTML. I'm trying to get to the data in a specific DIV[20].
In the"create column based on this column" window it gives me a preview when using value.parseHtml().select("DIV")[20] , which results in exactly what i need... executing it gives me nothing but blank cells.
it even tells me that it is "filling 0 rows with grel:value.parseHtml().select("DIV")[20]"
Any clue what i'm doing wrong here?
You just need to finalize with .toString() to output the JSON.org object AS a string.
This is explained on our wiki here: https://github.com/OpenRefine/OpenRefine/wiki/StrippingHTML#extract-html-attributes-text-links-with-integrated-grel-commands
I also updated the select() function with that example: https://github.com/OpenRefine/OpenRefine/wiki/GREL-Other-Functions#selectelement-e-string-s

Custom Grid Query in Rally with Multiple OR Clauses

I'm trying to write a query in Rally that will show me all the defects for several projects, but every time I save the query I get the message "Could not parse: Error parsing expression -- expected ")" but saw "OR" instead."
Here is the actual query:
((((Project.Name = "Project A") OR (Project.Name = "Project B")) OR (Project.Name = "Project C")) OR (Project.Name = "Project D"))
I checked Rally's so-called Help and it seems to me that everything is set up correctly, but maybe I'm missing something?
Your query syntax and parentheses groupings look fine. I tested your exact string above in a Custom Grid and it parses fine - no "Could not parse..." error. Maybe compare the exact query you are using against your sample above? Complex AND's and OR's can definitely be frustrating. If you miss a parenthesis or spaces around operators, the query engine will complain.
fyi, I just found that doing a page reload in the browser forces the changed query expression to be evaluated, whereas simply saving the modified query does not reliably re-evaluate the changed query.
The symptom I observed was that query results continued to complain about the previous query string, even though I had replaced parts of the query with different named fields, etc. This made me suspect browser caching, and when flushing cache did not help, then I did browser page reload, which worked perfectly.
So if your browser page was reloaded between when you were having the problem and later when it started working, then this might explain why.
From About link: Rally Build: master-9274 , Browser Type: firefox/19.0, rv:19.0