-I want to buy nodemcu board and apply the Pythagora's Theorem but I dont know if sqr function exists on nodemcu lua interpreter ?
I googled on web and I found few doc with sqr() but on official Faq math funtions are omitted:
-The debug and math libraries have also been omitted to reduce the runtime footprint.-
(https://nodemcu.readthedocs.io/en/dev/en/lua-developer-faq/.)
Does it exist?
Thanks so much
I dont know if sqr function exists on nodemcu lua interpreter ?
Not it is not available. You may want to subscribe to https://github.com/nodemcu/nodemcu-firmware/issues/1280.
If you're going to use the wifi capabilities, you could also use a RESTful service to let an external server do your SQRT() calculations and then use the result you receive . You can search for the "math" tag on Programmableweb, but i have linked you the wolfram Alpha API , which can do more than just math.
http://www.programmableweb.com/api/wolfram-alpha
Related
We have a requirement where we need to send .avro file as an input request to our API's. Really stuck at this point. If any detail example provided would be more appreciated.
Just use Java interop: https://github.com/intuit/karate#calling-java
You need to write a helper (start with a static method) to convert JSON to Avro and vice versa. I know teams using this for gRPC. Read this thread for tips: https://github.com/intuit/karate/issues/412
Also there is even a "karate-grpc" project: https://github.com/pecker-io/karate-grpc
Also see:
https://twitter.com/KarateDSL/status/1128170638223364097
https://twitter.com/KarateDSL/status/1417023536082812935
I'm working on a task to build the end to end communication on the Bluenrg1/2 chip,does it supports the audio commands and converts it to the digital signals, though it has the PDM streaming.
Could anyone give more insight on this.
Thank you in advance
Please check FP-AUD-BVLINK1 software package:
https://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-ode-function-pack-sw/fp-aud-bvlink1.html
The package is based on BlueNRG-MS which also works with BlueNRG-1 acting as a network coprocessor.
The user manual is evaluable:
https://www.st.com/resource/en/user_manual/dm00384318-getting-started-with-the-fpaudbvlink1-stm32-ode-function-pack-based-on-halfduplex-voice-streaming-over-ble-stmicroelectronics.pdf
It describes also the ASR (automatic speech recognition) demo with
Google Speech API (English) and iFlyTek MSC service (simplified Chinese)
Tinkerpop 2 used to support user-defined step through Gremlin.defineStep(..)
How can I achieve the same using Tinkerpop 3 ?
Is there any Gremlin API to create a custom step and combine a set of traversal steps ?
Any suggestion will be highly appreciated.
Thanks
Kaniska
Patterns for DSL development are not completely established for TinkerPop 3.x, so expect some changes in advice as time progresses. There is surrounding information on this on the gremlin-users mailing list.
If you are using Gremlin Server (or can incorporate Groovy into your project) I don't see a reason to not just do some groovy metaprogramming to get this to work. Using the standard Gremlin Server zip distribution edit the generate-modern.groovy file to include this line at the start:
GraphTraversal.metaClass.knows = { delegate.out('knows') }
then start the server with:
bin/gremlin-server.sh conf/gremlin-server-rest-modern.yaml
Then a simple curl:
$ curl "http://localhost:8182?gremlin=g.V(1).knows().values('name')"
{"requestId":"66c2c929-9cc2-491d-acb0-ae4d7eef6b00","status":{"message":"","code":200,"attributes":{}},"result":{"data":["vadas","josh"],"meta":{}}}
If you have a complex DSL you might not want all that logic trapped in a groovy script. Easy enough - just build a standard groovy project, construct a jar, include some form of static initializer to call your metaprogramming code and place it on Gremlin Server's path. then your init script just needs to call that static initializer and your DSL is loaded.
I am looking to connect my TI MSP430+CC3000 eval kit to Xively for evaluation. There is a Xively C library that I would like to use. However, i wondering if anyone else has already done it who could share with me? As I saw there is already Xively feed with MSP430+CC3000 on-line.
Thanks!
The TI wiki has had a "CosmCloudApp" page for some time, but recently it's been deleted. The link here is to a previous revison of that page. Since there are quite a few public feeds when you search for "CC3000" it may be the case that TI have shipped this example at one point, but I was unable to find the source code or binary on TI website and according to the TI E2E forum it's nowhere to be found for quite a while.
After having a quick look at the SimpleLink API Reference Manual (download zip), I can see that it provides BSD-style socket API. Therefore it should be relatively easy to port Xively C library to CC3000 API using provided POSIX communiction layer.
Was just wondering if any of you already coded a http get request using glib?
Is it possible and how ?
I just want to call an simple urls with parameters, and the code must be working on gnu/linux, windows and mac.
If it is not possible with glib, have you any suggestion about what to use for that purpose (in a portable perspective).
I want to avoid if possible 3rd party libs to minimize my project dependencies. So in that case of glib is not the right way, any code fragment will be welcome !
Thanks
Sinn'
Yes, you can use libsoup. It's part of GNOME, and designed for use with GLib. You can start with the howto. E.g. it shows how to create a basic GET request:
SoupMessage *msg;
msg = soup_message_new ("GET", "http://example.com/");
SoupSession *session = soup_session_sync_new();
guint status = soup_session_send_message (session, msg);