How to build an advanced link in draw.io - draw.io

I am looking for how you can build a link in draw io, so that when you click first, it hides a layer and then opens a different page of the same draw io document.
so far i tried this:
data:action/json,{"actions":[{"toggle": {"cells": ["SvuciECQg7tZUCU10AH1-3"]}},{"open": "data:page/id,IZEQzf0yfGXm-2QJ5-Q8"}]}
But it seems that the Toggle is executed after the Open, and I need the Toggle to be first and then the Open.
I even tried to do an Open of the same page I'm on, do the Toggle, and then do the Open of page 2, but it didn't work. I would appreciate if anyone knows how to do this, thank you very much.

This is pretty old, you've probably figured it out or given up by now. In case you haven't:
If you want to Hide a layer, just Hide the layer. This did exactly what you're describing: (I've inserted your IDs)
data:action/json,{"actions":[{"hide":{"cells":["SvuciECQg7tZUCU10AH1-3"]}},{"open":"data:page/id,IZEQzf0yfGXm-2QJ5-Q8"}]}
If you need to toggle the layer back on, you'll need to Show it again. The code you have works, it's kindof unexpected not knowing if the layer is showing or hidden at the start.
Unless the layer you want to show/hide is on the different page.
You won't be able to interact with objects on a page that's not in scope. In that case, you probably want to hide the layer by default. That way, when you Open the second page, the layer is already hidden.

Related

How to change WebBrowser fullscreen video mode?

I have a c++ project with 2 WeBBrowser in a TableLayoutPanel they are set side by side, it's working fine I navigate normal but when I go to specific websites and play a video in fullscreen that sets my whole monitor to fullscreen instead of setting only the WeBBrowser itself, however on other websites that fits perfect in the WeBBrowser. Is there a way to change the way it displays fullscreen? I wanna make it display fullscreen in the WeB​Browser only. I think it has something to do with Web​Browser​Base.​Active​XInstance Property or Web​Browser.​Document Property. Most examples I find on the internet is for the old VB and not related to the fullscreen property.
Here's a similar question:
WebBrowser control video element enter fullscreen
In other examples I've seen a method to extract the element by doing:
HtmlElement^ object = webBrowser1->Document->GetElementById("video");
But I have no idea how to handle that code in order to format that video then set it back to the WeBBrowser with fullscreen mode fixed.
EDIT:
I went further and I could get the <video> element just from a few websites, here's my method:
private: System::Void webBrowser1_DocumentCompleted(System::Object^ sender, System::Windows::Forms::WebBrowserDocumentCompletedEventArgs^ e) {
HtmlElementCollection^ videoElements = webBrowser1->Document->GetElementsByTagName("video");
videoElements[0]->SetAttribute("style", "width: 640px; height: 480px;"); //Not sure if this is a proper way to set an attribute in this element.
}
The problem is that not every website gives you access to <video> tag elements, so for those websites I did the following code to make sure there were indeed no <video> tag elements in the source:
System::Diagnostics::Debug::Write(webBrowser1->DocumentText);
Then I didn't find any <video> tag element in the output, only a few websites provide me that. Why? How to really get and manipulate properly <video> tag elements in c++?
Then I didn't find any tag element in the output, only a few websites provide me that. Why?
Let me make an educated guess. For some of the pages you're referring to, the DOM is built dynamically and asynchronously. Which means, those <video> tags might simply not be there yet.
So, you might need to have some asynchronous polling logic in place that monitors DOM changes, specifically looking for <video> tags.
It might not be possible to come up with a 100% working solution to cover all cases, but have a look at my other post which deals with this problem.

How do you display rapidly updating data to the user in a win32 GUI app?

