Is there any way to print the powerbi-embedded report - powerbi

Embeddded the report using powerbi-client-angular-wrapper demo code. Is there any option to view the report in fullscreen and print the embedded report

Since you are using powerbi-client-angular wrapper demo code, Use Apis to view the report in fullscreen and print the report.
this.reportObj.getReport().fullscreen(); // View the report in fullscreen
this.reportObj.getReport().print(); // Print the report
References:
https://learn.microsoft.com/javascript/api/overview/powerbi/embedding-basic-interactions

Related

OMNeT ++ direct message transmission visualizations in 3D

I am new to OMNeT++ and I'm trying to implement a drone network that communicate with each other using direct messages.
I want to visualize my drone network with the 3D visualization in OMNeT using the OsgVisualizer in inet.visualizer.scene package.
In the dronenetwork.ned file, I have used the IntegratedVisualizer and the OsgGeographicCoordinateSystem. Then in the omnetpp.ini file, the map file to be used is defined and so the map loading and mobility of the drones works fine in the 3D visualization of the simulation run.
However, the message transmissions between the drones are not visualized in 3D even though this is properly visualized in the 2D canvas mode.
I tried adding both NetworkNodeOsgVisualizer and NetworkConnectionOsgVisualizer to my drone module as visualization simple modules and also I have defined the drones as a #networkNode and #networkConnectionNode. But it still hasn't been able to visualize the message transmissions.
Any help or hint regarding this would be highly appreciated.
Code used for visualizations in the simple module drone is as follows
import inet.visualizer.scene.NetworkNodeOsgVisualizer;
import inet.visualizer.scene.NetworkConnectionOsgVisualizer;
module drone
{
parameters:
#networkNode;
#networkConnection;
submodules:
networkNodeOsgVisualizer: NetworkNodeOsgVisualizer {
#display("p=207,50");
displayModuleName = true;
visualizationTargetModule = "^.^";
visualizationSubjectModule = "wirelessInterface.^.^";
}
networkConnectionOsgVisualizer : NetworkConnectionOsgVisualizer{
visualizationTargetModule = "^.^";
visualizationSubjectModule = "wirelessInterface.^.^";
displayNetworkConnections = true;
}
Thank you
Message passing and direct message sending visualizations are special cases implemented by the Qtenv automatically for 2D (default) visualization only. You can add custom 2D message visualization (like the one in the aloha example). OMNeT++ does not provide any 3D visualization by default. All the code must be provided by the model (INET in this case). This is also true for any transient visualization. There is an example for this in the osg-earth omnet example where communication between cows are visualized by inflating bubbles.
So, you have to implement your own visualization effect. There is something in INET which is pretty close to what you want: DataLinkOsgVisualizer and PhysicalLinkOsgVisualizer which flashes an arrow if communication on data link or physical layer has occurred. This is not the same as message passing, but close enough. Or you can implement your own animation using these visualizers as a sample.

Exception in TOpenDialog when closing program

When I use TOpenDialog, after closing the program, there is an exception in the Vcl.Forms module.
Program I'm using:
std::auto_ptr<TOpenDialog> OpenDialog (new TOpenDialog(this));
if ( OpenDialog->Execute() ){}
Exception: 'access violation at 0x008133a4: read of address 0x000000c4'
Highlighted is line: if not FHandleCreated then
function TApplication.GetDialogHandle: HWND;
begin
if not FHandleCreated then
Result := SendMessage(Handle, CM_DIALOGHANDLE, 1, 0)
else
Result := FDialogHandle;
end;
I confirm this issue. I have project that uses TOpenDialog component.
There was no problem with RAD C++ Builder 10.2 (Tokyo).
But now I get same error after upgrading to RAD C++ Builder 10.4 Update 2 (Sydney).
I don't use dynamic creation TOpenDialog with auto_ptr.
Instead, I just dragged component on my form. So code is very simple:
if(!OpenDialog1->Execute())
return;
It's enough to open this dialog, do nothing, press cancel and then close app.
After that I got the same access violation like Jacek had.
So problem is in C++ Builder 10.4
UPDATE:
The problem is not in C++ Builder 10.4 itself.
The error raises when application uses Custom Styles (Themes).
I just disabled Custom Styles in my app and there is no error with OpenDialog.
One possible workaround is to disable styling for common dialogs:
TStyleManager::SystemHooks = TStyleManager::SystemHooks >> TStyleManager::TSystemHook::shDialogs;
Another possible workaround is to set the option ofOldStyleDialog.
The dialog looks old-style but has colors compatible with Widows Themes.
OpenDialog1->Options << ofOldStyleDialog;

SwiftUI fails to build preview with compiling error

When I go to view my SwiftUI through the canvas preview in Xcode 11.3.1 I am getting the error
Compiling failed: 'Color' is only available in iOS 13.0 or newer
But the project itself builds successfully and the simulator loads without any issues. I have tried clearing the build folder, quitting Xcode and rebuilding but still no luck.
Any help would be great. Thanks in advance.
SwiftUI minimum deployment target is 13.0, so if you have project with support of older version, then all SwiftUI code (including preview providers) you have to prepend with availability modifier, like
#available(iOS 13.0, *) // << here !!
struct Demo: View {
var body: some View {
VStack {
Text("Hello")
}
}
}
You Should use Assets or Other option like Color Literal for Color.
Don't use the system Color option since your deployment target is 11.4.
Man, I've had a similar issue. The problem was that sometimes my preview worked sometimes it didn't... I reviewed the diagnostics and realized that there are some #_dynamicReplacement attributes mentioned (which are used, I guess, for hot reloading). It wasn't working when I've had a file with #available attributes opened in the (adjacent) editor. When I closed that editor everything worked back again.
Magic ✨
Also one more hint from my friend - when you have a file from another target (not the one hosting your Canvas-related code) in (adjacent) editor it behaves the same way.

django dump out a variable

In Django can I dump out a variable to see what is in it within a view (not using command line)?
for example:
device = mobile(request)
print device
abort
or
device = mobile(request)
return HttpResponse(device)
Writing to a file is usually a fool-proof way to "dump" data as a debug method when you are working with a hooked framework that doesn't otherwise lend itself well to direct debugging.
e.g.
device = mobile(request)
with open('path/to/debug_out.txt', 'w') as outfile:
outfile.write(device)
abort
for convenience, you could put this in a predefined function in some debug helper module. Alternatively, you could use sys.excepthook to automatically write all exceptions to this file, before forwarding/re-raising them.
There is a similar question:
Django debug display all variables of a page
You can type
assert False, locals()
in your view to see all your view variables. Or use the {%debug%} template tag inside your template which will do the same.

Change line Color in the lineChart Example on the Gadget Server

I am running the lineChart gadget example which makes use of the visualization framework on the gadget server. It runs fine with data being displayed every second. I want to change the color of the line but I cannot find any method inside the gadget code which can set the line color. In the following piece of code you can set some properties.
window.onload = function () {
var lineChart = new wso2vis.s.chart.protovis.LineChart("chart","MNT-Lab : LabVIEW Simulation","");
lineChart.dataField(["Response", "Terminal"])
.dataValue(["Value"])
.dataLabel(["Name"])
.width(380)
.height(300)
.band(50)
.legend(true)
.marks(true)
.dirFromLeft(true)
.xSuffix("s");
But i am a bit confused on how and where the default color of the line is being set. I have looked inside the wso2vis.js file but cannot see any methods to change the color.
WSO2Vis.js is renamed to viskit.js and is now hosted at GitHub [1]. for your question you can change the rgba values in [2].
Regards,
Nuwan
[1] http://wso2.github.com/viskit/
[2] https://github.com/wso2/viskit/blob/master/js/subscriber/chart/protovis/LineChart.js