Kimono Regular Expressions for pagination - regex

I'm trying to use kimono to paginate a URL.
I don't like to ask for help, but this time I really tried for myself without effort. I tried to read about Regular expressions, and also I searched in forums with no effort.
I wrote to the Kimono support, but they didn't answered my mails asking for the correct formula.
The specific URL is http://www.falabella.com/falabella-cl/category/cat690251/Zapatos-Mujer?No=0&Nrpp=40
By default, the pagination method provided by Kimono doesn't work for this.
This page has numbers from 1 to 8 (and a symbol '>' which cannot be selected).
So. I click in 'pagination' but when I select a number, lets say the '8' the Kimono will just paginate the EIGHT page..
which seems logical when I check in the advanced pagination menu, because the formula used is: /^()(8)()$/
So, my attemps where directed towards provide the formula with a range, something like:
/^()(2-8)()$/ but it doesn't work
Kimono won't allow me to use just (2-8) because they force the user to imput a formula with this fixed format: /()()()/
which expression should I try ?
I tried doubleclicking the '>' symbol and it seems to work, but from three times, it throws error in 2.
Some error codes are:
E5: Kimono could not create an API
E10: No elements found for all selectors
E20: Pagination Error: Selector not found
The regular expression when I click '>' is: /(\t\t\t)([^]*?)(\t\n\t)/
Nor doubleclicking the numers does work: /^()([^]*?)()$/
Please help.
Please excuse my English

Your problem is that the 'next page link' cannot be selected by clicking (because it is an image, rather than text). In order to make pagination work on this page, you'll need to manually enter the selector using 'advanced mode' instead of relying on the click.
To do this:
Set up your API with all the desired data properties
Click the blue pagination button in the toolbar
Go to the data model view
Click 'Advanced'
Scroll down to the 'Pagination' property
Enter div#bul-flecha-derecha > a#pre-page as your selector
Leave the default regular expression
Click submit to save the changes
Click Done and name and create your API

Related

How do I filter a Sitefinity form paragraph text box to disallow URLs?

My company is getting a few (3-5) spam emails per day through a customer contact form. The reCaptcha we are using isn't blocking them for some reason, but they are so few perhaps there is an actual human involved.
One thing they have in common is some kind of URL link in the paragraph text box meant for additional comments. There isn't any reason for actual customers to be posting URLs, so we figured we could just set the validation to exclude them and call it a day. But, I can't get it to work.
When editing the text box, I've gone to Advanced > Model > ValidatorDefinition so I can enter my custom regular expression code for disallowing anything with http/https/ftp:
^(?!((http[s]?|ftp):\/)?\/?)
But I'm having trouble determining what field to enter this in and what other fields I need to change to make sure this works properly. From this article, it seems the ExpectedFormat field should be Custom, but where does my regular expression code go? Putting it in the RegularExpression field is activating the RegularExpressionViolationMessage for any content whatsoever, not just for URLs, so I suspect my regular expressions may be wrong even if I have it in the right place.
I cannot really speak into the configuration part. The linked docs look pretty clear.
If you are in a dynamic module, this post might help:
You can find a regex field in the ModuleBuilder module -> Your module
-> Your module type -> Click on the desired field for the regex validation -> select "limitation" tab (example).
Regarding the regex itself, try it like this (demo)
^((?!(?:(https?|ftp)(?::\/\/))).)*$
You might need to add a (?s) single line flag: (?s)^((?!(?:(https?|ftp)(?::\/\/))).)*$

Allow to check only one checkbox in Oracle apex

I created classic report with check boxes using apex_item.checkbox .I want to know how to allow to check only checkbox.That is if i click more than checkbox alert message should display.Please help me out
Thanks in advance.
If you want to do this via dynamic actions then you will want do a dynamic action on event Change, Selection Type jQuery Selector and the jQuery Selector being input[name = "something"]
This something you can figure out by running the page as is, and if you click F12 on your keyboard, the console will open. Then select the element that is your checkbox and find its name and this should be your "something". Play around with this to make it work(set the DA to run an alert or something to see when its triggered).
Then perhaps have a page item that is filled when this DA runs, and then if the page item is already filled and the DA runs, throw up an error saying you cant do this.
Or if you want to clear the previously checked box, you could save the name of currently checked box in the page item. And have the DA do a javascript function that clears the value in the field in the page item.
Basically have the DA get the name of the checked box from the item where you store it, and do some dynamic javascript. When I needed to do something similair I created a var in javascript that was formed like $s(" + checked_box + ", ""); assembling this with concat. And then do an eval(this_concacted_instruction).
I hope my ramblings guide you to a solution. I remember the first time I was working with this stuff I took a week to get one page sorted(although it was a bit more difficult than your problem), but it felt sooo good when I got it done. So keep on trying.
GLHF

