Using 2 htmlwidgets in 1 R-Shiny Application - html

I am working on creating widgets to work with specific D3 visualizations. I have successfully created both of the widgets I want to use. However, when I use these two widgets in the same R-Shiny application, only the first widget used has the CSS file added to the source code. The second widget called has its CSS left off. Resulting in some odd looking visualizations.
How can I work around this?
I call HEBOutput() and CITOutput() - my two functions. Thus, HEBcss.css is put into the source code, but CITcss.css is not.

Related

how to add coustomized side frame to doxygen html

I am using doxygen to generate an API document for my project written in pure C. I want to have a left side frame in the index.html generated by doxygen. So I enabled the option "GENERATE_TREEVIEW" in Doxyfile, but I am not satisfied with its layout.
I want a brief tree layout, not like this :
Files
File List
File Members
All
Functions
I have only one file to export, so I don't need "File List".
I have only functions to export(no variables, class etc.), so I don't need "File members".
And, the most reason I want to customize is that I want to classify my API into several different sub-class. Just like this:
Cursor Operation
vi_h()
vi_j()
vi_k()
vi_l()
Text Edit
vi_dw()
vi_dd()
Text Search
vi_f()
vi_F()
But doxygen seems doesn't provide a way to customize the side frame.
I have thought about another way: give up side frame, and use an category page, which can be accomplished using \section and #ref. But this is not good for readers, because every time they click, they have to switch to another web-brower tab, slow and inconvenient.

Reusable HTML Blocks in Sitecore

I'm looking for a way to create a reusable HTML widget for a website run on Sitecore 8. My original idea was to create a data template that basically consisted of a single Rich Textbox. The idea is that you could drop any number of instances of these widgets on a placeholder and it would render out the HTML from each instance of the widget on the page and in the correct placeholder.
Example:
A content item called /products/my-product is based off of "Product" data template
It consists of some fields on the Product template (maybe product name, price)
I'd like the ability for the content editor to quickly drop one or more instances of the HTML widget on the page (say, in the right rail or in a different placeholder on the sublayout. I know I could just throw a "notes" field on the product template, but I'd like to make it more dynamic so that they can add several instances of this HTML widget and place them anywhere they desire.
I quickly realized that because we need the ability for multiple instances of this widget, a data template was not enough because each instance of the widget would needs its own data to populate on the front. Thus, my idea was to allow the content editor to add HTML widgets as a child of the current item (so each item would have its own instance data). I don't think this will work because I don't know of a way to have these children tell the parent page which placeholder to put them in, so laying them out is a problem.
I also thought about somehow setting the placeholder name as a parameter or field on the data template for the HTML widget, but I couldn't figure out how to get Sitecore to dynamically add them to a placeholder when it glues everything together.
Is there a way to achieve what I'm trying to do? Seems like a reusable HTML (or other kind of widget, for that matter) would be a fairly common need. I feel like there's an easy Sitecore way to handle this that I'm missing and overcomplicating the solution.
From what I understand, you're looking for Datasource field of a component.
Basically you:
Create a data template which contains fields necessary for your component
Create a set of items using that templates
Allow authors to select one of them as the Datasource for your component.
It's built in Sitecore functionality.
Check blog post http://firebreaksice.com/using-the-datasource-field-with-sitecore-sublayouts/ or google for Sitecore datasource.
Other links:
http://www.nonlinearcreations.com/Digital/how-we-think/articles/2014/03/4-patterns-Sitecore-component-development.aspx
http://www.nonlinearcreations.com/Digital/how-we-think/articles/2015/04/Sitecore-templates.aspx
EDIT:
Read about Datasource Location field (defining the repository of datasources location) here: http://www.sitecore.net/learn/blogs/technical-blogs/getting-to-know-sitecore/posts/2011/01/handling-presentation-component-settings.aspx
Read about Datasources and MVC here: http://jockstothecore.com/sitecore-mvc-item-maze/

MVC 5 Cascading Data