So im building a basic win32 GUI app and I have a vector of data that gets constantly updated through an external source via a port. Im interested in displaying that list of data to the user but im not sure the best approach to go about it without causing update flickering.
I originally had an edit box in which I build a string with the information and update the window. But it has proved troublesome as the amount of data grows since I cant scroll down to look at additional data. Any ideas?
My idea is no point of updating the visual control as the same speed you receive the data. Because even-though you update at the same speed the users cannot see that change at the speed of data receiving. Human eye does not see a change happening in speed as 1/8th of a second. So better to update the visual control in a controlled manner. Maybe using a timer.
Appending to the text of an edit control for each subsequent data point will lead to flickering as the whole control re-renders as the text has changed.
I'd advise one of the following options:
1) use a ListBox or ListView control; when you add another row item, it only re-draws the new/changed/scrolled item. https://learn.microsoft.com/en-us/windows/desktop/controls/create-a-simple-list-box and https://learn.microsoft.com/en-us/windows/desktop/controls/list-view-controls-overview
2) If you only want an always-scrolling list of data, consider just having a command-line application that writes to the standard output and saves you a lot of trouble - cout or printf your data.
You can also use EM_SETSEL and EM_SCROLLCARET to automatically scroll, but also check the position of the scroll bar before doing that. If not at the bottom, it means that the user wanted to pause, so you can scroll.
Also, you can have the scroll lock key checked in order whether to scroll or not, after all that is what it's name is supposed to do.

How to look for a specific mapping in the navigator window

I'm new to powercenter and the learning curve of this tool seems to be different from the programming languages I'm used to. Where I work everyone tells me to ask people in the office. Access to the internet is non existant. Stack overflow is one of the few places where I can look for info.
I would like to do something basic like, in the navigator window, there are sometimes thousands of mappings with veeeery similar names, I would like to know if there is a way to enable a "control-f" type of functionality. As of right now, placing the mouse on the window and writing the name kinda helps, but since the names are stuff like
k_l_ll_sigpir_proyectname_mappingname
and there are dozens and hundreds that share the same structure: "k_l_ll_sigpir_" trying to navigate when you don't know where info is other than the name is a bit of a nightmare, compared to other tools at least.
Can someone point me in the right direction? Thanks in advance.
I guess I was able to find something that might help, although this is a bit counter-intuitive. I'm assuming you want to find and open some mapping in Mapping Designer. Here goes:
After you've connected to Repository and have the right folder opened (not just connected!), choose Tools => Queries from the menu bar. A Query Browser should open for you.
Choose New to create a new query
In the Query Editor there's a grid. Choose Object Name in the Parameter Name column. Change the Operator to Contains and put whatever you're looking for as Value 1 (using your example: mappingname)
Click the blue play button on the menu bar or choose Query => Execute from top menu. Give this a few seconds.
Give it a few more seconds...
A Query Results window should be opened for you. NOTE: if you've been clicking anything it might get opened in the background - just check the Designer button on Start Bar. It should contain all the objects that contain mappingname string it the name. We've not limited this to mappings only though (I'll discuss this below).
=== now here's the odd part ===
You can right click any item on the list in Query Results window and choose Open in Workspace. And it won't work :)
Switch back to Query Editor window and close it (don't close the Query Results!). You may save you'r query if you like to.
You should be back at Query Browser. Close it.
Return to Query Results.
Right click the desired item and choose Open in Workspace.
Voila!
Now some remarks:
The whole repository is searched. The Query Results may therefore contain items from other folders, than the one you have open. Trying to Open in Workspace such objects won't work since the folder is not open in Designer.
You may construct more sophisticated queries. Just click 'Add new...' icon on the Query Editor window. This will add a line and allow you to choose extra conditions. It will be spawned by a AND condition which you may change to OR. You get the idea.
PS.
Yes, it's odd, I know. Just don't blame me ;)
The quick answer is that the 'metadata manager' tool can do exactly what you ask for. It is basically a 'google search' for your entire data warehouse. Only hiccup is that it requires a lot of work from the admins of your power center servers to get it up and running...
Alternatives:
Basically it depends on what you want to DO with the mapping after you've found it and why you look for it in the first place:
1) in the 'designer tool' you can look under 'targets' in the right hand tree structure
- when you've found the target table you want the mappings for
- simply right-click and choose 'dependencies'
- in the following dialog uncheck everything except 'mappings'
- in the following right click on the most likely mapping and choose 'open in workspace'
2) in the repository database there is a view called opb_task_inst_run that contains a row for each session that has ever run. You can write simple sql against that view with '%like patterns%' to locate mappings... you may want to add a where clause to 'start time' for the most recent week or so - especially if the repository is old and runtime metadata has never been deleted...
Please write back if you need something different...
I'm not aware of the functionality you're after within informatica, however, the mappings are listed in alphanumeric order which should alleviate this. Within the mapping itself there is search functionality to find transformations within the mapping.
As far as a place to start learning Informatica, informatica tv is one place to get your feet wet https://network.informatica.com/support-videos.jspa