ManyToMany admin field with filter

I was trying to get a filter feature for my admin, otherwise it is tough to find the value the data-entry would need to find. Something like this:
I found that in https://demo.django-blog-zinnia.com/admin/zinnia/entry/add/ (the login info for the site is user: demo, pass: demo)
Use Bootstrap-Select Multiple
This is a simple JQuery plug-in that will enable you to select multiple values of data as you have shown in the demo link.
This also gives you the options to search the data-set
In my opinion, this is a bit better for the UI than the style you have shown.

Imacros for facebook like

Just started to learn Imacros, recorder macros for Facebook to like page, but when i play macros it gives me this kind of error
RuntimeError: element BUTTON specified by
TYPE:submit&&ID:u_0_1c&&DATA-OWNERID:u_0_1b&&DATA-PROFILEID:106053553060414&&CLASS:_42ft_4jy0PageLikeButton_4jy4_517h_9c6&&VALUE:1
was not found, line 6 (Error code: -921)
You problem is,
"submit&&ID:u_0_1c&&DATA-OWNERID:u_0_1b&&DATA-PROFILEID:106053553060414&&CLASS:_42ft_4jy0PageLikeButton_4jy4_517h_9c6&&VALUE:1 "
points to a spesific a specific button, I assume you want to click any like button from whatever page you are on you should choose a more general selector. On the record in imacros you can choose multiple methods of recording choose a different one.

How can I create a google-analytics profile that will include stuff that matches ANY (not ALL) of my filters?

I have a test profile in my google analytics account, and ultimately I'd like that profile to include all of the following:
all requests to the test.mydomain.com subdomain
all requests that include "test.mydomain.com" somewhere in the URI
all events that include "test.mydomain.com" somewhere in the category
I had originally tried creating 3 filters on that profile (one for each of the above), but it appears that google-analytics profiles only include things that match ALL filters.
I tried using an advanced filter to combine the above 3 items together into one field, so that I could then just search that field using a regex, but I'm not having much luck... Here's what I have so far:
Filter 1:
which should result in "|test|test" being placed into Custom Field 1 (assuming I had "test.mydomain.com" somewhere in the event category and "test.mydomain.com" as the Hostname)
Filter 2:
which should result in "|test|test|test|" being placed into Custom Field 2 (assuming I had "test.mydomain.com" somewhere in the Request URI).
Filter 3:
which should make it so my profile includes all items where "|test|" appears somewhere in Custom Field 2.
Unfortunately, that's not working, as my test profile is always empty. My "include everything" profile is showing that my requests are coming through and that the do include "test.mydomain.com". I've tried other variations of the above filters, such as setting my advanced-filter regular expressions to ".*", so that they simply concatenate the full Category, Hostname, and Request URI together into Custom Field 2 and then adjusting filter 3 accordingly, but still nothing comes through on that profile. I understand that changes made to profiles can sometimes take a couple of hours to start showing up (https://support.google.com/analytics/answer/1638635?hl=en), but my test filters have been set up for days, so Google should have applied them by now.
Does anyone have an idea what I might be doing wrong? Am I just misunderstanding how the advanced filter works?
Does anyone know of a way to inspect the value of "Custom Field 1" and/or "Custom Field 2" so I can see if those are being built correctly?
You can accomplish this with 4 filters (3 advanced, 1 include). If any of the requirements are satisfied, write "ok" in one of the custom fields. Then do an include on that custom field that matches "ok".
filter 1 - advanced
field a - hostname
extract a - test.mydomain.com
output to - custom field 1
constructor - ok
Use the above concept for the remaining 2 conditions. Then do an include on custom field 1 = ok
I found the issue. The technique that I outlined in my original question, or the technique suggested by Andy should work fine. The problem in my specific example is that google-analytics filters do not have full support for regular expressions. In particular, they do not support the positive lookahead in my example. The other part of my issue was that I sometimes wasn't waiting long enough before testing my profile changes (google can sometimes take a few hours before applying the changes).
To see what regex options google does support, see https://support.google.com/analytics/answer/1034324?hl=en. I originally thought that page was a "getting started with regular expressions" page, but, apparently, that might be all of the regex language that google supports.
If you are unsure if there are parts of your regex that google doesn't support, you can test it on the google-analytics site directly, and in realtime on live data (without waiting for google to apply your profile changes), by navigating to Content > Site Content > All Pages in your Profile, then click on "Advanced" at the top of the "Primary Dimension" table, then change the match type to "Matching RegExp" (see https://support.google.com/analytics/answer/2936903?hl=en). There you can enter in your regex, and if google doesn't support part of your regex, it will tell you immediately when you click "Apply" (not sure why they don't include that regex validation on their profile filter page...). You will also be able to see it immediately filter the content of that table.