What is this file MIMEType - mime-types

I'm trying to determine the MIMEType, extension and software to use for reading a file.
It seems to me that it's a Microsoft Synchronization file, but I can't figure out exactly.
The file contains binary data with a .txt extension. What is remarkable about it are the following plain text elements at the begining of the file :
SDataSetSurrogate, Version=1.0.1.0, Culture=neutral, PublicKeyToken=4fbddf16e3a769ae
...
QSystem.Data, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
....
Nmscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Is it enough to identify it ?

Each line looks like CLI name library/resource for CLI assemblies:
http://en.wikipedia.org/wiki/Assembly_(CLI)#Satellite_assemblies
But I cannot figure out a direct MIME-Type (per line).

Related

wpf localization - locbaml - file is being used by another process

I have been looking hours for a solution, but I donĀ“t find it.
I want to generate a satellite assembly with following command.
locbaml.exe /generate de/App.UI.resources.dll /trans:MeineRess_de.csv /out:de /cul:de
After executing I get following error:
The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)
Can anybody help me, Thx
Output to a separate folder try for example c:\ this would work
locbaml.exe /generate de/App.UI.resources.dll /trans:MeineRess_de.csv /out:c:\ /cul:de
For posterity:
The file name without any command line flag is the original input assembly. So you're reading in de/App.UI.resources.dll and then /out:de is trying to write to the same file in the same folder.
Probably you want to change de/App.UI.resources.dll to [UiCulture]/App.UI.resources.dll where [UiCulture] is the <UICulture> from your project file, which should match the NeutralResourcesLanguage attribute in your assembly (AssemblyInfo.cs normally).
Perhaps you legitimately want to overwrite the original DLL (though I don't think that makes sense), but this will not be possible as-is because locbaml will load the assembly from file, which holds the file handle open until the application exits. (Technically until the AppDomain is destroyed.)

How to specify a directory for scons to store all the .o(intermediate) files?

How to specify a directory for scons to store all the .o(intermediate) files?
My question is: what's the way to set something like a global flag, so that each 'Object' command will generate .o files in a solid directory, and 'Program' command will generate in some other directory? I don't wish to have some variables so that each 'Object' and 'Program' command will explicitly use this variable: it's ugly and coupled. I just wish to have something like a compile hook.
For example, I've got a testSystem.cpp, and in SConstruct I have:
Program('testSystem.cpp')
Then scons will first compile a testSystem.o file, and link to a testSystem executible.
I know I can explicitly specify where where the binary file is stored:
Program('bin/testSystem','testSystem.cpp')
Well, the object file is still under current directory. I can do this:
testSystem_obj=Object('obj/testSystem.o','testSystem.cpp')
Program('bin/testSystem',testSystem_obj)
Now I have .o under ./obj and executible under ./bin. No problem.
But, this means for each file, I've to manually write 2 lines, 1 line to tell scons to generate the object file under ./obj, another line to generate the file under ./bin. If I wish to reorganize my whole project, I've to modify all my SConstruct/SConscript files. I've got a big project and don't want to do this.
Any hints? How to do this with scons?
Sort of.
SCons supports VariantDir's which allow separating the source from the build product.
Take a look at:
http://scons.org/doc/production/HTML/scons-user/ch15.html

Decompressing Snappy Files Missing Stream Identifier Chunk and CRC-32C Checksum

The iWork 2013 file format includes .iwa (iWork Archive) files stored within a .zip file. "IWA files are stored in Snappy's framing format, though they do not adhere rigorously to the spec. In particular, they do not include the required Stream Identifier chunk, and compressed chunks do not include a CRC-32C checksum." https://github.com/obriensp/iWorkFileFormat/blob/master/Docs/index.md#iwa
Is there an implementation of Snappy that can decompress files missing these components? If so, is there example code?
Examples of iWork files may be found at the bottom of this page: http://fileformats.archiveteam.org/wiki/IWA. For instance, unzipping file TestReport.pages.zip shows that it contains Index.zip, which contains .iwa files.
I tried decompressing the .iwa files using the Snappy for Windows command line tool here: http://snappy.angeloflogic.com/downloads/ . However, I received the error: "Found invalid data while decoding."
I do not yet have sample code because I do not know which implementation of Snappy I should base my code on.

How can I fix my invalid resx file input?

I added several existing files (from a VS 2008 Windows CE project) to a VS 2008 Winforms project. For many (but not all) of the forms, I get this err re: the *.resx files:
Invalid Resx file. ResX input is not valid. Cannot find valid "resheader" tags for the ResX reader and writer type names.
The *.resx files that are fine display like so when I 2-click them in the Solution Explorer:
...whereas those that won't compile with the err msg above display one thing if I 2-click the *.resx file in the Solution Explorer, to wit:
...but the error-invoking *.resx files show their code if I 2-click the line in the Error List, like so:
. . .
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
. . .
Note: The solution here C# resx file error: doesn't seem to apply to my situation, as the out-of-kilter / off-the-rails files already have this format:
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
Why are some resx files fine while the others prevent compilation? How can I massage/tweak them to get past the compile gauntlet?
I'm a little surprised that you can have the $ sign in the resource name.

Is there a MIME type for C# (.cs) files?

Standard UNIX tools (file command) return text/x-c++. This is not the greatest result possible.
On Windows urlmon.dll/FindMimeFromData returns text/plain. Looks like Windows never got any decent file type recognition library.
Is there something more precise than text/plain?
I was looking for the same thing on Ubuntu 20.04 - open .CS files in Code and other text files in the default editor.
I copied the line form the /usr/share/applications/defaults.list
text/plain=org.gnome.gedit.desktop
and added the .cs extension like so
text/plain.cs=code
Now my CS files open in VS Code and all other plain text files open in the default editor

Resources