Getting Bored? Download Couch. Everyone's Favorite Infotainment App. Click here http://bit.do/CouchApp #News #Entertainment #CouchApp
seen from China

seen from Türkiye
seen from Italy
seen from United States
seen from Hong Kong SAR China
seen from Russia

seen from United States
seen from China
seen from United Kingdom
seen from China

seen from United States
seen from Canada

seen from United States

seen from Italy
seen from United States
seen from Türkiye

seen from Yemen
seen from France

seen from Bulgaria
seen from Türkiye
Getting Bored? Download Couch. Everyone's Favorite Infotainment App. Click here http://bit.do/CouchApp #News #Entertainment #CouchApp

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
Download Couch #News & #Entertainment App http://bit.do/CouchApp #Follow #Bollywood #DeepikaPadukone #Endorsement #CouchApp
Generating html tables out of a couchdb list using mustache
... turned out to be harder than expected. The reason for this seems to be the way I store the data in my couchdb documents (cdoc). Here is how I organized the data in my cdocs:
{_id:a, _rev: 1-x, Cal:{ Device:"dev-1", Measurement:{ Values:{ Temperature:[ {Type:"room", Unit:"K", Value:[296.33, 296.34, 296.35] }, {Type:"p-box", Unit:"K", Value:[296.33, 296.34, 296.35] } ], Pressure:[ {Type:"fill", Unit:"kPa", Value:[30.1234, 50.2345, 90.3545] } ] } }, Analysis:{ Values:{ Uncertainty:[... ] } }, Result:{...} } }
It maybe can be described as column oriented (co) and is a perfect fit for processing with R (R only knows vectors and one can simply multiply Temperature times Pressure while both are vectors). Since a html table works row oriented (ro) I need a transformation process from co to ro.
If the result of this transformation is something like:
{ Dev:["", "dev-1", "dev-1", "dev-2", "dev-2" ] Type:["room","channel-1","indication", "channel-1","indication" ] Unit:["K", "K", "kPa", "K", "kPa" ] ValueCol:[ {ValueRow:[296.11, 296.22, 30.1234, 296.22, 30.1234 ] }, {ValueRow:[296.11, 296.33, 50.2345, 296.33, 50.2345 ] }, {ValueRow:[296.11, 296.44, 90.3545, 296.44, 90.3545 ] } ] }
One can use a simple mustache template like:
<table> <tr> {{#Dev}} <th>{{.}}</th> {{/Dev}} </tr> <tr> {{#Type}} <th>{{.}}</th> {{/Type}} </tr> <tr> {{#Unit}} <th>in {{.}}</th> {{/Unit}} </tr> {{#ValueCol}} <tr> {{#ValueRow}} <td>{{.}}</td> {{/ValueRow}} </tr> {{/ValueCol}} </table>
to render the whole stuff. The transformation simply can be done (with one or two loops) in the list function after all the columns for the table are collected.
Putting everything together the list function in pseudo code looks like this:
function(head, req) { var share = require("lib/share"), mustache = require("lib/mustache"), table = this.templates.divTable, q = req.query, r,i; start(share.startHtml); if(q.keys){ while(r = getRow()) { // // collecting data columns // colData.push(r..); } // while for(i = 0; i < colData.length; i++){ // // transform colData in rowData // } //for } // if send(mustache.to_html(table, rowData)); }
the pure html output looks like this:
all dev-1 dev-1 dev-2 dev-2 room channel-1 indication channel-1 indication in K in K in kPa in K in kPa 296.11 296.22 30.1234 296.22 30.1234 296.11 296.33 50.2345 296.33 50.2345 296.11 296.44 90.3545 296.44 90.3545
Comments welcome! HTH
I’m not sure what it is, but developing an App with CouchDB feels a little bit like a rocket ride. There isn’t much room for fancy maneuvers, but one’s closing in on target really fast. ...

Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
Free to watch • No registration required • HD streaming
...
Quite some time has passed since I started having fun with CouchDB. After using the usual PHP/MySQL Combo for more than a decade now, I’m quite used to the thought of using a three layer model to build web applications. I was so blinded by that “usual” procedure that I didn’t even think about it any other way.
...
release and change of direction for the Kanso project
couchapp git and yuidoc
Up to now the generation of documentation out of javaScript sources don't seem to have a standard tool.
I've tried yuidoc and have to say that I'm not complete convinced. The pros and cons of yuidoc are a story for itself.
However I've worked out a (conceptual) way which combines my daily tools couchdb couchapp and git for having the latest documentation (generated by yuidoc) online and moreover offline.
Install yuidoc
There are official repos on opensuse.com providing the python stuff. With this the installation goes like described in the INSTALL file after extracting the zip:
1. Check to see if setuptools is installed. Execute this command: which easy_install If it returns something, it's installed skip to step #3. 2. Install Setup Tools: Extract the archive in ext and install the package sudo python setup.py install (no sudo needed for cygwin or windows) setuptools cd ext tar xfvz setuptools-0.6c9.tar.gz cd setuptools-0.6c9 sudo python setup.py install 3. Install the dependencies easy_install pygments easy_install Cheetah easy_install simplejson 4. Make a copy of yuidoc/bin/example.sh and modify the paths to suit your needs.
If you speak a lang with strange letters (öäü) you should replace line 57 in yuidoc_highlight.py with:
out.writelines(highlighted.encode('utf-8'))
Config
The example.sh from point 4 is the script you have to modify and execute. This is nice, since you can simply use the script as post commit hook
cp yuidoc/bin/example.sh ~/..project../.git/post-commit
You can set some variables in that script e.g.:
version=`git log --pretty=format:"%ad-%an-%H" --date=short -n 1`
to display some version information on the page.
Use a couchapp!
I have to document a couchapp I wrote. Here, my first attempt was: make a folder below _attachments and let the html arise in there failed. Rewriting the
yuidoc/template/main.tmpl
to adapt the server pathes is simply to much work. Therefore this idea:
Generate a couchapp project-doc and strip it down to the bones:
/dir> ls project-doc/ ./ ../ _attachments/ .couchappignore couchapp.json .couchapprc* _id
set the variables in the shell/hook-script to
parser_in="./_attachments/js-src-to-doc" parser_out=$doc_home/_attachments generator_out=$doc_home/_attachments
while
doc_home=path/to/project-doc
couchapp push
visit http://localhost:5984/db_name/_design/project-doc/index.html
Also the deployment can be activated via the shell/hook-script. Add
cd path/to/project-doc && couchapp push
at the last line. If everything works fine you got a fresh source code documentation on every commit.