How can sort data datewise in Appmekar? - google-app-maker

In Google Appmekar i need to sort data in datewise so i used below line but didn't work.
myDataSource1.query.sorting.inwarddate._ascending();
anyone have idea about appmekar?

That should work, except that each time you want to sort the datasource, you have to load it. Hence, it should look like this:
myDatasource1.query.sorting.inwarddate._ascending();
myDatasource1.load();
You should take a look at the official documentation for more details.

Related

How to get all questions related to a tag, using the stackr library?

I would like to retrieve all question asked for a specific tag. Specifically for every question: all tags, date posted, body, user who posted the question, and votes.
I tried this:
library(stackr)
test <- stack_tags("r","questions", num_pages=1000000, pagesize=100, filter="withbody")
but it is not the appropriate query. How can I make it?
Since you want question data, you need to use the stack_questions function, not stack_tags. Also, the withbody filter will not get all that you say you want, so you need to use a custom filter.
Something like this should work:
library(stackr)
test <- stack_questions(tagged="r", num_pages=10000, pagesize=100, filter="!UHY-aKsFJ(KvceZ5uauvQDp9b_ZwAQaEY0KwVy4Czncd97-22tonZWvDXfhmP(X*Baz8J0uC0Q")
Notes:
Reference the /questions doc page.
There is no point in setting num_pages > 10000, since that's your max quota.
The filter listed is a custom one that returns the fields you requested.

Combining similar URLs in Google Analytics (with a twist)

I have a lot of similar URLs that I would like to merge in Google Analytics. I've managed to merge a lot of them already. However I've now run into a bit of a problem.
I have URLs that look something like this;
article/4567/edit
article/87478548/edit
article/82984786/add
article/8374/add
How would I go about merging these URLs so that they display as;
article/edit
article/add
Any help is greatly appreciated.
EDIT: I also need to be able to have GA display every article in one line on the table called "article/" regardless of any ID that is after it. I don't want the table to look like:
article/12342 1,000 views
article/7465890 900 views
I need it to display as:
article/ 1,900 views
You can create an Advanced filter that combines the relevant parts for you:
The output would be /article/edit or /article/add, with everything and anything between those removed.
EDIT:
If you just want everything, regardless of /edit, /add, /12341/edit, /7305/add, /whatever/edit, to show up just as /article, then you can just change your filter like this:
Field A: Request URI = (/article)/.*
Output to: Request URI = $A1
This will convert the following examples:
/article/123/edit -> /article
/article/2345/add -> /article
/article/anything -> /article
From this Combining similar URLs in Google Analytics you can find out how to do it. You need to use a regex. Something like this should work (did not test it).
(article\/)[0-9]*\/(edit|add)

Filter at event viewer by data

I want to get event entries by their description (data).
I know how to get the event entry with a certain description, however I want to get an entry whith a description which contains a string (not equals to it).
That, I don't know how to do.
Please help :)
According to my answer here: https://stackoverflow.com/a/34119006/5089204 you should be able to retrieve EventRecords.
Dealing with these events is a quite complex issue... Each event has its own internal structure. The common properties are bundled in EventRecord, but the specific data must be taken from the internal details. Use the ToXml() method of an EventRecord...
In order to get the right events you must define an EventLogQuery. You must know the Provider's name and specify the filter.
Try the following: Open eventvwr and there the Windows-System queue. Right click one event, open the "Details" and choose the "XML-View". Look over different events and you will find, that they are quite differing.
But: You'll find everything you need there: First the "Provider Name" and the "EventId", these two are most important for the `EventLogQuery'.
Now go to the "define a user filter on the current protocoll"-action and type in some values. Then switch to the filter's XML and you'll learn how to define the correct query.
I'm sorry, there is no "easy and general" approach :-)

how to write syntax for key value fair symfony console

I want to update inventory based on sku.
For example
php magento update_inventory --sku&quantity=array(1001,10) --sku&quantity=array(1002,20) --sku&quantity=array(1003,30)
But I’m not getting how to add options/arguments ?
here user at least need to provide one pair (sku& quantity).
for this i think i have to use ArrayInput class/InputArgument/InputOption.
Can you give some solution or reference to above requirement?
Have you looked at how Magento\Setup\Console\Command\AdminUserCreateCommand uses options? Take a look at how that code uses getOptionsList in the configure method. For your use case you may want to look into using InputOption::VALUE_IS_ARRAY
A good reference will be http://symfony.com/doc/current/components/console/introduction.html#using-command-options
You may also want to consider a different input format. For example using arguments instead of options and specifying the format in documentation.
php magento update_inventory 1001:10 1002:20 1003:30

Getting the right data from webpage

I am looking to extract some data from website:
http://www.delfi.lv/bizness/biznesa_vide/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5
from me it's valuable to get info like:
"<h3 class="ca56269332 comment-noavatar listh3 comment-noavatar-author">
vārds
</h3>"
In this example "ca56269332" and "vārds" are dynamic variables.
For me I want to achieve something like this:
"<h3 class="* comment-noavatar listh3 comment-noavatar-author">
*
</h3>"
where "*" means a dynamic value, and export in some kind of excel or data file.
Also I want to extract multiple pages, like:
/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5&no=0
/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5&no=20
/tirgus-liberalizacija-ka-latvija-nonaca-krievijas-gazes-juga.d?id=44233361&com=1&s=5&no=40
ect.
Can anyone please share some valuable resources to achieve that, I know that you can make it with PHP file_get but I want easier solution because my goal is not to publish it to webpage but use as source for my study project as a data file.
How to EXTRACT dynamic data to AVOID saving EVERY page with ALL the useless information it contains and make it easier, avoiding to manually process large number of web comments?

Resources