I am working on an MVC 5 razor page (using Entity Framework 6) that will display Vendor information. Each vendor can have multiple classes, and each class can have multiple subclasses. What I want to do is display the vendor information at the top, show the list of classes below that info, and then have a third section with a list of subclasses for the selected class. My question is what is the best way to do this?
Currently I am trying to do it with the main page getting passed a model of type vendor, and then within that page, displaying two partial views via #Html.Action("ActionName", "ControllerName", value). I can pass the class list partial view the ID of the vendor when the page loads without issue, the real problem is figuring out how to pass the selected ID of a class to the partial view for subclass. I've tried using hidden fields, but I'm not sure how to pass the html.Action the value of the hidden field.
This is my first MVC application, so any help is much appreciated.
First off, you are saying that you are using partial views with #Html.Action() helper - this is not for a partial view, but rather to produce a link to navigate to another page...That being said, I think I know what you want to do.
Second off, you need to post more code to show you made an attempt - stack overflow is not a source of free development consulting work. I think I know what you are trying to do, but even posting some sort of UI mockup might make a general discussion easier. That being said, I won't give you any code in the answer, just a general idea of how I would approach the problem.
To start, you should have a dedicated controller for Vendor, VendorClasses, and whatever the third subclass is (I'm going to assume its called VendorSubClass for the sake of example) since you chose the MVC pattern.
Next comes the part about displaying all of the information on a single page. The only place I could potentially see it making sense to show all of that info is on the views for VendorSubClass (however only VendorSubClass properties should be editable here) and even then, it might just make sense to have really informative breadcrumbs instead.
You would need to pass an object to the view that contained the VendorSubClass, its parent VendorClass, and its grandparent Vendor information. If you're using entity framework, this is a snap (but you didn't say you were so I'm making my explanation more generic). Then, you can reference partial views by using the helpers:
#Html.Partial('VendorPartial', Model.Vendor)
#Html.Partial('VendorClassPartial', Model.VendorClass)
as you can see above, I am not passing IDs - but rather the actual properties(objects) themselves which the partial views will use to render the details. This overview should get you started and give you some stuff to google.

Displaying blog entries with identical google maps

You can see my problem here:link deleted
Basically I can not display the full text of my posts on the front page because the maps will conflict.
These are the expanded posts that right now I am displaying as collapse on my front page
link deleted
link deleted
As soon as I display them expanded the maps overlap
Changing the map name variable in the code does not solve the problem, neither changing the name of the where I display the maps (right now they are the same but I tried that)
Question: I do realize that when I display two maps on the same page there will be two "iniktialize" functions. Also the two pages have identical java script function names. How do I deal with these ?
I do realize that when I display two maps on the same page there will be two "iniktialize" functions. Also the two pages have identical java script function names. How do I deal with these ?
You can't have multiple functions with the same name (the browser will pick one version and us it, different browsers might pick different versions). Either give them different names, or if they do the same thing with different data, use the parameters passed in to give you the unique behavior.

My slots not listed in Qt Creator Signal/Slot editor

I created a Qt4 Gui application. I have the main window. I put a QStackedWidget and two QPushButtons on the MainWindow's central widget. I am using QtCreator as my IDE.
In the attached image the shown stacked widget has two pages and the two pushButtons 1 and 2 are for navigation to firstPage and SecondPage of the stacked widget respectively.
Problem 1:
When I opened signal/slot editor I selected sender=button1 and signal=clicked, then receiver=stackedWidget and slot=? . It supposed to be setCurrentIndex() but its not listed in the drop down list.
Problem 2:
In the right object panel of QtCreator there is marked the "Denied Symbols". I don't know why those symbols are there? Is there any problem ?
I am attaching the screenshot below. If any more details are required please let me know.
I too am learning QT and QT Designer, and ran into the same problem. A determined search of the Internet revealed several other people with the same question, and no answers. You'd think someone out there would have explained it by now. Sigh.
Anyway, the problem is that the signals sent by the push-buttons don't match the signature of the "setCurrentIndex(int)" slot on the stacked-widget, so "setCurrentIndex(int)" doesn't show up in the menu when one tries to use a push-button "clicked()" signal. That is, "clicked()" has no parameters, and "setCurrentIndex(int)" has a single integer parameter, therefore they have different signatures.
In my project, I was trying to connect menu items to a stacked widget, so that one of the contained widgets would be displayed when the menu item was selected. The menu items only have the "triggered()" signal, there's no "triggered(int)" signal, and QStackedWidget's "setCurrentIndex(int)" slot is expecting a signal that has a single integer parameter in its signature.
In other words, you can't do what you want, directly.
Here's how I solved it in my code. Keep in mind that I'm writing my Qt app in C#, using MonoDevelop (to do C# development under Linux) and Qyoto (which is a C# interface to Qt).
After creating my main window (and assiging it to a variable called "layout"), I did this:
QObject.Connect (layout.someMenuItem, SIGNAL("triggered()"), showSomeView);
This causes my menu item to call the showSomeView() function whenever it's triggered.
I then wrote
public void showSomeView()
{
layout.stackedWidget.SetCurrentWidget(layout.someView);
}
Now it does what I mean!
The solution in your project's language should be similar to this. It's unfortunate that the signal/slot connections have to be set up in code, instead of in QT Designer's GUI, but I don't know how else to do it.