Accessing Couchbase by terminal - database

Is it possible to create couchbase cluster by terminal. Basically, I want to perform all the operations on the DB by terminal.
Please refer me links, I have tried searching but could not find any terminal specific tutorial.
Suggest me if there is something I need to know before using Couchbase.

There isn't a single tool for this, but the most comprehensive in terms of feature sets is the cbc command line. There is an older blog on the cbc tools, but the basic idea is you install the C SDK (a.k.a. libcouchbase) and you'll have man pages for cbc and cbc subcommands.
Another approach that is common is to use a Python shell with the Couchbase Python Client. Or, use node.js with the Couchbase Node.js SDK.

Related

If you want to develop a voice assistant, which language would you use?

I am trying to develop a voice assistant, but I am confused on which language to use.
I want the app to work properly on both windows and android.
If you have any suggestions please post them.
Python would be the best answer. Python has a lot of tools that you can use for this purpose.
Definitly python. it has readily available lots of tools and libraries for us. For these type of projects i highly recommend python. Here are some tools and libraries might help you.
wikipedia - Get information from wikipedia or to perform wikipedia search
pip install wikipedia
Request - Making GET and POST requests.
pip install requests
Beautifulsoup4 - A library that makes it easy to scrape information from web pages.
pip install beautifulsoup4
Pyttsx3 - Used for conversion of text to speech in a program it woks offline.
pip install pyttsx3
Wolframalpha - Compute expert-level answers using Wolfram's algorithms, knowledgebase and AI technology.
pip install wolframaplha
Subprocess - Getting system subprocess details which are used in various commands. for example, Sleep, Shutdown etc. This module comes built-in with python.
Web browser - To perform web search. built-in with python
Twilio - For making call and messages.
pip install twilio
Tkinter - For building GUI. Comes built-in with python.
Hope you will find this information helpful.

Running Node.js on STM32

Iam working yet with C program on STM32 microproc, what contains a web server, accesible by the user via web gui(HTML and javascript files). The web gui part became more complex, and it needs higher level operations.
The questions: is it possible to embed a node.js program with some node modules? Does it work with the C webserver, or the node program have to make the webserver, and communicate with the C program?
Or there is an other solution what is better in this case?
This question maybe seems dumb, but i didnt find documentation about it.
After a research I found some solutions:
Node.js for Embedded Systems
The book can then guide you to jerryscript which:
is a lightweight JavaScript engine for resource-constrained devices
such as microcontrollers
You can find there that it's also used with the STM32-Discovery board.
Node.js on clientside
This article guides to Browserify which allows to run node on clientside.
Just make it simpler
You could use HTTPD implementation shipped with LwIP. There is a script called makefsdata which allows to convert html, js, css ... files into c-arrays. This implementation also supports POST method.

Custom protocol support

I am not finding documentation for custom protocol support.
From what I understand, Gatling has core engine that does scheduling, thread management etc, and protocol support is designed as an Actor ?
I am trying to develop a custom protocol (thats basically a shell script that will talk to an external service). The latest reference documentation does not seem to have any reference to how to do this ? Any pointers will be greatly appreciated.
If you need to stress test something that is implemented in a shell script, then Gatling probably isn't the best fit. Gatling is designed for stress testing networking protocols. So unless you can duplicate what your shell script is doing in Gatling expressed in networking protocols, you then might want to use something else.
Secondly, if you did implement it, I would check with the core developers of Gatling if it's something that they would consider including (use a github issue to ask). Since the applications of this might not be widespread, they may choose to not include it in their project. If that's the case you would have to either run your own fork with the implementation or add some sort of plugin architecture to Gatling for 3rd part extensibility.
So my suggestions are:
Decompose your shell script into the specific network protocol parts you're interested in stress testing implementing in Gatling.
Use a different tool that's designed to running multiple shell scripts at once for stress testings. Something like GNU Parallel if you're on a Linux box.
Implement it yourself. There's no documentation on how to do this. However a good starting example would be the JMS Protocol Implementation to give you an idea of all that's involved.

is dronekit-python api only for Mavproxy?

This is the website of dronekit-python api.
http://python.dronekit.io/
I checked the examples and also online git repo, it seems all examples are built on top of mavproxy. and API itself doesn't have mavlink communication capability.
I wonder if there are any other use cases for droneapi.
and if I don't want to use mavproxy, does it mean I have to write my own mavlink layer?
Yes, using the current release implementation (1.x) everything is built on MAVProxy.
I understand that the intention is that in future you will not necessarily have to run your apps from within a MAVProxy console (I don't know if the actual dependency on MAVProxy is being removed - I supsect not!)
starting with v2 of dronekit-python we are MAVProxy free, please follow the migration guides http://python.dronekit.io/guide/migrating.html
dronekit-python doesn't need to run in mavproxy. You could use a custom mavlink communication layer to implement the API if you wanted.
(I find the implementation as a mavproxy module a little suboptimal for users in that it can be a bit confusing and a little bit weirder to write code that uses the API, but it does have the advantages of allowing the use of other mavproxy modules (maps, joystick control, whatever) along with basic mavproxy functionality like forwarding, and it can also be a faster path for development: It's probably easier to connect dronekit-python to mavproxy than to write a brand new, untested communication layer that does 50% of what mavproxy does. I'm guilty of doing the same thing to get something working fast.)

LDAP C SDK

I need to write a simple LDAP client in C. The only binary distributions I found are old and also lack SSL tools needed to implement an SLDAP connection. A complete and up to date distribution that I found is that of Mozilla however it is in source code format and I have not been able to compile it into binary form for windows.
I used the instructions described here: https://wiki.mozilla.org/LDAP_C_SDK. I got up to the step where apparently I now need to use nsinstall but I don't know how this is done. Does anyone know how nsinstall is to be used.? Alternatively, does anyone know of an existing binary distribution of the LDAP C sdk for windows? I also need the ssl libraries and associated tool for configuring the keystore.
thanks,
Mike
I used The Google a bit and ended up with this site that has Windows distributions of OpenLDAP: http://www.symas.net/portal/
OpenLDAP is heavily used on *NIX platforms, less commonly on Win32, but these folks seem to have done the heavy lifting for you. Good luck!
Oh, and for docs and API reference, hit http://www.openldap.org

Resources