How can I edit these file contents? - file-extension

I am trying to edit some game files using Notepad ++ but the contents aren't showing up. The file extension is .pas, any ideas? Here is an image of the file.

Related

PDF Files created on Terminal

I created a pdf file on the Ubuntu's terminal and add plain text. When I use cat it shows the wrote text, no problem. But if I try to open the file with a pdf viewer it says that is corrupted and I can't see.
Why this happen?
There is a way of see the file out of the terminal?
I'm new at Linux.
Remember, the file contains only plain text, and I can normally see the content at the terminal.

How to convert vector image files to SVG with inkscape, when I don't know the extension

TL;DR: Is there a way to tell Inkscape on the command line, what the file extension is of the parameter --file=?
I have a case where I have to convert vector image files to SVG, using Inkscape command line tool. Current code is targeted at PDFs, so the following works fine:
inkscape --without-gui --file=source_file.pdf --export-plain-svg=result_file.svg
My problem is that I have to apply the same to new files, that are stored without extension, so my command would look like this:
inkscape --without-gui --file=some_stored_file --export-plain-svg=result_file.svg
When I run this command I get an error: "Specified document some_stored_file cannot be opened (does not exist or not a valid SVG file)"
I think this happens because the file doesn't have an extension and Inkscape can't guess the format.
What I can do is: get the format somewhere else, copy the stored file to a temp file with extension (some_temp_file.pdf) and then convert that to SVG, then remove the new temp file.
While this works fine, I would skip the otherwise unnecessary file copying just to have an extension.
Is there a way to tell Inkscape what the file extension is, other than having a file extension explicitely?
Well, I didn't found an answer to my question so what I did is symlinking the file (instead of copying), adding the extension on the symlink. Still better than copying the file and works fine.

Getting corrupted PDF file after reading and rewriting it to a new file

I am exploring PDF file format and trying to edit and manipulate its internal data. the problem is that I noticed I always get corrupted files after making any minor change to a file so I tried a very simple example to just read the pdf data and rewrite it to a new "file.pdf" without making any changes, as follows:
file = open('sample.pdf','r',encoding='ansi').read()
file_ = open('output.pdf','w').write(file)
but again I got a corrupted file (can't be opened using Adode reader) so I tried to open it using Google Chrome and it worked properly but with the font has changed to the default instead of the original font file.
I opened the input and output files and compared them using notebad++ and two files matched exactly!
I also opened the output file and copied its content and pasted it to the input file and surprisingly, it worked well, exactly as the input file.
Any ideas what is the problem?

Why png files doesn't paste correctly in android studio?

Why the file uva_icona isn't recognized as png file when I paste it in the res\drawable folder?
Perhaps I found the issue. I must paste png file in drawable directory but when it shows windows with destination folder I must erase .png extension from the file name as shown in the picture. Then files are properly paste and they shows correct image icon

Coredata: opening an xcdatamodeld file

I have a single xcdatamodeld file and would merely like to open this particular file with xcode. However, when I double click the file, it doesn't really show me anything or allow editing. The only way to do this is to run MyApp.xcodeproj and only then can I modify this file. Isn't there any way to edit the coredata file using only the xcdatamodel file? Thanks!
The xcdatamodeld file is not actually a file - it's a directory containing other model files.
Right click the file, choose Show Package Contents and you will get access to the files inside the directory. You can then double-click those files. When I do so I get just the Xcode model editor without the full Xcode project window.

Resources