Live updates in website? (streamerapi) - web

I was in http://finance.yahoo.com/ and checked the europe tab ( markets are open here atm) you ll see trades updating live, I went to firebug to the Net tab and there was no updates... so I wonder how are they doing that?
I can see there is a streamerapi.finance.yahoo.com that actually makes fiddler throw an error.
Anyone knows anything else about this live update?
Really interested in this, would really like to know if they are constantly polling , the updates seem to happen at irregular intervals
found some info here
Please note my interest is on the seeminly push aspect of it ( ie view is updated when there is new information)
Cheers

It is called Comet.
http://en.wikipedia.org/wiki/Comet_(programming)

It is a comet system using a hidden iframe technique. A step by step description of what is going on with streamerapi as well as a simple debug HTA to consume the feed is available on my site: AJAX Push – Comet.

Related

How can I prevent Glimpse 1.8.2 from posting to api.mixpanel.com?

At certain times in its operation, Glimpse 1.8.2 POSTs to api.mixpanel.com.
What is it sending?
How can I stop this from happening?
How can I opt out?
From "avanderhoorn" at https://groups.google.com/forum/#!searchin/getglimpse-dev/mixpanel/getglimpse-dev/7WgpX_Menz4/tnqJBwt20ZgJ:
I'm sorry this caught you off guard, that is not our intension.
This is to be expected and went out with the last release - http://blog.getglimpse.com/2014/02/04/glimpse-1-8-2-released/ (see Glimpse Insights support). Its a part of an effort to try and make better decisions for choices we make -http://blog.getglimpse.com/2014/01/22/getting-greater-insights-into-glimpse/.
It is a part of core but when switched off, its a complete removal (from the blog post):
If you do opt-out, there will be no traces of Insights in your code base. Insights was designed not simply to be a switch on or off, but to be a complete removal. Meaning no traces of the Insights code will remain if you choose to opt out.
The information being gathered can be viewed if you have a look at local storage. If you want a better view than that, you can get the client repo - https://github.com/glimpse/glimpse.client/ - and running the test client - https://github.com/Glimpse/Glimpse.Client/blob/master/test/Client.html. Once you have that open you will see a tab called "Insights" on the right which shows the data as its being collected. Also, if you want to see the source code involved, its isolated to this one file - here is the specific code that captures the events https://github.com/Glimpse/Glimpse.Client/blob/master/source/glimpse.insight.js#L345-L520.
You are right about the fact that it should be on the site. We have a new site coming out soon and its noted there. Its an oversight and the fact that we have been focusing on the new stuff. In response to an earlier question - https://twitter.com/greensky/status/431491507590160384 - we have also updated the Glimpse.axd to have the code required to opt-out. This will go out with the next release.
As an action item on this, I'll update the config help page of the current website to make sure the same information thats in the post will be noted there. Also I would like your feedback if there is anything else you think we can do to help. For the sake of completeness, the following is the opt-out code which goes in your web.config:
<glimpse>
<clientScripts>
<ignoredTypes>
<add type="Glimpse.Core.ClientScript.Insight, Glimpse.Core"/>
</ignoredTypes>
</clientScripts>
</glimpse>
Lastly, as we get time, we will be making the data collected publicly available. If this is something you are interested in helping out with, we could sure use the help. We believe that information like this will not only help us make better decisions, but help the community inform us what they want beyond what we here from the occasional person on twitter or at conferences.
Let us know what you think.

View. Show values as Links. Strange behaviour

