Whats is the difference between Quill Delta and Parchment - quill

I don't find a clear distinction between those two concepts. Parchment is said to be the document model but, from my understanding, Delta is the document model and Parchment is a way to transform this model to HTML.
Can someone clarify this ?
Thanks

Related

shapefile for mumbai city areawise or section wise

please don't kill me if this question is listed anywhere else, i really searched high and low to find answer to this question.
i am working on a project in which i need to plot data on Mumbai city map section wise or area wise but i am not able to get Shapefile for the same. can anyone please provide me the link where i can get this Shapefile? or guide me on creating one using QGIS??.I mentioned QGIS because i know a little about OGIS and hence it will save time.Also i tried certain links which are listed below. but i couldn't find what i need.Guys it would be a great help because i really need this and i am stuck on this from few days.Also i mentioned shapefile because these are easy to manipulate, later i will convert it into geoJSON and work on it so if geoJSON files are there then it would also help.
Note: only the important links are listed:
1. http://monsoon.mcgm.gov.in:8080/RESTFulWS/WardMaps.html0
2.http://www.naturalearthdata.com/downloads/10m-cultural-vectors/
thanks.

style an element using an angular filter

I would like to style a couple of elements using a filter to decipher if it should be yellow or red.
I understand filters should not carry logic operations in them as such so am guessing a service is the first port of call before i create any filter for it.
I am leveraging data from a backend (still a bit unsure of the Backend model here, but know I can leverage certain objects to obtain the data needed for working on) I mostly need to know if i`m on the right path by using a service to control the logical outcome and then a filter to provide 'filtration' of that outcome.
BTW: sorry, im waiting for my project to checkout from SVN at mo so cannot provide a skeleton attempt.
Will do in a bit though .....
Any advice before hand will be much appreciated
:) Gruffy - thanks for reading
You can directly set the class attribute if you want, so your filter can simply return the CSS class to apply:
<p class="{{'foo'|myFilter}}">Foo</p>
Here's a fiddle showing what I mean.

Solr+Sunspot: Having different boost on tags of a record -- possible?

I have a model, say Post. It has tags. Each of the tags has a weight that should be reflected in search.
Can I somehow store these tags and boost each of them with its weight?
Example:
Post title is "Eating outside"
Tags are "burgers" (weight 5), "pizza" (wight 4) and "sushi" (weight 2).
When someone searches for "burgers", this should consider the extra boost and show it above a post with tag "burgers" which has weight=2.
First solution that came to my mind was having 5 text fields with boosts 1-5, that will contain the tags for each post. Is there more elegant solution?
There is no good out of the box support for that. However, the nearest match seems to be payloads. Have a look at the (oldish) article about it here but there is a more recent one as well. Both of these use custom similarity, which is quite an advanced topic. Fortunately, as of Solr 4, there is a way to define per-field similarity, so the final code may be simpler than any of those examples.
If you do figure this out, share the article with the rest of the world (e.g. at SearchHub). I think nobody has put the pieces together yet with fully updated Solr stack.

Drupal Display suite title formatter

I am writing a title formatter for display suite, but title isn't a 'CCK' type. Can anyone help me out with how to define the formatter ?
Since title is a property, not a field, you cannot use a field formatter.
You'll need to take another approach to solve this problem, for example override the node template file, implement a hook_preprocess function, or implement hook_node_view.
edit:
There are lots of discussions about properties versus fields.
Here are some links to get you started with some background about why title is still a property, as well as some related modules.
http://drupal.org/node/557292 - Issue: Convert node title to fields
http://drupal.org/node/571654 - Issue: Revert node titles as fields
Note: I have not used all these modules and do not endorse them in any way, and don't claim that they address your question. This is just a short listing for your edification:
http://drupal.org/project/title
http://drupal.org/project/auto_nodetitle
http://drupal.org/project/title_field_ui
What do you mean the title isn't a "CCK" type? It should be a Field. Try this module: http://drupal.org/project/custom_formatters
There is an issue for the custom formatters module about that: #816924: Custom formatter for title field?

CakePHP: I can't understand this in translate behavior

in cakebook on page http://book.cakephp.org/view/1331/Defining-the-Fields there is a sentence what I am not able interpret:
When defining fields for TranslateBehavior to translate, be sure to omit those fields from the translated model's schema. If you leave the fields in, there can be issues when retrieving data with fallback locales.
Can somebody explain me in a more simple way than it is in originally?
I think I have language problem as english is not my native :P
It means that in the following case:
class Article extends AppModel
{
var $actsAs = array('Translate' => array('title'));
}
You should not have the field Article.title (i.e. articles.title) in your database, otherwise you'll have trouble at some point.
Basically, when you design your table you plan to translate, omit those fields you want to translate.
Hope that helps!
I've never used that behaviour and I have to say that I would be looking elsewhere for an explanation of how to use it as I too (and I'm English) am having trouble understanding it.
My guess is that you need to ensure that there are no fields in the i18n table with the same name as a field that you are translating, i.e. if you are translating Post.name you must be careful not to have i18nTable.name
I don't use the console and there is no explanation of the required name or structure of the i18n table, so my comment is guesswork but I hope that it is in someway helpful.

Resources