KeyedProcessFunction with Sliding window - stream

Hello Can someone please share example based problem for ("KeyedProcessFunction with Sliding window"). I have to include in my method for checking the number of generation events inside and process them.

Related

Is there a similar thing like EventFiringWebDriver to PlayWright automation?

My objective is to log all the interactions with the web elements in PlayWright automation. I need to capture the following interactions
Click/Submit
Select dropdown
Check Box
Text filling
Radio button
Toggle button
Something like as shown here https://blog.testproject.io/2018/06/04/event-listeners/
Hope it helps what I am trying to achieve, please do comment if further information is required.
Thanks.
Write wrapper functions over library functions to log desired details
Write wrapper functions over each UI action and which will write the specific action performed detail on an generally external file for later reference on post execution.
On the script level these wrapper functions will be called and all library functions will be called indirectly.
This is the standard advise to keep it DRY as there will be hardly 10-15 primary functions covering most of the UI actions and will encapsulate all the required logging & reporting functionality in one place.

Disable multi-tab browsing for single session/user

[Disclaimer: I'm not sure if this kind of question is accepted here as it is about a piece of software deployed already. Rest assured I didn't drop any confidential information. Also do tell me if I violated any rules in SO by posting this so I can take it down immediately]
I have a working Learning Management System web application and I recently received a bug report about a button not showing. After investigating, I have proved that the user was not using the web app as intended. When taking an exam, he was opening multiple tabs to exploit the feature that informs him whether the answer was correct or not. He then will use this information to eliminate the wrong answers and submit all the right answers in another tab/window.
I'm using Rails 4.2. Is there a way to prevent multi-tab browsing? I'm thinking like if a user is signed in and he attempted to open a new tab of the webapp, he should see something like "Please use one tab" and all the features/hyperlinks/buttons are disabled.
Here's a screenshot of how I proved he was using multiple tabs. Notice that there are multiple logs of the same attempt # because the current implementation allows saving a study session and resuming later (this is the part that's exploited). The opening of multiple tabs searches for the most recent attempt session and continues from there. This is also the reason why most of the sessions don't have a duration value -- the user only finishes a study session for one tab (by clicking a button that ends the study session). The system cannot compute for the duration because the other sessions don't have an end timestamp.
-
This is what a single-tab user looks like:
This is more of an application misuse issue more than a bug.
You should add protection not only from multi tab, but for multi browsers aw well, so it can't be purely FrontEnd check.
One of the solutions could be using ActionCable to check if a user has an active connection already and then act accordingly.
Another, for example, generate a GUID in JS and pass it with every answer. If its different from previous answer, it means user opened a new window.
But of course the solution would depend on your current architecture, without knowing how do you currently organise client-server communication it's hard to give exact and optimal solution.
I found an answer here. I just placed this js in the application view to prevent any extra instance of the website.
Thanks for everyone who pitched in.

Facilitating navigation through eclipse using Rascal visualization and callbacks

I am making a visualization of a code base using rascal, and I am currently trying to make it interactive by letting the user click on rendered Figures.
What I want to do is to let the user click on objects that represent parts of the analyzed code, upon which the user is taken to the appropriate part of the analyzed code.
I have noticed that the loc type, when evaluated in the normal console, yields a hyperlink to the location it describes. When the loc value is printed from a callback, however, it is not.
2 possible solutions:
Make the loc output clickable again.
Control the eclipse GUI directly, showing the user the code immediately.
Is any of the above possible? If not, are there alternatives?
Accepted solutions start with the user clicking on rendered Figures and end with the user seeing the code, without the user having to manually navigate to the respective Java files (user friendly!).
I found the answer to my own question, quickly enough. Apparently, I only had to read the documentation a little more thorough.
The function edit(loc location) in the module util::Editors will make eclipse open a new tab with the file pointed at by the location. In case the location points at a specific AstNode, it will even select the source code of the node.

GDI Objects or USER Objects?

I have an application that allows a user to open multiple windows/modules. Each module has it's own popup menu, some of these are create at runtime when a form is created, some design time and I have a lot of them in each module, some are used when I right click a form, some are used in toolbutton.
The problem I have is that I have a lot of windows opened, when I right click to access the popup menu, the generated menu goes haywire, I mean, it's not showing the correct labels. Sometimes it'll show all "Save as.." or any other label I need to display. I guess the easiest way to explain this is by showing you a screenshot of the menu
Is this a GDI/User Objects problem? If so, how do I resolve this? I tried increasing my GDI and Uses object limits as a test but still getting this problem. The problem will be resolve if I close one or two windows; however, I cannot ask my users to limit the number of windows opened in the application. A check with windows task manager shows that my application is using 4,312 User Objects and 5,570 GDI objects with 437 Handles at the time this problem is occuring.

what analytic tool can I use for tracking exactly what users click

Please advise what tool can I use to track what user is exactly clicking i.e. click-streams – to view the actual click-stream of each visitor.
I came across "rail stat" but it seems outdated (09'). I also saw "clicky" but am unsure if I can see click streams with it?
So what other analytic tool can I use to view click streams?
Every answer would be greatly appreciated!
You could try the "event tracking" part of google analytics which allows you to track interactions with your site (clicks etc etc) rather than just the normal per-page.
Here is a snippet from the Event Tracking docs:
Event Tracking Overview
Event Tracking is a method available in the ga.js tracking code that you can use to record user interaction with website elements, such as a Flash-driven menu system. This is accomplished by attaching the method call to the particular UI element you want to track. When used this way, all user activity on such elements is calculated and displayed as Events in the Analytics reporting interface. Additionally, pageview calculations are unaffected by user activity tracked using the Event Tracking method. Finally, Event Tracking employs an object-oriented model that you can use to collect and classify different types of interaction with your web page objects.
By contrast, tracking web page objects using the urchin.js tracking code requires virtual URL creation and provides no object hierarchy. With the legacy urchin.js code, user interaction with page objects is calculated and displayed as part of total page views to your site, and no distinction is made between actual and virtual pageviews.
With ga.js, you would commonly apply Event Tracking to:
Any Flash-driven element, like a
Flash website, or a Flash Movie player
Embedded AJAX page elements
Page gadgets
File downloads
Load times for data
Another option is Open Web Analytics, which includes an option to both record a user's DOM stream for later playback and to record a heat map.
OWA is a standalone PHP app that is able to monitor multiple domains. It is under active development with version 1.5 out any day now.
HTH

Resources