How to add bullets in featured snippet using structured data? - structured-data

I want to add bullets in featured snippet. When i search for 'gastric balloon' in google it gives me featured snippet for this link www.bariatric-surgery-source.com/gastric-balloon.html as shows in below image :
PLEASE OPEN THIS IMAGE => https://i.stack.imgur.com/1MBoD.png .
I have marked those lines with red color i.e i want to make display them with bullets symbol instead of plain text.
Someone suggest me that it could be possible with structured data but how?
And which code i have to write and where?

You have done everything semantically, so I would make the assumption that Google will strip out any formatting, and apply their own.
Best thing you could do is mark it up with ListItem schema.
An list item, e.g. a step in a checklist or how-to description.
Source - https://schema.org/ListItem

Related

How to get description tags from an image in Python

I am familiar with EXIF Tags and how to get them as a dictionary for an image. There are abundant examples on that topic. What I get is a dictionary with many items pertaining to characteristics of an image, like focus, date and time, geo data and so on. What I DO NOT GET and want to be able to read are descriptions that I assigned to an image like: "Kindergarten, Birthday party, Sailing" or whatever. These are named "Description -> Tags" if you right-click on a picture in Windows and go to the Details tab. In Adobe Bridge they are named keywords.
How can I read them in Python?
I have not tested it but this says there is an EXIF tag named ImageDescription that might be what you're looking for.
PS: I'm not really sure about it so wanted to leave this as a comment...but reputation

How to make advanced CMS-like blog system from scratch?

When you create a news or blog tab with CMS it's really easy to make a feed of posts with content preview. Also when you follow a link to a particular post you can notice that it consists of a different html tags and css styling and not just plain text. It just uses rich text editor. So just getting text from db is not enough.
My question is how to achieve the same result when making a website from scratch. It doesn't matter what language is used for back-end. I'm just interested in the idea how to do it. But if you could provide a code examples (with any language) it would be greatly appreciated
Ok I've figured it out. Posting the answer for somebody who will have the similar question in the future.
The idea is that you need to put a text with html tags into your database and then to retrieve it you need to put it in your desired div in unescaped state. The thing is that almost all view (template) engines escape html tags by default. To do that you have to use some built in functions specific to that view engine.
To put the article with html tags in db you can just write raw html into input field or you can somehow add richtext editor to input field. Richtext editor will generate html for you.
I've researched it and found out that that's exactly how cms work.
So there you have it. If you want to add something feel free to do it

How can I prevent certain element to get displayed in Google search excerpt?

Currently Google displays elements in the result excerpts that belongs to the functional part of the site. Is there a way to exclude these elements to get crawled/displayed in google?
Like eEdit, eDelete, etc in the example above.
To exclude the pages from Google's index, block them using the Robots.txt file or if it is just the content then use the "rel="nofollow" tag.
Hope this helps.
Update on my particular situation here: I just found out that the frontend code has been generated in a way where the title and the description meta was identical.
Google is smart enough to expect that if a copy is already displayed in the title of the search result there's no reason to add in to the excerpt as well, instead looks for content - believed to be valuable - from the actual page.
Lessons learned:
there's no way to hide elements from google but keep it visible for your users
if you'd like to have control over the content displayed in google searches, avoid using the same copy in your title and description

How to keep headline and text in the same column using ColumnText?

I'm using iText to create a PDF file. While testing, a situation occurred where a headline was printed at the bottom of a column but the appendant text in the next.
The easy solution paragraph.setKeepTogether( true ); results in to much white space (see additional info below). Here is an image showing the current situation on the left and what I'd like to get on the right:
current and wanted situation (reputation...)
One of my biggest problems is, columnText.getYLine() returns the lowest position in the "origin" column even if the text flows over to the next.
I looked through the examples on the iText site and all results on stackoverflow for "itext column" plus some blogs but did not find any solution to my problem, other than printing each article in a new column. A concise description of the problem in a few words would help me search myself as English isn't my first language.
additional info
This is part of the report generation in a telemedicine project. A page template is filled by a web front end. There are several post processing steps e.g. attaching images of ECG output. These need a high pixel density to be readable, which is why I use iText (afaik pdfbox scales without taking the density into consideration). Some time ago the physicians noticed they had to insert more text than there's space on one page. So they wanted the overflow in an appendix. I could use another lib. The importance is on high readability on paper and a licence like (l)gpl/apache/... The white space results in more pages hence lessens the overview and wastes paper.
The setKeepTogether() method isn't supposed to work in combination with ColumnText. As documented in my book (the one shown in my avatar), the ColumnText class can be used in similation mode to finetune the layout.
The idea is that you define the location of your content in a trial-and-error process. First you add content and you invoke go(true); This will consume the content in your column, but will not add any content to your document. You can use this to discover how many lines have been written (getLinesWritten()), to check if all the content could be rendered (hasMoreText()), and so on.
Suppose that you find out that all the text can be written using the available space, you add the content to the column once more, change the Y-position to its original value, and add the column for real: go();
If there's content left in the column, you should create a new column, add the content anew and then make a decision. Change the position of the column and go(); If there's content left, but the content can be broken in two parts, change the Y-position and go(); then change the position of the column and invoke go() once more to render the remainder of the content in a different column.
You'll find different ColumnText examples in chapter 3.

full text searching in managed object context and core data

I am building a notes-like application. It has a NStableview displaying all notes' titles, and a NStextview displaying the plain text of the selected note. I am using bindings and core data. I want to have a search feature:
1. the tableview only shows the notes that contains the text you query
2. the textview displays the first note, and highlight the text you queried
I just started doing Cocoa development, and not sure how to implement this, and what classes and methods should I use. I googled around, and didn't find a good answer.
Can anyone please give me some ideas and resource to look at? Thanks.
If you have an NSSearchField in your xib, you can go to the bindings inspector and bind a predicate to it, instead of a value. Leave the model key path empty, and in Predicate Format (pretend your model is storing the text content with the attribute name "textContent") put this:
textContent contains[c] $value
The [c] tells it to search regardless of the case. It will automatically update your NSTableView if you're using bindings for that.
As far as highlighting your content, I'm not sure there's an easy way to do this with bindings (there might be).
Edit: Make sure you bind it to your NSArrayController, even though you leave the model key path blank

Resources