Are there free realtime financial data feeds since the demise of OpenQuant? [closed]

I think you’ll find all you need to know by looking at this question: source of historical stock data I don’t know of any free data feeds other than Yahoo!, but it doesn’t offer tick-by-tick data, it only offers 1 minute intervals with a 15 minute delay. If you want to use an already existing … Read more

socket.io determine if a user is online or offline

If your clients have specific user IDs they need to send them to socket.io server. E.g. on client side you can do // Browser (front-end) <script> const socket = io(); socket.emit(‘login’,{userId:’YourUserID’}); </script> And on server you will put something like // server (back-end) const users = {}; io.on(‘connection’, function(socket){ console.log(‘a user connected’); socket.on(‘login’, function(data){ console.log(‘a … Read more

Android – Losing incoming (hi-speed) USB data

I’ve encountered this kind of problem before. Forget using Java, in the background it’s doing untold number of things that prevent realtime access, e.g. garbage collection, thread processing. Also forget using event-driven programming, even in high priority threads, it can take a long time before the event is processed and you can lose data. The … Read more

Real time line graph with nvd3.js

You probably want to look at: D3 Real-Time streamgraph (Graph Data Visualization), especially the link of the answer: http://bost.ocks.org/mike/path/ In general, I see two ways to deal with the vertical transition problem: oversampling having some linear interpolation between the real point, and the smaller the interval between points, the more “horizontal” the vertical transition will … Read more

How do real time updates work?

Stack Overflow is using Web Sockets for real time updates. If you take a look in the source code (2012 source code), you would see: StackExchange.ready(function () { StackExchange.realtime.init(‘ws://sockets.ny.stackexchange.com’); StackExchange.realtime.subscribeToInboxNotifications(); StackExchange.realtime.subscribeToReputationNotifications(‘1’); }); But note that some Opera versions do not support WebSocket. (not until Opera 10.70) However Facebook does not seem to be using Web … Read more

Is there a way to ‘listen’ for a database event and update a page in real time?

This isn’t too difficult. The simple way would be to add via .append: $( ‘#table > tbody:last’).append(‘<tr id=”id”><td>stuff</td></tr>’); Adding elements real-time isn’t entirely possible. You’d have to run an Ajax query that updates in a loop to “catch” the change. So, not totally real-time, but very, very close to it. Your user really wouldn’t notice … Read more

How do you write a real-time webbased collaboration tool such as google docs?

Google Docs works via operational transformation. The basic idea of operational transformation is to transform (or adjust) the parameters of an editing operation according to the effects of previously executed concurrent operations so that the transformed operation can achieve the correct effect and maintain document consistency. Google produced a video about operational transformation for Google … Read more

How do I plot in real-time in a while loop?

Here’s the working version of the code in question (requires at least version Matplotlib 1.1.0 from 2011-11-14): import numpy as np import matplotlib.pyplot as plt plt.axis([0, 10, 0, 1]) for i in range(10): y = np.random.random() plt.scatter(i, y) plt.pause(0.05) plt.show() Note the call to plt.pause(0.05), which both draws the new data and runs the GUI’s … Read more

how to shield a cpu from the linux scheduler (prevent it scheduling threads onto that cpu)?

The answer is to use cpusets. The python cpuset utility makes it easy to configure them. Basic concepts 3 cpusets root: present in all configurations and contains all cpus (unshielded) system: contains cpus used for system tasks – the ones which need to run but aren’t “important” (unshielded) user: contains cpus used for “important” tasks … Read more