wxSmith a good way to manage wxPanel

I have a project where I'd like to have many wxPanel which are displayed or hide, depending the selection of the user. All panel are on the same position, only one is displayed at a time.
On a code side, there is no problem at all. Where it gets tricky, is how to manage this with wxSmith and keep a clear view while having many wxpanel at the sample location?
One way which is really not proper is to user the wxNotebook, and then when you start the soft delete all tabs and then show the needed panel.
I have look around to try to have the panel on a "other" wxSmith window and then load it, like a class but haven't find anything good.
I'm sure, as wxSmith is really a great tool that it must have a way to do this.
Thanks for your help!
See ya
"One way which is really not proper is to user the wxNotebook, and then when you start the soft delete all tabs and then show the needed panel."
Why not? I use that technique for AtomWeaver, and it works fine. The plus side is that you can design each page normally on a RAD GUI builder.
I've created a class called GUI_NotebookPageData that holds a pointer to a single notebook page. Create an array of these, holding info about all notebook pages.
Then, by index, or by name, get the info of the page you want to show/hide, and use wxNotebook's RemovePage()/InsertPage() methods.
This method is specially good for having several pages shown at the same time.
Actually it's possible to use external ressources with wxSmith, then it's very simple to manage the frames.
It create a derived class from wxPanel (or other window) on a new wxSmith window, easy to manage then just required to include it on the project.

Is it possible to tell if a user has viewed a portion of the page?

As the title says on a website is it possible to tell if a user has viewed a portion of the page?
Will moving that portion to a separate iframe work? then if they scroll to the bottom, issue a get request for a small image file..forgot the name of the technique..
Update: It is called Web Bug..A Web bug is an object that is embedded in a web page or e-mail and is usually invisible to the user but allows checking that a user has viewed the page or e-mail. One common use is in e-mail tracking. Alternative names are Web beacon, tracking bug, tracking pixel, pixel tag, 1×1 gif, and clear gif.
If you are talking about to check if the user has actually viewed some part of the page you would need to install a web camera and track his eye-movement.
If you are talking about detecting how far the user has scrolled down the page, you can use Javascript to detect this in the OnScroll event. You can then fire some ajax to the server if you need to record this.
I'm not sure this would be ethical - but technically if you use javascript, you could detect the mouseover event of each paragraph tag in the document, and then AJAX that information back to the server. As the user scrolls down the page, they're likely to mouse over the paragraphs, and then you know at least approximately where they've read to.
Not reliably, no.
Simple example: I middle-click on a link, which opens it in a new background tab. I then decide against it, and close the tab without ever looking at it. Any JavaScript trick is going to report that I viewed everything above the fold.
More complicated example: A newbie user doesn't have the browser window maximised, and a portion of the browser window is off-screen. Any JavaScript trick is going to report as if the entire viewport is being viewed, so even restricting your query to only the cases where scrolling occurs will not help.
Unless you require a user action of some kind, all you will be able to tell is that they downloaded some portion, not that they actually looked at it.
Sure. Put that content inside a div, then in your html, with some javascript, capture the onmouseover event and do your work there. If they've put their mouse over something, it's a pretty safe bet that they've seen it, I'd say...
Hope this helps.