Does anyone know how to get visjs to display a node as red if its down? - vis.js

I currently have a network map that shows all my points and wanted to get assistance on making a node show red when its down.Example
I am new to programming/javascript

Since node is image, we may not be able to make it red/green.
you can create similar image with red/green/grey color which can be replaced based on status on/off/dis, this is how i did in one of my project

Related

how to gray out node images in a vis.js network

I've been able to highlight different parts of a vis.js network by utilizing the mechanism shown in the vis.js documentation examples. However,I wonder if we can get the same sort of effect when images are used for representing network nodes -as opposed to basic node shapes- (a straightforward 'coloring' of the nodes, as in the examples, does not gray out the images).
I'm the developer of the vis.js network module. Unfortunately there is no shortcut here. You'll have to generate b&w images of your images and change the image option to the greyscale image.
Another idea is to use the opacity, that does work for the images. If you have any more questions, please post them on our github page. We get emails from the issues and we like to use that to keep track of questions.
Cheers!

Qt Screenshot sharing app - How to select the area of a screen

I am trying to code an app in Qt for capturing and then sharing the screenshots. For now my application captures the screenshot, shows a preview and saves it. I am yet to do the upload part. but before that I would like to be able to select the area of the screen of which the screenshot needs to be captured.
I tried searching and I couldn't find any helpful articles or documents in Qt. So can anyone help me?
PS: The idea is to create a similar app like lightshot and several other similar tools.
Thanks in advance
There are two methods that you can use for this: -
1) Capture an image of the screen and then display that, full screen to the user, essentially allowing the user to crop the image.
2) A more commonly used method is to create a full-screen, topmost window that has no title bar and is transparent. This allows the user to drag out an area, which you can draw an outline to represent the area the user requires.
I recommend the 2nd method and creating a transparent window is simply a matter of changing the window flags, as you can see here.

How to get info from a window and the modify it using AutoIT?

I am trying to automate the process of turning display layers on and off in a modeling program using AutoIt. I am currently using code that simply simulates a mouse-click at a particular pixel position and as that of course needs to be set up differently depending on the screen being used at the time, I would like to replace the mouse-click simulation with getting the information from the window, looking for a certain text, then checking or unchecking the "Map" and "Legend" check boxes.
My problem is that I don't know how to do that. If someone has a good way to include or point to screen shots let me know but until then I will try to describe everything the best that I can.
The window:
The window I am referring to is titled "Map Layers". The area that I am specifically interested is looks like a large list box (it takes up the vast majority of the window space) and it has 4 columns: Layer Name, Map, Legend, and Sample. Name has the name of the layer, Map has a check box to control which layers are displayed, Legend has a check box that controls which layers appear in the legend window, and Sample for some layers has the symbol that will appear in the legend. for my purpose the Sample column is irrelevant.
AutoIt v3 Window Info:
When I use the finder tool I can't get it to highlight the "list box" area, only the surrounding boarder that it and some buttons are in. The window info says that this surrounding boarder area (which seems similar to a panel) has a class of Button.
So my fundamental question is what code to use to drill into that "Button", find out what the list view looking thing is, and get the info from it, then interact with the map and legend check boxes without referring to pixel location (or at least grammatically get the pixel position).
If I have left out any important information or was unclear anywhere please let me know.
Edit: Forgot to mention and don't know if it helps but the info given using the finder tool for the column headers is Control: Class: SysHeader32
Try RanorexSpy and see if it can give you more details.

Adding tiles to map from multiple sources

I am working on a map for which I have multiple tiles sources that I want to be able to activate and deactivate using a menu on the side. Each tile set works independently when overlayed as an image map type, however I apparently can't show more than one of these at a time.
In any case, is it possible to display tiles from multiple tile url's? If not, then should I make some super overlay of tiles from all of my sources, and try to control which get loaded?
You can load and show as much tiles as you want to.
I can't tell you what went wrong in your approach without any code,
so I made an example: http://jsfiddle.net/doktormolle/NNJRn/
(Code for Overlay-Creation taken from the google-demo)

Masking the Google Map in iOS

In my app I have displayed some custom overlay on google map using MKOverlay with the help of TileMap sample code. My requirement is, I need to mask the entire google map underneath the overlay.That is, I want rest of the map area to appear to be in gray except my custom overlay.
Could anyone give me direction on how to achieve this?
Thanks in advance,
I don't know all the calls that you'd need to cover but I know how to find out. In the TileMap example code provided by Apple they show how the MKMapView will call for tiles. All you'd need to do is swap out the code that finds files on disk and swap in some code that always returns a grey square every time.
However this won't remove the Google logo or stop the app from downloading the map tiles from Google in the background. If you find out how to stop that please let me know.

Resources