question stringlengths 11 28.2k | answer stringlengths 26 27.7k | tag stringclasses 130
values | question_id int64 935 78.4M | score int64 10 5.49k |
|---|---|---|---|---|
I am looking to use Flower (https://github.com/mher/flower) to monitor my Celery tasks in place of the django-admin as reccomended in their docs (http://docs.celeryproject.org/en/latest/userguide/monitoring.html#flower-real-time-celery-web-monitor). However, because I am new to this I am a little confused about the way... | You can run flower with --auth flag, which will authenticate using a particular google email:
celery flower --auth=your.email@gmail.com
Edit 1:
New version of Flower requires couple more flags and a registered OAuth2 Client with Google Developer Console:
celery flower \
--auth=your.email@gmail.com \
--oauth2_k... | NGINX | 19,689,510 | 58 |
I'm trying to have a docker container with nginx work as reverse proxy to other docker containers and I keep getting "Bad Gateway" on locations other other than the base location '/'.
I have the following server block:
server {
listen 80;
location / {
proxy_pass "http://game2048:8080";
}
location /game {... | I fixed it! I set the server name in different server blocks in nginx config. Remember to use docker port, not host port.
server {
listen 80;
server_name game2048;
location / {
proxy_pass "http://game2048:8080";
}
}
server {
listen 80;
server_name game;
location / {
# Remember to refer to do... | NGINX | 47,091,356 | 57 |
I have a Sinatra application hosted with Unicorn, and nginx in front of it. When the Sinatra application errors out (returns 500), I'd like to serve a static page, rather than the default "Internal Server Error". I have the following nginx configuration:
server {
listen 80 default;
server_name *.example.com;
root... | error_page handles errors that are generated by nginx. By default, nginx will return whatever the proxy server returns regardless of http status code.
What you're looking for is proxy_intercept_errors
This directive decides if nginx will intercept responses with HTTP
status codes of 400 and higher.
By default all re... | NGINX | 8,715,064 | 57 |
I am new to Nginx and hope to get some help.
I want to extract certain data (certain fields set by my PHP scripts) from browser cookie in nginx so that I can log it. If possible, I want to do this just by modifying nginx configuration.
Any pointer/help would be greatly appreciated.
| You can access cookie values by using the $cookie_COOKIE_NAME_GOES_HERE variable.
See Nginx Documentation
| NGINX | 26,128,412 | 56 |
I want to parse NGINX error logs. However, there seems to be no documentation at all, concerning the used log format. While the meaning of some fields like the data is pretty obvious, some are not at all. In addition, I cannot be sure that my parser is complete if I do not have a documentation of all the possible field... | From reading src/core/ngx_log.c I guess the general error log format seems to be
YYYY/MM/DD HH:MM:SS [LEVEL] PID#TID: *CID MESSAGE
With PID and TID being the logging process and thread id and CID a number identifying a (probably proxied) connection, probably a counter. The *CID part is optional.
| NGINX | 16,711,573 | 56 |
I use reverse proxy with Nginx and I want to force the request into HTTPS, so if a user wants to access the url with http, he will be automatically redirected to HTTPS.
I'm also using a non-standard port.
Here is my nginx reverse proxy config:
server {
listen 8001 ssl;
ssl_certificate /home/xxx/server.crt;
... | Found something that is working well :
server {
listen 8001 ssl;
ssl_certificate /home/xxx/server.crt;
ssl_certificate_key /home/xxx/server.key;
error_page 497 301 =307 https://$host:$server_port$request_uri;
location /{
proxy_pass http://localhost:8000;
... | NGINX | 15,429,043 | 56 |
I'm using Nginx as a reverse proxy.
What is the difference between these headers:
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
In some documents/tutorials I see both are used, in others only the first.
They seem similar, so I'd like to understand how they ... |
What is the difference between these headers?
Did you check the $proxy_add_x_forwarded_for variable documentation?
the X-Forwarded-For client request header field with the $remote_addr variable appended to it, separated by a comma. If the X-Forwarded-For field is not present in the client request header, the $proxy_... | NGINX | 72,557,636 | 55 |
I used this sh file to install Nginx. When I modify the nginx.conf and try to reload or restart Nginx it didn't restart. I used below command.
sudo systemctl restart nginx
gave me
sudo: unable to resolve host localhost.localdomain sudo: systemctl: command not found
and this one
sudo service nginx restart
sudo: unabl... | The nginx web server can be restarted using any one of the following command line syntax. Use systemctl on systemd based version such as Ubuntu Linux 16.04LTS and above:
sudo systemctl restart nginx
OR
sudo service nginx restart
OR (older Ubuntu Linux version):
sudo /etc/init.d/nginx restart
The same commands can be... | NGINX | 42,451,592 | 55 |
A lot of Django app deployments over Amazon's EC2 use HTTP servers NGINX and Gunicorn.
I was wondering what they actually do and why both are used in parallel. What is the purpose of running them both in parallel?
| They aren't used in parallel. NGINX is a reverse proxy. It's first in line. It accepts incoming connections and decides where they should go next. It also (usually) serves static media such as CSS, JS and images. It can also do other things such as encryption via SSL, caching etc.
Gunicorn is the next layer and is an a... | NGINX | 13,182,892 | 55 |
I have my site which is using nginx, and testing site with header testing tools e.g. http://www.webconfs.com/http-header-check.php but every time it says 400 bad request below is the out put from the tool. Though all my pages load perfectly fine in browser and when I see in chrome console it says status code 200OK.
HT... | As stated by Maxim Dounin in the comments above:
When nginx returns 400 (Bad Request) it will log the reason into error
log, at "info" level. Hence an obvious way to find out what's going on
is to configure
error_log
to log messages at "info" level and take a look into error log when
testing.
| NGINX | 12,315,832 | 55 |
I know that this is a common question, and there are answers for the same, but the reason I ask this question is because I do not know how to approach the solution. Depending on the way I decide to do it, the solution I can pick changes. Anyways,
I have an AWS EC2 instance. My DNS is handled by Route53 and I own exampl... | You could add a virtual host for app.example.com that listens on port 80 then proxy pass all requests to flask:
server {
listen 80;
server_name app.example.com;
location / {
proxy_pass http://localhost:8142;
}
}
| NGINX | 23,649,444 | 54 |
How can I check that nginx is serving the .gz version of static files, if they exist?
I compiled nginx with the gzip static module, but I don't see any mention of the .gz version being served in my logs. (I have minified global.js and global.css files with .gz versions of them in the same directory).
The relevant part ... | Use strace. First, you need to detect PID of nginx process:
# ps ax | grep nginx
25043 ? Ss 0:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
25044 ? S 0:02 nginx: worker process
Ok, so 25044 is the worker process. Now, we trace it:
# strace -p 25044 2>&1 | grep gz
open("/var/w... | NGINX | 2,460,821 | 54 |
I have been working with spring and now would like to learn spring boot and microservices. I understand what microservice is all about and how it works. While going through docs i came across many things used to develop microservices along with spring boot which i am very much confused.
I have listed the systems below... |
without having an API gateway is there any use with this service registry ?
Yes. For example you can use it to locate (IP and port) of all your microservices. This comes in handy for devops type work. For example, at one project I worked on, we used Eureka to find all instances of our microservices and ping them f... | NGINX | 52,834,628 | 53 |
I am currently on design phase of a MMO browser game, game will include tilemaps for some real time locations (so tile data for each cell) and a general world map. Game engine I prefer uses MongoDB for persistent data world.
I will also implement a shipping simulation (which I will explain more below) which is basicall... | Disclaimer: I am the author and owner of OrientDB.
As developer, in general, I don't like companies that hide costs and let you play with their technology for a while and as soon as you're tight with it, start asking for money. Actually once you invested months to develop your application that use a non standard langua... | ArangoDB | 26,704,134 | 49 |
I am looking to dip my hands into the world of Multi-Model DBMS, I have no particular use cases, just want to start learning.
I find that there are two prominent ones - OrientDB vs ArangoDB, but was unable to find any meaningful comparison, unopinionated between them. Can someone shed some light on the difference in fe... |
Disclaimer: I would no longer recommend OrientDB, see my comments below.
I can provide a slightly less biased opinion, having used both ArangoDB and OrientDB. It's still biased as I'm the author of OrientDB's node.js driver - oriento but I don't have a vested interest in either company or product, I've just necessar... | ArangoDB | 28,553,942 | 36 |
I am trying to understand what the limits of Arangodb are and what the ideal setup is. From what I have understood arango stores all the collection data in the virtual memory and ideally you want this to fit in the RAM. If the collection grows and cannot fit in the RAM it will be swapped to disk.
So my first question. ... | ArangoDB stores all data in memory-mapped files.
Each collection can have 0 to n datafiles, with a default filesize of 32 MB each (note that this filesize can be adjusted globally or on a per-collection level). An empty collection (that never had any data) will not have a datafile. The first write to a collection will ... | ArangoDB | 24,380,071 | 19 |
I'm trying to use ArangoDB to get a list of friends-of-friends. Not just a basic friends-of-friends list, I also want to know how many friends the user and the friend-of-a-friend have in common and sort the result.
After several attempts at (re)writing the best performing AQL query, this is what I ended up with:
LET f... | I am one of the core developers of ArangoDB and tried to optimize your query. As I do not have your dataset I can only talk about my test dataset and would be happy to hear if you can validate my results.
First if all I am running on ArangoDB 2.7 but in this particular case I do not expect a major performance differenc... | ArangoDB | 33,279,811 | 19 |
I want to build a social network. (E.g. Persons have other persons as friends) and I guess a graph database would do the trick better than a classic database. I would like to store attributes on the edges and on the nodes. They can be json, but I do not care if the DB understands JSON.
ArangoDB can also store documents... | Both ArangoDB and Neo4j are capable of doing the job you have in mind.
Both projects have amazing documentation and getting answers for either of them is easy. Both can be used from Java (though Neo4j can be embedded).
One thing that might help your decision making process is recognizing that many NoSQL databases solve... | ArangoDB | 35,118,458 | 14 |
Is it possible to link documents from different collections in ArangoDB as it is in OrientDB?
In OrientDB you can create a field of type LINK and specify the type linked. That creates a relation between both documents.
Do I have to use edge collections to do this in ArangoDB?
I'm trying to define a main collection and... | There are actually two options:
Using Joins
You can define an attribute on the main document containing information that identifies the sub-document (e.g. by its _key) and then use AQL to join the two documents in your query:
FOR x IN maindocuments
FILTER x.whatever < 42
FOR y in secondarydocuments
FILTER x.su... | ArangoDB | 26,589,705 | 13 |
I try to connect to ArangoDB which located in another server from my PC but seems unsuccessful. I then tried to access it by using the Web UI provided by typing the server ip http://x.x.x.x:8529 but failed too. I tried my luck on the localhost ArangoDB and replace it with my own PC ip address and it doesn't work too. I... | The server by default only opens its ports on 127.0.0.1 and without any authentication.
You can edit the config file "arangod.conf" to change this. Change the line
endpoint = tcp://127.0.0.1:8529
to
endpoint = tcp://0.0.0.0:8529
In order to enable authentication you can change
disable-authentication = yes
to
disable... | ArangoDB | 28,081,017 | 13 |
I'm building an app based around a d3 force-directed graph with ArangoDB on the backend, and I want to be able to load node and link data dynamically from Arango as efficiently as possible.
I'm not an expert in d3, but in general the force layout seems to want the its data as an array of nodes and an array of links tha... | sorry for the late reply, we were busy building v2.8 ;)
I would suggest to do as many things as possible on the database side, as copying and serializing/deserializing JSON over the network is typically expensive, so transferring as little data as possible should be a good aim.
First of all i have used your query and e... | ArangoDB | 33,855,799 | 12 |
I am trying to put together a unit test setup with Arango. For that I need to be able to reset the test database around every test.
I know we can directly delete a database from the REST API but it is mentioned in the documentation that creation and deletion can "take a while".
Would that be the recommended way to do ... | After some struggling with similar need I have found this solution:
for (let col of db._collections()) {
if (!col.properties().isSystem) {
db._drop(col._name);
}
}
| ArangoDB | 34,841,879 | 12 |
I'm root and
I forgot it
What can I do now?
I tried to reinstall arangodb, remove all databases but after new installation old password still exist
| service arangodb3 stop
/usr/sbin/arangod --server.authentication false
and then
require("@arangodb/users").replace("root", "my-changed-password");
exit
service arangodb3 restart // **VERY IMPORTANT STEP!!!**
//if you don't restart the server everyone can have access to your database
| ArangoDB | 38,555,962 | 12 |
In the context of ArangoDB, there are different database shells to query data:
arangosh: The JavaScript based console
AQL: Arangodb Query Language, see http://www.arangodb.org/2012/06/20/querying-a-nosql-database-the-elegant-way
MRuby: Embedded Ruby
Although I understand the use of JavaScript and MRuby, I am not sure... | AQL is ArangoDB's query language. It has a lot of ways to query, filter, sort, limit and modify the result that will be returned. It should be noted that AQL only reads data.
(Update: This answer was targeting an older version of ArangoDB. Since version 2.2, the features have been expanded and data modification on the ... | ArangoDB | 14,933,258 | 11 |
I am trying to update the attribute on a json document in an embedded array using AQL. How do i update the "addressline" for "home" type address using AQL below?
User:
{
name: "test",
address: [
{"addressline": "1234 superway", type:"home"},
{"addressline": "5678 superway", type:"work"}
]
}
AQL Atte... | To do this we have to work with temporary variables. We will collect the sublist in there and alter it. We choose a simple boolean filter condition to make the query better comprehensible.
First lets create a collection with a sample:
database = db._create('complexCollection')
database.save({
"topLevelAttribute" : "... | ArangoDB | 29,105,660 | 11 |
I'm learning more about ArangoDB and it's Foxx framework. But it's not clear to me what I gain by using that framework over building my own stand alone nodejs app for API/access control, logic, etc.
What does Foxx offer that a regular nodejs app wouldn't?
| Full disclosure: I'm an ArangoDB core maintainer and part of the Foxx team.
I would recommend taking a look at the webinar I gave last year for a detailed overview of the differences between Foxx and Node and the advantages of using Foxx when you are using ArangoDB. I'll try to give a quick summary here.
If you apply i... | ArangoDB | 35,313,141 | 11 |
Currently my workflow with Emacs when I am coding in C or C++ involves three windows. The largest on the right contains the file I am working with. The left is split into two, the bottom being a shell which I use to type in compile or make commands, and the top is often some sort of documentation or README file that ... | You'll have to be specific as to what you mean by "the rest". Except for the object inspector (that I"m aware of), emacs does all the above quite easily:
editor (obvious)
compiler - just run M-x compile and enter your compile command. From there on, you can just M-x compile and use the default. Emacs will capture C... | Slime | 63,421 | 178 |
I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situations, my main source of discomfort is that I don't have Slime (ye... | SLIME's contrib directory seems to have SWANK implementations for MIT Scheme and Kawa.
| Slime | 110,911 | 45 |
In clojure I have lines like this that define default values:
(def *http-port* 8080)
I've now decided to formalize these kinds of values into a configuration unit and I would like to undefine the value *http-port* so that I can find the locations that still refer to this value and change them to use the new value. I'm... | If I understand you correctly, ns-unmap should do what you want:
user=> foo
java.lang.Exception: Unable to resolve symbol: foo in this context (NO_SOURCE_FILE:1)
user=> (def foo 1)
#'user/foo
user=> foo
1
user=> (ns-unmap (find-ns 'user) 'foo)
nil
user=> foo
java.lang.Exception: Unable to resolve symbol: foo in this co... | Slime | 4,208,680 | 32 |
I've tried to migrate to Emacs several times for Clojure development, following a variety of blogposts, screencast and tutorials, but somewhere along the way something always went wrong - keybindings that didn't work, incompatible versions, etc, and I found myself scrambling back to Vim. But I know I want Paredit and S... | These are the steps I took to set them up without using ELPA. Hope this helps.
Get SLIME using MacPorts
sudo port -v install slime
Get paredit
curl -O http://mumble.net/~campbell/emacs/paredit.el
Get clojure & clojure-contrib
Either using MacPorts
sudo port -v install clojure clojure-contrib
Or downloading directl... | Slime | 2,120,533 | 31 |
I have centered-cursor-mode activated globaly, like this:
(require 'centered-cursor-mode)
(global-centered-cursor-mode 1)
It works fine, but there are some major modes where I would like to disable it automatically. For example slime-repl and shell.
There is another question dealing with the same problem, but another ... | Global minor modes created with the define-globalized-minor-mode1 macro are a bit tricky. The reason your code doesn't appear to do anything is that globalized modes utilise after-change-major-mode-hook to activate the buffer-local minor mode that they control; and that hook runs immediately after the major mode's own ... | Slime | 6,837,511 | 31 |
Is there a way to stop a running operation in the SLIME REPL?
The Clojure SLIME folks apparently have some way to do this, so how about in ordinary Common Lisp?
Thanks /Erik
| As expected, it turns out it was quite simple. To stop a running operation use the command slime-interrupt (C-c C-b).
| Slime | 2,899,320 | 21 |
I'm wondering what are some efficient ways to debug Common Lisp interactively using Emacs and SLIME.
What I did before: As someone who learned C and Python using IDEs (VS and PyCharm), I am used to setting break points, adding watches, and do stepping. But when I started to use CL I found the debugging workflow fundam... | There is a number of things you can do:
You can trace a function call (see TRACE and UNTRACE in Common Lisp or slime-toggle-trace-fdefinition*). This helps with recursive calls: you can see what you pass and what they return at each level.
Standard thing: add (format t ...) in places. I guess, no need to comment.
If t... | Slime | 37,754,935 | 20 |
I'm using Emacs, with CLISP and Slime, and want to be able to draw pictures on the screen. I'm specifically thinking about drawing graphs, but anything that would let me draw basic shapes and manipulate them would be able to get me started.
| Doug is right; CAPI will work fine. Other things you can try:
cltk: http://www.cliki.net/Lisp-Tk
I know that Allegro has something for Windows programming also, but I've never tried it.
What may also work is cells-gtk: http://common-lisp.net/project/cells-gtk/
Again, I can only tell you that it exists but not how bad i... | Slime | 450,538 | 17 |
can I use common lisp and Clojure from within emacs at the same time?
I would like to have each lisp-REPL in its own buffer, and If i did this how could I controll which buffer sent its data to which lisp?
| Yes. In the documentation to Slime you will find slime-lisp-implementations. Here is how I have it defined in my .emacs:
(setq slime-lisp-implementations
'((cmucl ("/usr/local/bin/lisp") :coding-system iso-8859-1-unix)
(sbcl ("/usr/local/bin/sbcl" "--core" "/Users/pinochle/bin/sbcl.core-with-swank") :init (lamb... | Slime | 1,223,394 | 14 |
I want to use the functions in the clojure.contrib.trace namespace in slime at the REPL. How can I get slime to load them automatically? A related question, how can I add a specific namespace into a running repl?
On the clojure.contrib API it describes usage like this:
(ns my-namespace
(:require clojure.contrib.trace... |
You're getting "Unable to resolve symbol" exceptions because :require doesn't pull in any Vars from the given namespace, it only makes the namespace itself available.
Thus if you (:require foo.bar) in your ns form, you have to write foo.bar/quux to access the Var quux from the namespace foo.bar. You can also use (:req... | Slime | 2,854,618 | 14 |
My superficial understanding is that 'swank-clojure' makes 'M-x slime-connect' possible. I mean, it gives a connection to a clojure server something like 'lein swank'. Is my understanding correct? If not, what's the purpose of swank?
Then, is there any 'swank-SOMETHING_ELSE' for other lisp like implementations? For exa... | SLIME and swank form a client server architecture to run and debug lisp programs. SLIME is the emacs frontend and swank is the backend. In between they create a network socket and communicate by sending across messages (S-expressions). In short it is just an RPC mechanism between emacs and the actual lisp backend.
The... | Slime | 3,550,971 | 14 |
This is a double question for you amazingly kind Stacked Overflow Wizards out there.
How do I set emacs/slime/swank to use UTF-8 when talking with Clojure, or use UTF-8 at the command-line REPL? At the moment I cannot send any non-roman characters to swank-clojure, and using the command-line REPL garbles things.
It's ... | Can't help with swank or Emacs, I'm afraid. I'm using Enclojure on NetBeans and it works well there.
On matching: As Alex said, \w doesn't work for non-English characters, not even the extended Latin charsets for Western Europe:
(re-seq #"\w+" "prøve") =>("pr" "ve") ; Norwegian
(re-seq #"\w+" "mañana") => ("ma" "ana... | Slime | 3,101,279 | 12 |
I used Aquamacs so far, and I need to install and run Clojure using SLIME. I googled to get some way to use Clojure on SLIME of Aquamacs, but without success.
Questions
Is it possible to install Clojure on Aquamacs? Or, can you guess why Clojure on Aquamacs doesn't work?
Is it normal that Emacs and Aquamacs can't sha... | Aquamacs most definitely works with Clojure, since the author of Clojure uses it. However, I use Emacs, and after you perform the steps above in the Emacs section, I recommend checking out labrepl,
http://github.com/relevance/labrepl
If you don't have leiningen, the link to get and install it is in the instructions of ... | Slime | 3,261,714 | 12 |
In certain kinds of code it's relatively easy to cause an infinite loop without blowing the stack. When testing code of this nature using clojure-test, is there a way to abort the current running tests without restarting the swank server?
Currently my workflow has involved
$ lein swank
Connect to swank with emacs us... | Yes, it is a common problem for programmers to write infinite loops in development :). And the answer is very simple. It's called "Interrupt Command" and it is C-c C-b
Leiningen has nothing to do with this. This is SLIME/Swank/Clojure. When you evaluate code in Emacs you are spawning a new thread within Clojure. SLIME ... | Slime | 5,113,403 | 12 |
I'm trying to write some python, and I'm used to the lispy way of doing things, a REPL in EMACS and the ability to send arbitrary code snippets to the REPL. I like this way of developing code, and python's built-in IDLE seems to do it pretty well. However I do like EMACS as an editor.
What's the best thing analogous to... | There is ipython.el which you can use for some extended functionality over the vanilla python-mode. Ropemacs provides a few extra completion and refactoring related options that might help you. This is discussed here. However, I don't expect you're going to get anything close to SLIME.
| Slime | 5,316,175 | 12 |
When I type something wrong in dos/linux and it yells at me I can push the up arrow and then modify my line - maybe it was missing a '-' or something. I just installed lispbox and up arrow moves the cursor up the REPL history. How do i put on the current line the last line I entered.
So like I type
+ 3 2
But obvious... | Try
(slime-repl-previous-input)
which is bound to
M-p
by default. (Meta is normally the Alt key)
M-p / M-n is standard for going backwards / forwards through history in emacs - it also works in the minibuffer too
| Slime | 7,870,770 | 12 |
I was trying to install SLIME. I downloaded the zipped package and according to the README file, I have to put this piece of code in my Emacs configuration file:
(add-to-list 'load-path "~/hacking/lisp/slime/") ; your SLIME directory
(setq inferior-lisp-program "/opt/sbcl/bin/sbcl") ; your Lisp system
(require 'slime)... | Some Linuxes come with CMUCL preinstalled, but since you seem to want to use SBCL, you would need to install it.
In terminal, or in Emacs M-xshell. If you are using Debian-like distro, you can use apt-get or aptitude with the following:
$ sudo apt-get install sbcl
or
$ sudo aptitude install sbcl
on RHEL-like distro:
... | Slime | 12,607,716 | 12 |
I'm using Emacs with clojure mode and slime connected to a swank server produced by running lein swank and would really love to be able to easily jump to function definitions within my project. Can I do this with out having to manually rebuild tags every time I change branches?
| If you're using SLIME this can be done easily with M-.
EDIT: When Clojure code is compiled the location of definitions is stored. Note that this works best when you compile entire files. Jumping to an definition that you evaluated with C-x C-e doesn't work so well (tho it does works for Common Lisp and SLIME).
| Slime | 2,374,246 | 11 |
when I start swank through leiningen it accepts the next slime connection and off I go. I would really like to have several emacs instances connect to the same swank instance. Can I do this? can I do this through leiningen?
| Well, you can start your first SLIME normally, then (require 'swank.swank) (or maybe it's required by default... not sure), do (swank.swank/start-repl port) with port replaced by some port number and you can connect a second instance of SLIME to that newly created REPL.
I've done it just now, with one Emacs connecting ... | Slime | 2,374,776 | 11 |
I can't use auto indentation function on emacs + slime + sbcl when I define my function and so on.
My .emacs file configuration is this:
(setq inferior-lisp-program
"D:/emacs/sbcl_1.0.37/sbcl.exe"
lisp-indent-function 'common-lisp-indent-function
slime-complete-symbol-function 'slime-fuzzy-complete-symbol
... | The slime section in my .emacs:
;;; SLIME
(setq inferior-lisp-program "/usr/bin/sbcl")
(add-to-list 'load-path "/usr/share/emacs/site-lisp/slime/")
(require 'slime)
(require 'slime-autoloads)
(slime-setup '(slime-fancy))
(global-set-key "\C-cs" 'slime-selector)
| Slime | 3,132,000 | 11 |
Is there a way to expand the current command at the Clojure repl like I'd be able to do in Common Lisp?
For example say I have typed:
Math/
I would like the tab key to expand to all the available variables and functions in that namespace.
I'm using Clojure as inferior-lisp would like to know how to do this from the p... | Another vote in favour of clojure-mode and slime under Emacs. In particular, if you set up auto-complete, then you can use my ac-slime package to get context-aware tab completion in a dropdown list. Here's a screencast showing it in action.
And, further to technomancy's comment about hippie-expand, here's how to tie sl... | Slime | 4,289,480 | 11 |
During development I defined an 'initialize-instance :after' method which after a while was not needed anymore and actually gets in my way because inside it calls code that is not valid anymore. Since the unintern function does not have an argument for the qualifier, is there any way I can "unintern" the symbol-qualif... | You can use the standard functions find-method and remove-method to do it:
(remove-method (find-method #'frob '(:before) '(vehicle t)))
I find it's much easier to use the slime inspector. If your function is named frob, you can use M-x slime-inspect #'frob RET to see a list of all methods on frob and select individual... | Slime | 5,976,470 | 11 |
I've been dancing around LISP for decades, but now have decided to get serious. I'm going through the online version of Practical Common LISP.
This is my setup:
MacOSX 10.7.8
Xcode 4.5.2
SBCL 1.0.55.0-abb03f9
Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)
SLIME 1.6
I tried to follow the instructions liste... |
Copy the entire directory of slime to emacs/site-lisp
Ensure your lisp is accesible from the terminal. Just type sbcl in Terminal. Lisp interpreter should start.
put into your .emacs file something like (setq inferior-lisp-program "sbcl")
It should work then.
| Slime | 13,822,504 | 11 |
I noticed how SLIME (lisp development package for Emacs) does not come with a frame-source-location function for CLISP, so you can't automagically jump to a source location when inside the debugger. Given that, I figured CLISP users must be using some other IDE (though I guess IDE is a little bit misleading here, maybe... | I think Emacs and SLIME is still what those people use.
| Slime | 339,662 | 10 |
I set up emacs for both clojure and common lisp, but I want also (slime-setup '(slime-fancy)) for common lisp. If I add that line to init.el, clojure won't work: it gives me repl, but it hangs after I run any code.
My configuration
For clojure:
I set up clojure-mode, slime, slime-repl via ELPA
I run $ lein swank in pr... | Here is a solution. (using hooks)
That is ugly but quite convenient.
(add-hook 'slime-connected-hook
(lambda ()
(if (string= (slime-lisp-implementation-type) "Clojure")
(setq slime-use-autodoc-mode nil)
(setq slime-use-autodoc-mode t))
))
(add-hook 'slime... | Slime | 4,419,544 | 10 |
I just started with common-lisp, having come from C++ and Python. I'm trying to run a simple SDL program that does nothing other than show an image on-screen. I can get it working from within SLIME. The problem is, it won't work when run from the shell as a script.
My program looks like this:
#!/usr/bin/sbcl --script
... | As the man page for sbcl says, --script implies --no-sysinit --no-userinit --disable-debugger --end-toplevel-options, which means that initialization files are not read, and so if you set up ASDF registry there it is not set up, and so it cannot find the lispbuilder-sdl system. You need to either set up the registry in... | Slime | 4,914,636 | 10 |
When writing Common Lisp code, I use SLIME. In particular, I compile the buffer containing definitions of functions by using C-C C-k, and then switch to the REPL to run those functions. Putting executable code to run those functions in the buffer does not appear to work so well. If the code has bugs it can make a mess.... | You can use the following trick:
Define a dispatch function for shebang:
(set-dispatch-macro-character #\# #\!
(lambda (stream c n)
(declare (ignore c n))
(read-line stream)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(pushnew :noscript *features*))))
In your script file use... | Slime | 9,796,353 | 10 |
When calling the saveAll method of my JpaRepository with a long List<Entity> from the service layer, trace logging of Hibernate shows single SQL statements being issued per entity.
Can I force it to do a bulk insert (i.e. multi-row) without needing to manually fiddle with EntityManger, transactions etc. or even raw SQL... | To get a bulk insert with Spring Boot and Spring Data JPA you need only two things:
set the option spring.jpa.properties.hibernate.jdbc.batch_size to appropriate value you need (for example: 20).
use saveAll() method of your repo with the list of entities prepared for inserting.
Working example is here.
Regarding t... | CockroachDB | 50,772,230 | 114 |
Is there any way to do local development with cloud spanner? I've taken a look through the docs and the CLI tool and there doesn't seem to be anything there. Alternatively, can someone suggest a SQL database that behaves similarly for reads (not sure what to do about writes)?
EDIT: To clarify, I'm looking for a databas... | There is currently no local development option for Cloud Spanner. Your current option would be to start a single node instance on GCP.
There currently isn't another database that operates like Cloud Spanner, however CockroachDB operates on similar principles. Since they don't have access to atomic clocks and GPS units,... | CockroachDB | 42,289,920 | 21 |
In MySQL, I can use AUTO INCREMENT to generate unique IDs for my application’s customers. How do I get similar functionality when using CockroachDB?
| Applications cannot use constructs like SEQUENCE or AUTO_INCREMENT and also expect horizontal scalability -- this is a general limitation of any distributed database. Instead, CockroachDB provides its own SERIAL type which generates increasing but not necessarily contiguous values.
For example, you would use:
CREATE TA... | CockroachDB | 43,330,072 | 10 |
As far as I know, clickhouse allows only inserting new data. But is it possible to delete block older then some period to avoid overflow of HDD?
| Lightweight delete
Available since v22.8
Standard DELETE syntax for MergeTree tables has been introduced in #37893.
SET allow_experimental_lightweight_delete = 1;
DELETE FROM merge_table_standard_delete WHERE id = 10;
Altering data using Mutations
See the docs on Mutations feature https://clickhouse.yandex/docs/en/que... | ClickHouse | 52,355,143 | 21 |
I know there's a bunch of system tables. If one has access to those where do I find the currently installed version?
| SELECT version()
┌─version()───┐
│ 20.9.1.4571 │
└─────────────┘
SELECT *
FROM system.build_options
┌─name──────────────────────┬─value────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ VERSION_FULL │ ClickHouse 2... | ClickHouse | 63,847,537 | 19 |
I have an event table (MergeTree) in clickhouse and want to run a lot of small inserts at the same time. However the server becomes overloaded and unresponsive. Moreover, some of the inserts are lost. There are a lot of records in clickhouse error log:
01:43:01.668 [ 16 ] <Error> events (Merger): Part 201 61109_2016110... | Clickhouse has special type of tables for this - Buffer. It's stored in memory and allow many small inserts with out problem. We have near 200 different inserts per second - it works fine.
Buffer table:
CREATE TABLE logs.log_buffer (rid String, created DateTime, some String, d Date MATERIALIZED toDate(created))
ENGINE ... | ClickHouse | 40,592,010 | 15 |
I'm running Clickhouse in a docker container on a Windows host. I tried to create an account towards making it an admin account. It looks like the default user does not have permission to create other accounts. How can I get around this error and create an admin account?
docker-compose exec -T dash-clickhouse clickhous... | To fix it need to enable access_management-setting in the users.xml file:
# execute an interactive bash shell on the container
docker-compose exec {container_name} bash
# docker exec -it {container_name} bash
# install preferable text editor (i prefer using 'nano')
apt-get update
apt-get install nano
# open file use... | ClickHouse | 64,166,492 | 15 |
I have a clickhouse table that has one Array(UInt16) column. I want to be able to filter results from this table to only get rows where the values in the array column are above a threshold value. I've been trying to achieve this using some of the array functions (arrayFilter and arrayExists) but I'm not familiar enough... | You can use arrayExists in the WHERE clause.
SELECT *
FROM ArrayTest
WHERE arrayExists(x -> x > 7, distance) = 1;
Another way is to use ARRAY JOIN, if you need to know which values is greater than 7:
SELECT d, distance, sessionSecond
FROM ArrayTest
ARRAY JOIN distance as d
WHERE d > 7
| ClickHouse | 47,591,813 | 13 |
I'm designing a schema for a large Clickhouse table with string fields that can be pretty sparse.
I'm wondering if these fields should be nullable or if I should store an empty string "" as a default value. Which would be better in terms of storage?
| You should store an empty string ""
Nullable column takes more disk space and slowdown queries upto two times.
This is an expected behaviour by design.
Inserts slowed down as well, because Nullable columns are stored in 4 files but non-Nullable only in 2 files for each column.
https://gist.github.com/den-crane/e43f8d0a... | ClickHouse | 63,057,886 | 13 |
Suppose I have a given time range. For explanation, let's consider something simple, like whole year 2018. I want to query data from ClickHouse as a sum aggregation for each quarter so the result should be 4 rows.
The problem is that I have data for only two quarters so when using GROUP BY quarter, only two rows are r... | From ClickHouse 19.14 you can use the WITH FILL clause. It can fill quarters in this way:
WITH
(
SELECT toRelativeQuarterNum(toDate('1970-01-01'))
) AS init
SELECT
-- build the date from the relative quarter number
toDate('1970-01-01') + toIntervalQuarter(q - init) AS time,
metric
FROM
(
... | ClickHouse | 50,238,568 | 12 |
I am not clear about these two words.
Whether does one block have a fixed number of rows?
Whether is one block the minimum unit to read from disk?
Whether are different blocks stored in different files?
Whether is the range of one block bigger than granule? That means, one block can have several granules skip indices.... | https://clickhouse.tech/docs/en/operations/table_engines/mergetree/#primary-keys-and-indexes-in-queries
Primary key is sparsed. By default it contains 1 value of each 8192 rows (= 1 granule).
Let's disable adaptive granularity (for the test) -- index_granularity_bytes=0
create table X (A Int64)
Engine=MergeTree order ... | ClickHouse | 60,255,863 | 12 |
I have a String field with timestamp like this: "2020-01-13T07:34:25.804445Z". And i want to parse it to datetime (to use in Grafana filters, for example). But i getting this error:
SELECT SELECT "@timestamp" AS timestamp, CAST(timestamp AS DateTime) as datetime from table
Cannot parse string '2020-01-13T06:55:05.704Z... | SELECT parseDateTimeBestEffortOrNull('2020-01-13T07:34:25.804445Z')
┌─parseDateTimeBestEffortOrNull('2020-01-13T07:34:25.804445Z')─┐
│ 2020-01-13 07:34:25 │
└──────────────────────────────────────────────────────────────┘
https://clickhouse.yandex/docs/en/query_language/functi... | ClickHouse | 59,712,399 | 10 |
I'm getting "Read timed out" when running a query on a 1,3b row db.
It is not a particular advanced query that groups together hashtags in tweets:
SELECT case when match(hashtag,
'[Cc]orona.*|COVID.*|[Cc]ovid.*|[Cc]oVID_19.*|[Cc]orvid19.*|COVD19.*|CORONA.*|KILLTHEVI.*|SARSCoV.*|ChineseVi.*|WuhanVir.*|China... | CH jdbc driver has a socket_timeout = 30000 (30s) by default
Under the Advanced tab, you can configure advanced connections settings, > e.g., Character Coding.
Connection / Advanced properties / New property -> socket_timeout = 300000
| ClickHouse | 63,621,318 | 10 |
I'm going to migrate data from PostgreSQL database to Yandex's ClickHouse.
One of the fields in a source table is of type JSON - called additional_data. So, PostgreSQL allows me to access json attributes during e.g. SELECT ... queries with ->> and -> and so on.
I need the same behavior to persist in my resulting table ... |
Although ClickHouse uses the fast JSON libraries (such as simdjson and rapidjson) to parsing I think the Nesting-fields should be faster.
If the JSON structure is fixed or be changed predictably try to consider the way of denormalizing data:
..
created_at DateTime,
updated_at DateTime,
additional_data_m... | ClickHouse | 64,131,915 | 10 |
Is it possible to alter a table engine in clickhouse table like in MySQL, something like this:
CREATE TABLE example_table (id UInt32, data String) ENGINE=MergeTree() ORDER BY id;
ALTER example_table ENGINE=SummingMergeTree();
Because I didn't find such capability in the documentation.
If it is not possible, are there ... | It's possible to change an Engine by several ways.
But it's impossible to change PARTITION BY / ORDER BY. That's why it's not documented explicitly. So in 99.99999% cases it does not make any sense. SummingMergeTree uses table's ORDER BY as a collapsing rule and the existing ORDER BY usually does not suit.
Here is an e... | ClickHouse | 68,716,267 | 10 |
Druid is used for both real time and batch processing. But can it totally replace hadoop?
If not why? As in what is the advantage of hadoop over druid?
I have read that druid is used along with hadoop. So can the use of Hadoop be avoided?
| We are talking about two slightly related but very different technologies here.
Druid is a real-time analytics system and is a perfect fit for timeseries and time based events aggregation.
Hadoop is HDFS (a distributed file system) + Map Reduce (a paradigm for executing distributed processes), which together have creat... | Druid | 24,121,947 | 11 |
I currently connect to the druid cluster through the druid connector in Apache Superset. I heard that SQL can be used to query druid. Is it possible to point my SQL database connection to druid?
| Follow the steps below
You need to use latest version of pydruid for enabling sqlalchemy
support. For me pydruid 0.4.1 is working fine.
On Superset, in the Databases section you need to provide the SQLAlchemy URI druid://XX.XX:8082/druid/v2/sql/using a broker ip/host.
Third thing you need to do is to enable dr... | Druid | 50,182,494 | 10 |
I have a web application that is <distributable/>, but also deployed to stand alone instances of Wildfly for local development work. Sometimes we have calls to the backend that can stall for a few seconds, which often leads to exceptions like the one shown below.
How can I fix this given that I have no control over lon... | I believe the answer is to update the infinispan configuration like this, which increases the lock timeout to 60 seconds.
<cache-container name="web" default-cache="passivation"
module="org.wildfly.clustering.web.infinispan">
<local-cache name="passivation">
<locking isolation="REPEATABLE_READ" striping... | Infinispan | 35,711,423 | 14 |
We are working in the design phase of new project where we need to decide the caching framework. We need decide whether to go with EHCache with Terracotta or Infinispan for caching requirement? Can anyone provide me the advantages & disadvantages of EHCache and Infinispan?
Thanks in advance.
| Is your environment distributed? If so, Infinispan would have an advantage of scalability due to its p2p design. Even in standalone (non-clustered mode), you'd get to take advantage of the non-blocking nature of Infinispan internals, state of the art eviction algorithms (LIRS), etc. Have a look at this article for a... | Infinispan | 5,621,209 | 13 |
I use Observables in couchbase.
What is the difference between Schedulers.io() and Schedulers.computation()?
| Brief introduction of RxJava schedulers.
Schedulers.io() – This is used to perform non-CPU-intensive operations like making network calls, reading disc/files, database operations, etc., This maintains a pool of threads.
Schedulers.newThread() – Using this, a new thread will be created each time a task is scheduled. It... | Couchbase | 33,370,339 | 36 |
I tried to edit document via couchbase console, and caught this warning message:
Warning: Editing of document with size more than 2.5kb is not allowed
How can I increase max editing document size?
| You can raise the limit or disable completely on version 2.2:
To raise the limit;
edit file: /opt/couchbase/lib/ns_server/erlang/lib/ns_server/priv/public/js/documents.js
at line 214:
var DocumentsSection = {
docsLimit: 1000,
docBytesLimit: 2500,
init: function () {
var self = this;
Edit the docBytesLimit va... | Couchbase | 19,090,611 | 28 |
What does this error mean .. It runs fine in Eclipse but not in intellij idea
Exception in thread "main" java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLo... | if you're using kotlin, add open to your class (extends RealmObject) declaration
open class Foo() {
}
| Couchbase | 18,138,136 | 26 |
With the two merging under the same roof recently, it has become difficult to determine what the major differences between Membase and Couchbase. Why would one be used over the other?
| I want to elaborate on the answer given by James.
At the moment Couchbase server is CouchDB with GeoCouch integration out of the box. What is great about CouchDB is that you have the ability to create structured documents and do map-reduce queries on those documents.
Membase server is memcached with persistence and ve... | Couchbase | 6,170,909 | 25 |
I've got a Eclipse project which I somehow managed to get working in Android Studio awhile back. It uses TouchDB library/project which I now want to upgrade to their latest offering couchbase-lite-android which looks like it comes ready built for Android Studio with gradle files.
However I'm at a loss how to go ahead a... | Try going to File -> "Import Module" instead of "Import Project". In Android Studio, an entire window is a project. Each top-level item in that project is called a module. Coming from the Eclipse world, it'd be:
Eclipse workspace = Android Studio project
Eclipse project = Android Studio module
| Couchbase | 17,625,219 | 21 |
Write operations on Couchbase accept a parameter cas (create and set). Also the return result object of any non-data fetching query has cas property in it. I Googled a bit and couldn't find a good conceptual article about it.
Could anyone tell me when to use CAS and how to do it? What should be the common work-flow of... | CAS actually stands for check-and-set, and is a method of optimistic locking. The CAS value is associated with each document which is updated whenever the document changes - a bit like a revision ID. The intent is that instead of pessimistically locking a document (and the associated lock overhead) you just read it's C... | Couchbase | 22,601,503 | 21 |
In a Phonegap offline/online project:
What is the difference between using PouchDB and using CouchBase Lite with the new LiteGap plugin?
Are they two different solutions to the same problem?
Can the PouchDB API be used to interact with a local CouchBase Lite database?
| After some research and being a relatively new topic, i thought it would be interesting to share my experiences replying my own question:
What is the difference between using PouchDB and using CouchBase Lite with the new LiteGap plugin?
PouchDB can create a local database (websql or IndexedDB) on the device and replica... | Couchbase | 18,416,289 | 20 |
I've been browsing the net trying to find a solution that will allow us to generate unique IDs in a regionally distributed environment.
I looked at the following options (among others):
SNOWFLAKE (by Twitter)
It seems like a great solutions, but I just don't like the added complexity of having to manage another softwa... | You are concerned about IDs for two reasons:
Potential for collisions in a complex network infrastructure
Appearance
Starting with the second issue, Appearance. While a UUID certainly isn't a great beauty when it comes to an identifier, there are diminishing returns as you introduce a truly unique number across a com... | Couchbase | 18,248,644 | 16 |
I'm unclear about the requirements for using Couchbase-lite.
Is it possible to use Couchbase-lite with CouchDB? Or does Couchbase-lite require Couchbase Server and Sync Gateway?
Thanks!
| According to the documents it is 100% compatible with both CouchDB and Couchbase.
http://docs.couchbase.com/couchbase-lite/cbl-concepts/#can-couchbase-lite-replicate-with-apache-couchdb-servers
Also I found this blog post on syncing IOS with CouchDB, might be useful! http://blog.lunarlogic.io/2013/synchronization-using... | Couchbase | 20,489,162 | 15 |
I have a Debian server with about 16GB RAM that I'm using with nginx and several heavy mysql databases, and some custom php apps. I'd like to implement a memory cache between Mysql and PHP, but the databases are too large to store everything in RAM. I'm thinking a LRU cache may be better so far as I research. Does t... | Supposing there is a unique server running nginx + php + mysql instances with some remaining free RAM, the easiest way to use that RAM to cache data is simply to increase the buffer caches of the mysql instances. Databases already use LRU-like mechanisms to handle their buffers.
Now, if you need to move part of the pro... | Couchbase | 9,213,498 | 14 |
For an iPhone App I decided to give a try to a NoSQL DB, because the nature of the data I need to store locally. The most sophisticated solution I found is Couchbase Mobile. But it seems, that the project has only beta status. Is it too soon to use it?
| Couchbase Mobile is currently beta, with plans for a GA/1.0 at the end of September (2011).
By the next developer preview release at the end of August the iOS version should be entirely ready for you to start development with. The Android version is lagging a little in terms of documentation, but should also be ready ... | Couchbase | 7,063,402 | 11 |
Is there any stable nosql database for iOS except for Couchbase?
Couchbase is now a beta version which i don't want to use on a app with many users.(Although i like Couchbase very much)
Any suggestions? Special Thx!
| There are several projects to get a CouchDB-compatible API available on mobile devices.
TouchDB, a native iOS build
PouchDB, an HTML5 implementation, for web and PhoneGap apps
| Couchbase | 10,471,867 | 11 |
I'm using iOS Couchbase Mobile to have a couchdb server on an iPad that uses replication to sync with a server on https://cloudant.com. cloudant uses HTTPS, and when I try replicating on the iPad, i just get spammed by errors.
This is a known issue, as seen on this FAQ article. It recommends using 1.0.2 to fix the issu... | The issue of enabling https connection between CouchBase Mobile for iOS and another CouchDB/CouchBase instance is also discussed here: https://groups.google.com/d/msg/mobile-couchbase/DDHSisVWEyo/hxtlVRhQtwkJ
Apparently it can be done.
| Couchbase | 10,521,451 | 11 |
i am currently building a website around a couchbase database and if it gets popular it is likely that i will be hosting the site and database on more than 2 machines at some stage in the future. its a fair way off still, so i would like some information to help me decide which direction to go from here. my questions a... | You can deploy Community Edition on 2 nodes and more. Restrictions exist only for Enterprise Edition:
http://www.couchbase.com/couchbase-support
| Couchbase | 12,685,801 | 11 |
I am preparing to build an Android/iOS app that will require me to make complex polygon and containment geospatial queries. I like Apache Cassandra's no single point of failure, fault tolerance and data center awareness. Cassandra does not have direct support for geospatial queries (that I am aware of) but MongoDB and ... | Aerospike just released Server Community Edition 3.7.0, which includes Geospatial Indexes as a feature.
Aerospike can now store GeoJSON objects and execute various queries, allowing an application to track rapidly changing Geospatial objects or simply ask the question of “what’s near me”. Internally, we use Google’s S2... | Couchbase | 24,121,192 | 11 |
I am creating a demo project for reative programming with springboot and Couchbase.
I have set the below properties in application.properties file:
spring.couchbase.bootstrap-hosts=localhost
spring.couchbase.bucket.name=vanquish
spring.couchbase.bucket.password=
spring.data.couchbase.repositories.type=auto
As I don't ... | Assuming that you're using a couchBase version 5.x:
According to the couchBase documentation:
To access cluster-resources, Couchbase Server users — administrators
and applications — must specify a username and password.
Steps to follow:
Open your couchBase admin console: http://<couchBase-host>:8091/ui/index.html#... | Couchbase | 51,496,589 | 11 |
For example I have created cluster with 1GB RAM memory per node. After some time I want to increase RAM memory for claster for example to 2GB per node. I assumed that I can do that through Couchbase Console. But "edit" button is disabled for every node.
So can someone advise me the solution?
Thanks.
| You can do so with the couchbase-cli utility that is installed with Couchbase. This tool should be located with the other Couchbase binaries on your system (e.g., C:\Program Files\Couchbase\Server\bin).
From the command line:
c:\>couchbase-cli cluster-init -c <CLUSTER_IP> -u <USERNAME> -p <PASSWORD> --cluster-init-r... | Couchbase | 11,210,719 | 10 |
i have one Job Distributor who publishes messages on different Channels.
Further, i want to have two (and more in the future) Consumers who work on different tasks and run on different machines. (Currently i have only one and need to scale it)
Let's name these tasks (just examples):
FIBONACCI (generates fibonacci numb... | Here's a conceptual view of how I would build this on couchbase.
You have some number of machines to process jobs, and some number of machines (maybe the same ones) creating jobs to do.
You can create a document for each job in a bucket in couchbase (and set its type to "job" or something if you're mixing it with ot... | Couchbase | 12,277,067 | 10 |
In couch base URL, e.g. server:port/pools/default
what exactly a couch base pool is. Will it always be default or we can change it.
There is some text written there
http://www.couchbase.com/docs/couchbase-manual-1.8/couchbase-admin-restapi-key-concepts-resources.html
but I cannot really get it 100%. Please anyone can... | A long time ago the Couchbase engineers intended to build out a concept of having pools similar to zfs pools, but for a distributed database. The feature isn't dead, but just never got much attention compared to other database features that needed to be added. What ended up happening was that the pools/default just end... | Couchbase | 16,978,324 | 10 |
I'm learning Couchbase, now on version 3.x
My doubt is, when should i use a N1QL query vs a View query?
And, are there performance differences between them?
Note: I have a situation:
A Bucket with two document types for my Traveling App: Route and City
A Route doc holds the information about the traveling route and a... | N1QL looks promising for your data. Even though it is, as another poster points out, in developer preview, it's worth exploring. You can NEST traveling_app with itself to get all city docs 'nested' with each route:
SELECT r.name, c FROM traveling_app r NEST traveling_app c ON KEYS
r.cities;
To get say the city ... | Couchbase | 28,500,633 | 10 |
in Couchbase DB, is it possible to retrieve multiple documents using key prefix as query string, and it returns all the key-values which has key starting with supplied key prefix (like operator kind of thing)? without using Views or queries/indices.
I am designing my keys the way it is shown in Slide 51 of this present... | If you don't want to use a view or n1ql query, there is no way to retrieve documents without knowing their exact keys. That is, you can only retrieve your prefix-based keys if you have a way to generate the possible keys on the client side in advance, e.g. User-1, User-2 ... User-n.
You can, however, do the sort of pr... | Couchbase | 30,573,992 | 10 |
I've been testing Couchbase 5 and created a bucket called fp-conversion-data which has some JSON data in it. I have been trying to run some simple queries such as:
SELECT * FROM fp-conversion-data limit 5;
Instead of getting the expected results, I keep getting this error:
[
{
"code": 4010,
"msg": "FROM expr... | I think the problem is that you have dashes in the name of the bucket. Use backticks (`) around the bucket name.
Try this:
SELECT *
FROM `fp-conversion-data`
LIMIT 5;
| Couchbase | 48,510,648 | 10 |
I Have two repository interfaces that connect :
MongoDB and CouchBase :
public interface UserRepositoryMongo extends MongoRepository<User, Long> {
}
public interface UserRepositoryCouch extends CouchbasePagingAndSortingRepository<User, Long> {
}
Is there a way to interchangeably @Autowire these repositories into Use... | We can use either ConditionalOnProperty or ConditionalOnExpression to switch between two different repository implementation.
If we want to control the autowiring with simple property presence/absence or property value, then ConditionalOnProperty can be used.
If complex evaluation is required, then we can use Conditi... | Couchbase | 62,124,675 | 10 |
I am evaluating what might be the best migration option.
Currently, I am on a sharded MySQL (horizontal partition), with most of my data stored in JSON blobs. I do not have any complex SQL queries (already migrated away after since I partitioned my db).
Right now, it seems like both MongoDB and Cassandra would be likel... | Lots of reads in every query, fewer regular writes
Both databases perform well on reads where the hot data set fits in memory. Both also emphasize join-less data models (and encourage denormalization instead), and both provide indexes on documents or rows, although MongoDB's indexes are currently more flexible.
Cassan... | Cassandra | 2,892,729 | 764 |
I have been reading articles around the net to understand the differences between the following key types. But it just seems hard for me to grasp. Examples will definitely help make understanding better.
primary key,
partition key,
composite key
clustering key
| There is a lot of confusion around this, I will try to make it as simple as possible.
The primary key is a general concept to indicate one or more columns used to retrieve data from a Table.
The primary key may be SIMPLE and even declared inline:
create table stackoverflow_simple (
key text PRIMARY KEY,
da... | Cassandra | 24,949,676 | 659 |
I am newbie in Cassandra and trying to implement one toy application using Cassandra. I had created one keyspace and few column families in my Cassandra DB but I forgot the name of my cluster.
I am trying to find if there is any query which can list down all the available keyspaces.
Anybody knows such a query or comman... | [cqlsh 4.1.0 | Cassandra 2.0.4 | CQL spec 3.1.1 | Thrift protocol 19.39.0]
Currently, the command to use is:
DESC[RIBE] keyspaces;
| Cassandra | 18,712,967 | 244 |
I scaffold an app using jhipster which is microservice gateway using cassandra db and using maven to build which was building fine after scaffold.i ran gulp command to for the live reload of ui.
i made a change slighlty in navbar and home page of it.
which was also working file & made some changes in the json files of ... | I sometimes also get this error when starting my gulp server. My workaround is to just run:
npm rebuild node-sass
And then gulp starts nicely afterward.
| Cassandra | 45,251,645 | 182 |
What does going with a document based NoSQL option buy you over a KV store, and vice-versa?
| A key-value store provides the simplest possible data model and is exactly what the name suggests: it's a storage system that stores values indexed by a key. You're limited to query by key and the values are opaque, the store doesn't know anything about them. This allows very fast read and write operations (a simple di... | Cassandra | 3,046,001 | 169 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.