Xpage (listPostits.xsp) has a "View" container control, where one of the column is set "show values in this column as links".
Now, here comes "Strange behaviour".
When i work with this application on my own (developer) PC (Win XP, Chrome or IE), the Domino generate the link, which can't be really processed:
/servername/db/postit/postit.nsf/listPostits.xsp/onePostit.xsp?documentId=many_numbers&action=editDocument
Namely, the Bold-marked portion shouldn't be there ! This portion is the name of the XPage, where the View control is in.
When i work with the application from other PC (Mac, Firefox) then i get the correct link (the same as above but without the XPage name inbetween):
/servername/db/postit/postit.nsf/onePostit.xsp?documentId=many_numbers&action=editDocument
update: let us leave for the moment the differencies in generated links between two machines. The first question is - why the extra portion is inserted into automatically generated link?
After playing around i think i might have found the reason for this strange behaviour. Namely, the "Substitution" Rules on the server side. One of them is to substitute "*/postit/all" with "/db/postit/postit.nsf/listPostits.xsp"
If i switch it off, then the Links are generated properly. Still, it's pretty strange to me that these settings influence the way Domino generates the links. I thought it works on the fly with them and those settings have nothing to do with the way how Links are generated inside the application.
So, the help now is needed regarding Web Site Rule Topic, but for that, i guess, i have to create another topic. But in case somebody has some good Info on this, please share it with me. I'm a bit confused at the moment :)
Final Update: Spent some more hours of testing and the results confirmed the initial idea.
If i open the page with the standart URL, i.e.
http://servername/db/postit/postit.nsf/listPostits.xsp then everything is fine, links are generated properly. When i however open the same page with short URL http://servername/postit/all , then server adds the substitute URL (db/postit/postit.nsf/listPostits.xsp) to every single link he generates automatically to be used as the link to open/edit the underlying document.
Is it bug or feature ? Don't know.
As a workaround (because i want to keep simple URL's for the application) i have to manually generate links.

problems testing sharepoint with selenium (timeouts, repeating auth and missed links)

I have some serious problems testing a sharepoint site with selenium/bromine. As I did't find an answer via various searches I hope someone here can point me in the right direction.
I am constantly getting timeouts opening the main page, but the server is definetly fast enough to answer the request and at 90% idle. Nevertheless I just get logs like these:
open http://username:passwd#10.13.110.54/default.aspx | Timed out after 90000ms
Test terminated The selenium server did not return OK
The auth popup is popping up at irregular intervals (every 5 to 10 clicks) although every open command uses the http://username:passwd#10.13.110.54/ as prefix
Clicking on elements is sometimes not registered, the logs show a successful
isElementPresent link=myLink
click link=myLink
but the browser doesn't react. These are mainly in-page links which open a new folder or an editing box.
I'm not sure whether I should have posted the in three separate questions, but I didn't want to spam.
Hope someone can help me, as I have these problems now for nearly 3 weeks.
Thanks in advance
Thomas
For your question number 2: Okay, this is a really late reply. I stumbled on this page looking for the answer myself. Given that I have solved it in the meantime, I figured I'd post my answer for other people stumbling onto this page.
General solution:
You need to create or use a profile that will let firefox automatically forward your credentials to the sharepoint website. You can create the profile manually and call it each time, see https://applicationtestingtips.wordpress.com/2009/12/21/seleniumrc-handle-windows-authentication-firefox/ for instructions.
Programmer solution: (works in python, should work similarly in Java)
Or you can create a new profile on the fly each time. I did that based on the information in the previously mentioned website. I use python for calling selenium, but this should be rather similar in whatever language you use to call selenium:
sharepointHosts = 'sharepoint1.mycompany.com,sharepoint2.mycompany.com' #have all your sharepoint hosts here in a comma-separated list
ffProfile.set_preference('network.automatic-ntlm-auth.trusted-uris', sharepointHosts)
ffProfile.set_preference('network.negotiate-auth.delegation-uris', sharepointHosts)
ffProfile.set_preference('network.negotiate-auth.trusted-uris', sharepointHosts)
driver = webdriver.Firefox(firefox_profile=ffProfile)

Google docs viewer url parameters

Is there any sort of documentation on exactly what parameters you can put in the url of Google viewer?
Originally, I thought it was just url,embedded,chrome, but I've recently come accross other funny ones like a,pagenumber, and a few others for authentication etc.
Any clues?
One I know is "chrome"
If you've got https://docs.google.com/viewer?........;chrome=true
then you see a fairly heavy UI version of that doc, however with "chrome=false" you get a compact version.
But indeed, I'd like a complete list myself!
I know this question is very old and perhaps you already solved your issue, but for anyone on the internet who might be looking for an answer...
I have been looking for this recently, following a guide I found on GitHub Gist
https://gist.github.com/tzmartin/1cf85dc3d975f94cfddc04bc0dd399be
More specifically, the option to embed a certain page of pdf using
<iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>
The best I could fing was this article (I suppose from a long time now)
https://weekly-geekly.github.io/articles/111647/index.html
HOWEVER, I tried modifying the attributes and the result was simply a redirect to
https://drive.google.com/file/d/[ID]/edit
https://drive.google.com/file/d/[ID]/preview or
https://drive.google.com/file/d/[ID]/view
AS OF MAY 2020, THIS SOLUTION PROBABLY DOESN'T WORK
I'm also on a quest to discover some of the parameters of the viewer.
the "chrome" parameter doesn't seem to do anything, though. Is this
supposed to be the same as embedded=true?
Parameters I know of:
url= (obviously)
embedded= (obviously)
hl= set language of UI (tooltips)
#:0.page.1 = jump to page 2 (page 1 is numbered 0) - this is unreliable and often requires a refresh after the first load,
defeating the purpose.
That said, when I use the Google Docs viewer on my site, "fit page to
screen" is the default view without any parameters. So maybe I'm
misunderstanding your question.
Source: For convenience, this is a full quote of the sole answer (it is from user k3david) to the crosspost of this question #Doc has posted to the Google support forum in 2011.
You can pass q=whatever to pass a search query to the viewer.

Is the Cross Domain Fragment Identifier hack no longer working?

I see this referenced a lot: http://ajaxify.com/run/crossframe/
And I noticed now it's no longer working for the IFRAME (child) to change the parents hash.
I've been spending a few hours trying various things wondering why this isn't working anymore -- then I finally realized that the example I originally based it on was down too.
Can anybody confirm?
-
-
I need to use a cross domain iframe to take care of an order upload form that our shopping cart doesn't support, and I need the form to return an order ID to the parent, so that I can associate the data between the two servers.
Any recommendations or directions to head in would be appreciated.
I'm not looking for a shortcut or somebody to do my work. I've been reading all day... I just need a nudge in the right direction.
Thanks!
It is partly browser-specific. For instance, some browsers don't allow a nested child frame (iframe within an iframe) to change its parent's fragment. See this blog entry. But the basic functionality still works in recent browsers. This demo, which has an iframe change its parent, and vice versa (single level) works fine in Firefox 3.5.9 and Chrome 5.0.375.99.
The demo you gave also works both ways in that version of Firefox. It doesn't allow the child to change the parent in Chrome. The main difference seems to be that the working one uses parent.location, while the broken one uses parent.window.location.hash.
The best solution for recent browsers is postMessage. If necessary, you can also use a server proxy.

Resources