FAQ Database Discussion Community


Capitalize both parts of a hyphenated word with Rails

ruby-on-rails,string,capitalization,hyphenation,cap
I'm trying to capitalize both parts of a hyphenated word with Rails: "hello-world".capitalize # => Hello-world "hello-world".titleize # => Hello World Is there a quick way of doing this? If not then I will write a custom solution, I can figure that out, but I'm hoping there is some really...

NoSQL database. In CAP theorem, what does CP mean?

database,nosql,cap
I am confused about the difference between CA and CP. Suppose that we choose CP,and there is a partition in the network, if we want to keep consistency in the distributed system, every node has to wait and get synchronized to prevent there is inconsistency. For example, we have 10...

Python XML Feed parser cant find specific event

python,xml,for-loop,feedparser,cap
I am making a python script to read the NWS CAP alerts, and look for a tornado warning. I have the script far enough to read the XML, However I cant get it to return true when a tornado warning is issued. This is because my script will only read...