ag search results has corrupted messages in emacs - emacs

Recently my ag search results have started returning corrupted results like this:
[[?25h^[[0G^[[?25h^[[0Gapp/config/development.coffee:49:33:#
I am unsure as to why this has suddenly started happening.

Not sure what your context is exactly, but FWIW if you add --vimgrep as an argument to ag then you shouldn't get color codes in the response.

Related

Intellisense suggest not showing items returned by provideCompletionItems

I have an extension under development, and most of the time provideCompletionItems correctly displays the items returned by provideCompletionItems as suggestions.
VSCode Version: 1.45.0
OS Version: Mac 10.15.4
However, in some cases, when I am for sure returning items as an array, I see "No suggestions." Screenshot:
You can see in the DEBUG CONSOLE I am printing to the debug log an array of length 2 just before I return it as the completion items results. Relevant code here:
https://github.com/kortina/vscode-markdown-notes/blob/ak-bug-reference/src/extension.ts#L146
Is this a bug with VS Code that I should report, or am I misunderstanding the functionality of provideCompletionItems / do I need to do something else to have this reliably show the suggestions I am returning?
I have seen similar behavior and it turned out that I did not specify the range for the suggestion correctly. The engine returned many valid suggestions but the editor decided to show only the "No suggestions" message. So, double check the range in your completion items.

iTextSharp error, casting IncCell to Rectangle

I've been asked to look at C# code that's returning the following error:
Unable to cast object of type
'iTextSharp.text.html.simpleparser.IncCell' to type 'iTextSharp.text.Rectangle'.
at iTextSharp.text.pdf.PdfDocument.Add(IElement element)
at iTextSharp.text.Document.Add(IElement element)
It looks like they're using iTextSharp v5.0.2 and have not yet moved from HtmlWorker to XmlWorker.
Questions:
What is IncCell? I see it in the source docs but can't find any info about what it is - I'm assuming it's just for internal use.
Is this related to a cell in a table? A need for a Div or Paragraph within a cell?
What can they do to diagnose issues like this down to the HTML source that caused the error? I suspect this is an issue with not conforming to XHTML, but I can't verify that without knowing exactly what IElement that code was working on when it choked. It could be due to bad styling too, I have no idea at this time. Is there any kind of detail logging that will tell us what element is being processed at any given time? Should I just get them to load source and trace through it?
Is it probable that this will be fixed with an update to the latest version (currently 5.5.9), and a re-fit of XmlWorker?
Other recommendations?
Thanks!

Confluence pocketquery macro fetching unwanted word along with result from PostgreSQL

Hi I'm using a Confluence macro called 'PockketQuery'(PQ). I have connected to a server located at my client's base through PostgreSQL. I run PQ to fetch results from the db into my confluence page. However, it's fecthing an extra unwanted word "Hallo" along with every result. I m unable to figure out where this string maybe coming from and getting attached to my results like this. Please help me get rid of it.
For example I run a PQ on the db which is supposed to fetch me result "Jack London", so the result that I see is "hallo Jack London".
Note: I use VPN to connect to my client's server and Confluence.
Are you using the latest version from the Marketplace 1.14.6? This issue shouldn't exist in the latest version.
I got an upgrade to version 1.14.6 of Confluence's PocketQuery macro. The issue that I had is resolved, the unwanted string in the result is there no more. The bad part is they don't mention it anywhere on the macro's bug fixes. There are no release notes attached to this fix.Thank you Felix for your help.

How to fix warning in wordforms.txt during sphinx index?

I am new to sphinx.
When I am rotate/start the index, it shows.
WARNINGS:invalid mapping(must be exactly 1 destination keyword)(wordforms='Sufenta'>
'Sufentanil Citrate Injection'). Fix your wordforms file 'usr/local/sphinx/var/data/wordforms.txt'.
But after rotating, it gives and then it shows Rotated successfully message also.
Functionality is ok. But I dont know, why every time it shows warning in wordform.txt file
As the warning says, you have a 'wordform' with multiple words on the 'destiniation' side.
Don't do that.
Fix your wordforms file.
http://sphinxsearch.com/docs/current.html#conf-wordforms

Trying to figure out what {s: ;} tags mean and where they come from

I am working on migrating posts from the RightNow infrastructure to another service called ZenDesk. I noticed that whenever users added files or even URL links, when I pull the xml data from RightNow it gives me a lot of weird codes like this:
{s:3:""url"";s:45:""/files/56f5be6c1/MUG_presso.pdf"";s:4:""name"";s:27:""MUG presso.pdf"";s:4:""size"";s:5:""2.1MB"";}
It wasn't too hard to write something that parses them and makes normal urls and links, but I was just wondering if this is something specific to the RightNow service, or if it is a tag system that is used. I tried googling for this but am getting some weird results so, thought stack overflow might have someone who has run into this one.
So, anyone know what these {s ;} tags are called and if there are any particular tools to use to read them?
Any answers appreciated!
This resembles partial PHP serialized data, as returned by the serialize() call. It looks like someone may have turned each " into "", which could prevent it from parsing properly. If it's wrapped with text like this before the {s: section, it's almost definitely PHP.
a:6:{i:1;a:10:{s:
These letters/numbers mean things like "an array with six elements follows", "a string of length 20 follows", etc.
You can use any PHP instance with unserialize() to handle the data. If those double-quotes are indeed returned by the API, you might need to replace :"" and ""; with " before parsing.
Parsing modules exist for other languages like Python. You can find more information in this answer.