What is a comment thread in the vs code api? - visual-studio-code

In the Api docs of VS Code there is a concept of Comment Thread under the workspace. Is there an example of this? What are these threads? Can developers have discussions on comments? Where are these comments saved?
https://code.visualstudio.com/api/references/vscode-api#CommentThread
I tried googling and the closest I came to an example was this issue thread.
https://github.com/microsoft/vscode/issues/71171
How could I open this comment discussions in my workspace? Sorry if this is a newbie VS Code question - just recently converted.

How could I open this comment discussions in my workspace? Sorry if this is a newbie VS Code question - just recently converted.
This is an API used by extension developers. This is relevant to you if you want to create your own VS Code extension, and you need a way to display comments/discussions inside the code.
See https://github.com/microsoft/vscode-extension-samples/tree/main/comment-sample for an example + screencast. You first need to create a CommentController. The CommentController allows you to create a CommentThread. A CommentThread is a list of comments. Each Comment will have a body (text or markdown), author, date, etc.
A common use-case of this API is to show code review comments. In particular, this is used by the GitHub Pull Requests extension, but you could imagine other use-cases for showing comments discussions inside a file.
Where are these comments saved?
This API deals only with the UI. You decide where the discussions are stored (e.g. make request to a service, or store them on disk). Once you have the data inside your extension, use this API to render them.

Related

How to format a code block as is done by github's gist embed?

I have a Jekyll-powered blog, oriented towards programming for data analysis. I often embed github gists to display nicely formatted (highlighted) code blocks, and this works perfectly.
Now I'm wondering if it is possible to generate (locally on my machine) the same html code that's generated by the github gist embed, but for code files that are located on my computer instead of in github gist repo.
I guess my question could then be rephrased as:
- The html code that a 'github-gist embed' gives, how is it generated in the first place?
FYI: I'm not necessarily looking for a closed solution, any pointers on how to achieve this would also be very appreciated.

signing pdf using itextsharp 5.4.4 - example

Can someone supply an example or a link to an example that signs an existing pdf using itextsharp 5.4.4? Ideally keeping pdf/a conformity of the pdf? Thank you.
Edit: I understand the question looks as if I did not use google etc. BUT, new versions of itextsharp contain completely rewritten code for signing as well as other functions, making the existing examples non-functional. Also, itextsharp started using different names for methods eg. instead of createSignature one has CreateSignature, instead of getSignatureAppearance one seems to have SignatureAppearance etc. making the port from java examples a real nightmare. Also the samples in the source code itself are in java not c#. There is really nowhere else I can go.
Please read http://itextpdf.com/book/digitalsignatures
The examples are in Java, but they were also ported to C#. You can find the C# examples here. I didn't vote your question down, but... the first place to go when you have a question about iText should probably be http://itextpdf.com
The book I refer to (I'm the author) as well as the new examples are on the learn page.

How to Style Facebook Activity Feed

How do you implement custom css on a Facebook activity feed plugin? This related post does not fully answer the question. Is this the right way?
Where does the
<fb:tag name='link'></fb:tag>
go? Inside of of the
<fb:activity site="..." app_id="..." ></fb:activity>
outside of it, before or after? I'm sort of confused...
the only way i use activity feed is when its in a widget that will generically upate in all posts. Anyone who inserts these snippets into blog posts or other 'hard to find and edit later' posts and pages, will regret it
Why?
Because Facebook changes their script every month or so and the script snippet you inserted wont work anymore
I have hundreds of blank areas in blog posts where i inserted an activity feed and the script always stops working after some weeks when fb adds some code or changes the location of some script or renames a file and the old script has no canonical or generic way of readjusting.
There is no point in using a script which gets made obsolete every month and you then need to find all posts where you inserted the snippet and change it for the new working code.
Im always having to reinsert new code into my fb social widgets because they cease to function...
Not viable unless you take it into consideration. Only insert in spaces where oyu wil notice it when it stops working
As Facebook Answers answered, you cannot really style it with a custom CSS, nor via JS, as the activity feed widget creates an iframe.
The info from martincarlin87 is useful, but that is not exactly what you get with the Activity Plugin, which is what you meant I guess:
http://developers.facebook.com/docs/reference/plugins/activity/
For using this you cannot really interact with the Facebook API, it is a little world apart. By now... (July 12th 2012)
Facebook PHP SDK: https://github.com/facebook/php-sdk
Comes with some simple examples, I would suggest uploading it to your server and tinkering with it, Facebook has a steep learning curve but here at Stack Overflow there is even a Facebook section: facebook.stackoverflow.com so just take each step at a time and if you can't get it by reading the facebook docs: developers.facebook.com then you can always ask here and I'm sure someone will be able to help you.
Getting Started: http://developers.facebook.com/docs/reference/php/
Once you have made an app, you add it to your fan page and then you will be abel to test what information you can get using the Graph API Explorer: https://developers.facebook.com/tools/explorer
That post you refer to is a red herring I'm afraid. If you put any HTML between the activity tags it gets rendered BEFORE the iframe is added. So its a no starter, from what I can see. However, I eventually found a solution, which I gave on that thread. I am repeating it here in case somebody searching doesn't see the other thread.
I managed to customise an Activity plugin, after a great deal of effort.
You can see the result here:
http://www.quniverse.co.uk/shopdata/about_us.php
Feel free to post a comment on that site, it exists purely for test purposes so I'm not fussed what goes up there provided its clean.
I explain how I achieved this in the blog article posted here:
http://facebookanswers.co.uk/?p=302
To summarise briefly:
You cannot insert CSS into the activity plugin.
Rely on the fact it has a transparent background, and supply your own.
Turn off the header and supply your own.
You can specify a light or a dark font, a few fontfaces and a border colour.
If you read the blog article you will get a full explanation.

typo3 - building a simple functionality

I am building a fairly simple website based on typo3. I'm new to the CMS but I've read almost everything I could find about it - tutorials, wikis, documentation. I'm stuck with designing a functionality for the administrator to be able to create records with predefined attributes (category, date, info, image, ...) and those records to be listed in a table on the front end with a "View detailed" link on each row. Will I need to develop a complete extension for this? From where the administrator will enter these records? How can I iterate them on the front end?
I apologize in advance if my question is too broad.
The Kickstarter extension provides a full stop solution for your needs. There is a good set of, if slightly outdated, screencasts explaining how to use this extension to create your custom record types and associated front-end views.

What is PP_OFF?

Every single GWT example I look at contains references to $PP_OFF. See http://code.google.com/p/google-web-toolkit-doc-1-4/wiki/DevGuideStyleSheets or http://khanzeeshan.wordpress.com/2009/06/12/creating-project-for-gwt-1-5-3/ for example.
What does $PP_OFF mean?
It's a bit of defunct wiki markup. The Google Code wiki treats {{{...}}} blocks as code and attempts to pretty-print them, which doesn't always work well; $PP_OFF is, or was, an undocumented feature that's supposed to stop that happening. See http://groups.google.com/group/gwt-google-apis/msg/04ae50fdd4339294 for the only mention of this that I can find online.
You should completely ignore it wherever you see it.
(You might be wondering why it would appear on some random person's WordPress blog, which of course isn't using the Google Code wiki. The answer appears to be that the person in question just copied-and-pasted stuff from Google's documentation. See http://code.google.com/webtoolkit/doc/1.5/tutorial/create.html if you're curious about the original source which, of course, he didn't credit.)