A Different version of facility location problem - algorithm

I posted this question before but since Mathjax is not supported here, I took a picture of the compiled latex file and I am posting a picture of that.

Related

Where have SDL2 wiki examples gone?

In this video (https://www.youtube.com/watch?v=qPHKWsZK2Jc&list=PLvv0ScY6vfd-p1gSnbQhY7vMe2rng0IL0&index=10) from about a year ago, there is example code on the SDL_CreateWindow function documentation page. I have seen other posts talking about the SDL examples.
If you look at the documentation now it is the same minus the example code
https://wiki.libsdl.org/SDL2/SDL_CreateWindow
Am I blind or is there no longer any example code on the SDL2 wiki?
If not, does anybody know what the reasons for removing it are?
I expect that
There are some official examples somewhere
If they were removed from the official wiki they would at least be placed in a 'legacy' repo or something like that.
A Google (DuckDuckGo) search gives only third party examples and, aside from a few forum posts, no mention of there ever being any examples on the wiki.
In 2022, the Wiki migrated from MoinMoin to ghwikipp. With that came a host of breaks and bugs. Your issue specifically is covered under issue #233.
The images were also broken, but that issue shows a workaround for viewing the Wiki in working form: use archive.org on wiki.libsdl.org, not wiki.libsdl.org/SDL2 where it is currently hosted. This gives you your examples back.
e.g. like this
If you have some sort of MediaWiki viewer program, you can also just pull an old revision from the Repo and read it offline. Even Github's MarkDown viewer isn't terrible. Caveat that new changes won't be reflected.
They promise us that it will be fixed at some point, and they do seem to be working hard on it. The only hardfix is either to (a) wait, or (b) help them finish their migration.

com.lowagie.text.DocumentException: Font 'STSong-Light' with 'UniGB-UCS2-H' is not recognized

a maven project ,when i want to ctreate a pdf ,happened this:com.lowagie.text.DocumentException: Font 'STSong-Light' with 'UniGB-UCS2-H' is not recognized.
Please take a look at the following fragment of the free ebook The ABC of PDF with iText:
As you can see, I create a font 'STSong-Light' with 'UniGB-UCS2-H' as encoding, and I use it to write the Chinese title of the movie "House of The Flying Daggers". You can see that this works perfectly by looking at the screen shot of the PDF.
If it doesn't work for you, then this is what may have gone wrong:
You didn't read the documentation (or you wanted to wait until somebody copy/pasted a snapshot of the documentation) which explains why you didn't include the itext-asian.jar into your CLASSPATH. This jar can be found in the extrajars-2.3.zip
Or you did read the documentation, but you didn't include the correct itext-asian.jar into your CLASSPATH. I see that you are using my name in your code (I am the Lowagie from com.lowagie.text). This means that you are using a version of iText that has been removed from all official servers years ago. That version should no longer be used!
In short: you can solve your problem by upgrading to the latest iText version and making sure that you include the itext-asian.jar.
iTextSharp.text.io.StreamUtil.AddToResourceSearch(
System.Reflection.Assembly.Load("iTextAsian")
)

Generate code documentation to a MS Word file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I would like to generate code documentation (C#, .net4) to MS Word file (.doc, .docx). This is not because I think it is better, but because it is easier to version control when compared to a set of HTML docs.
I am looking into the possibility and practicality of this and weighing the options.
I see doxygen can produce RTF documents. There is nothing wrong with doxygen, I just want to know if there is anything else out there (paid or not) to make sure I have weighed a few different options.
Edit: Just in case it isn't clear, I would like to create documentation of the summery comments in my C# code. Visual Studio exports this to XML already. Tools like doxygen inspects the code files them self. I want to convert these comments to Word docs.
You can try our VSdocman. It can generate various formats, including RTF, of the summary XML comments.
The code documentation is XML, right? This fellow says that you can open an XML document in Word by choosing "open with transform" from the Open dialog box. Apparently that prompts to you provide information that is then used to generate an XSLT. It seems like you could use this as the basis for your own XSLT if you want to persist it?
This detailed article about XML comments in Visual Studio also suggests using XSLT to display the XML on a web page. So, you could just as well import that XML into your Word document
SoftArtisan's OfficeWriter can programmatically create .doc and .docx files via a .NET API. It's pretty rad, check it out.
DISCLAIMER: I'm one of the engineers who built the latest version.
I would like to generate code documentation (C#, .net4) to MS Word file (.doc, .docx). This is not because I think it is better, but because it is easier to version control when compared to a set of HTML docs.
You should generate the documentation in whatever format you think is most helpful for users of your software.
Your code is presumably in version control. You can generate the XML with the API help directly from the code, and you can generate the help file itself (with whatever tool, in whatever format) from this XML. These output files don't necessarily need to be in version control at all.

Ghostscript prints question mark when converting digitally signed PDF to image

Ghostscript 9.0 doesn't support validation of the digital signatures in PDF document when doing PDF to image conversion. Instead, there's a question mark on the digital signature, and Ghostscript reports "Sig is not yet implemented". I'm thinking to modify the source code to get rid of the question mark, but I don't have any ideas to where I should modify in thesource code. Could any one give the hints for that? Any response will be appreciated highly, thanks.
Have you already tested the very latest release (which is v9.02)? If so, have you also tested the current 'HEAD' revision of their source code?
If your problem persists with these versions, the preparatory thing to start with is to download the (current, which is v9.02) Ghostscript source code from here or even check it out from their Git repository.
What you are trying to do can only be located in one of the following two modules of the Ghostscript source code:
the (PDF) interpreter
the (image) output devices
So I would first recursively grep the sources for "not yet implemented" or similar expressions, taking into account that there may even be line breaks within the string. (***I doubt the quote you gave in your initial version of the question is accurate, because it contained at least one typo.)
If I didn't find anything in the first step, I'd get into touch with the Ghostscript developers themselves. They usually hang around in IRC on Freenode, channel #ghostscript. In general they are a very friendly and helpful bunch, and they'll surely be able to give you some hints about how to solve your problem if you know how to ask...

Good metadata image dump utilities?

I'm looking for the best tool out there to extract any and all metadata embedded within the most popular image file formats (JPEG and PNG specifically). I would like to know about whatever is in there (XMP, Exif, IPTC/IIM, etc.). Ideally I am looking for an all-in-one solution that I can run from a command line, but am interested to hear about any other tools in this area that are of value.
I have found the following, each with advantages/disadvantages:
ExifTool is good, but the output is a little more roughshod that I would like.
DumpImage from the Metadata Working Group has good formatting of the metadata it does find, but doesn't support PNG.
I have recently released Binspector, the tool I ended up writing to answer this question to my own satisfaction. The basic premise of the tool is that it takes a format grammar and uses it to analyze a binary file. As long as the format grammar and the binary file are well-formed, one can inspect and analyze innumerable binary files and formats.
Code is hosted on GitHub, and a blog for the tool is here. (The overview post for the tool is here.)
As you did not mention any preferred programming language I take PHP as an example.
There is an Exif Extension for PHP which can be used to easily retrieve Metadata from an Image.
http://www.php.net/manual/en/function.exif-read-data.php
You could easily create a script that you can call from the command line. I must add that the extension only seems to provide support for JPEG and TIFF images.
You could try the official ADOBE XMP SDK. It is available for download at :
http://www.adobe.com/devnet/xmp.html
This is the complete SDK to read/write/manipulate metadata across a variety of formats.
In the SDK package there is one particular sample that might be of interest to you. Go to the "samples" folder build the samples as per documentation (available in the package). Look for the sample exe "DumpFile". This dumps all the metadata in the file to the console.

Resources