Why does qTip2 use .removeData() and .data() in the growl example - qtip2

I'm starting to use qTip2, and I'm looking the demos of the site. I was trying to understand this one but I didn't understand this so much. I can't understand this part:
...
}).removeData('qtip');
...
$(this).data('qtip');
...
I'd like to know why and for what .removeData() and .data() were used.
Could someone help me to understand it?

In the official forum of qtip 2, the creator of qtip2, Craig, answered me!
Craig Wrote: "The removeData is just a "hack" to allow more than one qTip to be bound to a single element at any one time, hence allowing multiple jGrowl(s). The .data() call is just there to grab the qTip API object from each of the matched objects."
:)

Related

Accessing Area.Name Throws Error

I'm just trying to find a way to access the name property of an Area element inside Revit Python Shell, tried looking on Jeremy Tammik's amazingly informative blog, tried AUGI, Revit API docs, been looking for 2 days now...
Tried accessing via a bunch of ways, FilteredElementsCollector(doc).OfCategory(BuiltInCategory.OST_Areas), tried by Area class, tried through AreaTag, every single time I get an error under every circumstance and it's driving me nuts, it seems like such a simple issue that I can't seem to grasp!
EDIT: Also tried by element id, through tags, through area schemes, nada, no go...
Can anyone please tell me how to access this property via RPS?
I would say two things:
areaObject.LookupParameter("Name")
areaObject.GetParameters("Name")
...are valid methods. Please notice how I used GetParameters() NOT GetParameter(). There are some drawbacks to using either one of the two. The lookup method will return FIRST parameter that matches the name which in many cases might be a different parameter for different elements. It's not very reliable.
GetParameters() method will return them all if there are multiple so then you have to deal with a List<Parameter> rather than a single object that you can extract your value from.
I would personally recommend to use areaObject.get_Parameter(BuiltInParameter.ROOM_NAME) method to extract a Name value from Area object. The BuiltInParameter always points at the same parameter, and will reliably return just that one parameter. Here's a little more details about these methods:
http://www.revitapidocs.com/2018/4400b9f8-3787-0947-5113-2522ff5e5de2.htm
To answer my own question, I actually never thought of looking through the code of other Revit Python scripts... in this case of PyRevit, which is in my opinion far more eloquently written than RPS, raelly looking forward for their console work to be done!
Basically, I had mistakenly used GetParameter('parameter') instead of LookupParameter('parameter').
As I said, it was something stupidly simple that I just didn't understand.
If anyone has sufficient knowledge to coherently clarify this, please do answer!
Many thanks!
Maybe your issue is the same as this one ? :
https://groups.google.com/forum/#!searchin/RevitPythonShell/name|sort:relevance/revitpythonshell/uaxB1FLXG80/sdJNrTfoPuUJ
Your_Area.Name # throws error
Element.Name.GetValue(Your_Area) # works great

What is react-virtualized is all about? How its different from normal react.js?

how react-virtualized in different than normal reactJs. Can anyone please explain me with an example ?
Thanks in advance.
Author of react-virtualized here. I think you might find the slides from a recent presentation I made about the library helpful. I suggest starting here and stepping through the slides (by pressing the right arrow key): https://bvaughn.github.io/forward-js-2017/#/10/0
I think this talk will be posted to the Forward JS YouTube channel soon but as of now, only the slides are available.
In short, react-virtualized helps improve the performance of your React application by limiting the number of calls to render as well as the number of DOM elements created and added to the page.
Edit: Link to the Forward JS talk

Three20: example of showMenu:forCell

I am not able to find any example that uses this function.
I need to see how implement a menu selecting a row in a table.
Can someone help?
Have you seen TTTableViewController showMenu:forCell: example?
The last comment on the only answer has a link to a github that has some example code. I think the author of the only answer is also the person who wrote http://cybersam.com/programming/tttableviewcontroller-showmenuforcell-example

Beginning Greasemonkey Help: Modifying Page Source Code?

I'm quite new to Greasemonkey so bear with me. I'm trying to create a script that modifies the value of an ID of a webpage, and then enters a word into a textbox ID and presses submit.
How would I go about doing this? What code would I use?
Thanks in advance!
Learn about Greasemonkey by:
Examining the introduction and tutorials.
Inspect the code of GM scripts that are similar to what you want to do. You can find a mess of useful scripts at userscripts.org.
In general, beginner's guides are not encouraged at StackOverflow. The beginners-guide tag is not allowed to be used, and the beginner tag was ruthlessly "disappeared", for example.
Re:
"How would I go about doing this? What code would I use?"
If you want us to write code from scratch for you**, then you must provide more detail and/or show some evidence of effort.
In this case, link to the page your GM script will modify. Or, at the very least, post a sufficiently complete code snippet of the page and list exactly how you want it modified.
**Note that such requests rarely find much traction at SO. This site is for programmers helping other programmers.
Do you know jQuery?
It is easy to learn, easy to handle and easy to implement into Greasemonkey!
Just add
// #require http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js
to the metadata of your script and code like you normally would with jQuery, except that you have GM_* commands to execute commands usual javascript is restricted.

Accessing YUI RichTextEditor node

I'm inserting images to editor with id param. after that i'm trying to access it with Dom.get('id'), but it returns null.
I understand that it returns null because it works under parent window's scope. Is there any standard way to access it?
For specialized YUI-related questions, and especially if you don't get the answer you're looking for on StackOverflow, you may want to post to http://yuilibrary.com/forum -- the YUI devs and many YUI specialists spend time there, and that's typically the best place to get YUI-related help.

Resources