Continuously pulling variables off a website to use on Matlab? - matlab

I am trying to continuously pull variables off this website (or a similar website)
https://finance.google.com/finance?q=NYSE%3AGM&ei=-MUaWsnNCIKPUM3ngbAG
and use the variables in a Matlab code for some calculations. The variables i need are in the picture below.
I realize i could download a .txt from another site with the info but I need to update the variables every 10 secs or so, so that's not going to work.
I would really appreciate any help in terms of where I can find resources to do this or something that will get me started. thank you!

Use this code:
http://luminouslogic.com/matlab_stock_scripts/get_last_trade_google.m
Using get_last_trade_google('GM') will give you number 2, I guess you can figure out yourself how to get the other ones as well.

Related

Is there any way to break up a PDFTable onto a different page?

First time poster here...but been using StackOverflow for solutions whenever I get stuck.. ton of great information here! I will try to describe the question as thoroughly as I can and hope someone can help me out with it. I need to generate a PDF in Swift and present it on an iPad, so i decided to use TPPDF for the PDF generation and then Apple's PDFKit to present it.
TPPDF has been working great for me, however, I ran into an issue where if I create a PDFTable with an enough amount of rows, it overflows into the next page without creating a new table. The last row gets cut off about 1/3 way and the other 2/3 is generated on the next page. This creates a weird visual effect which i'd rather not have if it's possible.
I've been reading through the documentation as well as sifting through the source code to try and figure out if there's a way but I can't find a decent workaround. The only workaround I can think of is splitting up the content and creating multiple PDFTables on new pages (using the createNewPage() method). This would take a good amount of rework in my code so I wanted to post it here to see if anyone has come across this and come up with a solution.
I appreciate any help!!
-George
thanks for asking, this is actually an on-going issue which occured after adding the merge-cell feature. This is discussed in issue #243, so you take a closer look at what's going on there.

Use responsive images with Kirby CMS REST API

I am evaluating a completely headless setup with kirby.
I would like to be able to upload an image in one big size and kirby should generate different sizes of responsive images. (I know this feature from WordPress where this is possible).
I see there is this: https://getkirby.com/docs/guide/templates/resize-images-on-the-fly
But this is all php kirby code, and I want just to consume the REST API. So now kirby syntax available.
I tried to preconfigure the sizes within site/config/config.php but when uploading a new image, it would not save it in different sizes…
I then thought, maybe it would just generate the specific size the first time the image is requested. I've seen this behaviour with multiple CDNs. But also I did not find any documentation about that.
So what would be the best way to upload an image, and then being able to load a resized version of that image via REST API?
Is there even a possibility?
thank you for every input on that.
Cheers
Well some time has passed and I learnt a bit more about kirby and how it works.
The image is generated on the fly, when executing kirby syntax like $file->resize(720, null, 60)->url() (read more: https://getkirby.com/docs/guide/templates/resize-images-on-the-fly)
So to get images in different sizes via REST API, one can write a custom route where you are responsible of executing these resize commands whenever somebody is consuming this endpoint. A simpler solution would be using the plugin better-rest (https://github.com/robinscholz/better-rest) which does part of it for you already (for example in the better-rest endpoint images are amongst other stuff returned as srcset).
I hope this helps somebody one day. Cheers

Using grunt-contrib-copy for changing Test URLs to Production URLs

I'm trying to figure out the best way of changing the URLs of files that are shared across multiple apps, from test URLs to production URLs upon deployment. I know that grunt-contrib-copy allows for regular expressions to be used to make changes such as these but I'm wondering...is this the optimal solution? Is there a better way of doing this? What approaches are others using?
Thx.
Check an answer I made on a question close to yours :
How to set AngularjJS base URL dynamically based on fetched environment variable?
Basically, you can do this with Grunt and grunt-contrib-copy or grunt-preprocess ... It's up to you if you want to replace strings or pick the right config file..
Hope this helps

Have two different images that are both shown the same

I'm trying to write a documentation for a code that I've put on bit bucket. The documentation involves math formulae and as far as I know, there is no way to have inline formula in bit bucket except by using some latex-to-image convertor online and inlining those images into the documentation that is written via markdown.
I used this website as my latex-to-image convertor:
http://www.sciweavers.org/free-online-latex-equation-editor
I have two separate formulae with two different links and I include them in my markdown code as:
1)
(source: sciweavers.org)
(source: sciweavers.org)
If you edit my question, you would see the actual link and you would see that they are different. You could easily see that one of them involves $\lambda$ while the other involves $\beta$ but for some unknown reasons both on documentation as well as here in my question, these formulae are shown the same. I spent a lot of time on it and still not figured out why they are the same.
I really appreciate your help.
The problem is that both images returned by http://www.sciweavers.org/, while having different URLs, appear to be the same request. The sciweavers server is returning the same image for both URLs, which could be considered a bug on their part. However, I suspect they don't care because they were not expecting to be linked to, to generate images for you.
Hmmm, however, editting the equation to only the difference seems to work fairly reliably. Therefore, I conclude that sciweavers' server is not doing a good job of determining when an identical request is made.

JBoss Monitoring with Cacti

If there is anyone out there who has experience with monitoring JBoss with Cacti, I need help!
I used this template posted on the Cacti forums. It has 3 template graphs, and 2 of those graphs are working really well.
For some reason though, the third graph (Transaction Manager) isn't working. I'm get 0's for all the values. I got 0's again when I tried using snmpget command (from the Net-SNMP tool) using the oid's of the transaction attriubtes (.1.2.3.4.5.1. 6,7,8). What might be causing this?
I also need to monitor some attributes that aren't in the template. One example is Connection Count. I decided to copy the template exactly and only change the oid to get the attribute I want from JBoss. This didn't work as I get -1 for all the values in my graph. Is there anything I need to do on the JBoss side to get these attributes to graph?
Any help is appreciated as I really really need to get these graphs working soon.
Thanks in advance!
Did you installed the SNMP Adaptor ?
The other data graphs seems to be get directly from the SO.
https://www.webnms.com/snmpadaptor/help/jboss_snmp_adaptor/deploying_and_testing_the_jboss_snmp_agent.html