EpubCheck troubleshooting; declaration errors - epub

I need some extra pairs of more experienced eyes on these declaration warnings:
and this code:
As you can see; despite what the declaration warnings may say, I indeed have declared the file in the OPF. The OPF is in its standard location inside the OEBPS folder. I have spent a good few hours trying to find what is wrong, and I still don't see why epubcheck isn't seeing the declaration.
Things that I've checked:
• The declaration is between the <manifest></manifest> tags.
• The path is correct. (Unless I'm missing something)
• I've tried to make sure that the mimetype file comes first in the zip.
Since I'm very new to creating epubs, I don't know if I'm missing something else entirely, like, there's something wrong with the code before the css declarations. Would you have any suggestions as to what I could check?

It turns out, there was a discrepancy between the spelling of the iexcercises folder and the declared iexercises folder. There was no 'C'.
Also, I found a very helpful comment on a forum site while I was troubleshooting the epub; it describes how to save the epubcheck errors and warnings log into a text file for easier browsing.
Source
Comment by bernieh2...#gmail.com, Nov 6, 2011 || My five cents for
non-techies...
For using epubcheck on a Windows PC, do the following:
(1) Download and unzip the latest epubcheck version wherever you
please on your computer (That is, rename the unzipped folder as you
like and put it on whatever directory you may deem it fit). For the
sake of this explanation, let's rename such unzipped folder as
"my_epubcheck" (w/o the "" characters).
(2) Open any ASCII text editor of your choice (e.g. notepad) and type
the following:
java -jar epubcheck-1.2.jar file.epub> report.txt 2>&1
pause
(3) Save this as an ASCII text file (name it, let's say,
"validate.bat" -- w/o the "" characters) on your my_epubcheck folder.
The only important thing is that the extension MUST be .bat
(4) To check any epub file, do the following:
Copy the file you intend to check to your my_epubcheck folder. Rename it as "file.epub" (w/o the "" characters).
Double-click on the validate.bat icon in your my_epubcheck folder.
A new (system) window will appear on your screen, epubcheck will start working and then pause with the message "press any key to
continue..."
Press any key.
Examine the contents of your my_epubcheck folder. You'll find a file named report.txt.
Double-click on the report.txt icon to see the results of your test.
IMPORTANT: Should you use a different epubcheck version, replace
epubcheck-1.2.jar on the validate.bat file with the exact name of the
.jar file you're using (find the name in your my_epubcheck folder).
Hope this helps,
Bernieh.
Again, I hope this helps someone!

Related

Erlang : exception error: no match of right hand side value {error,enoent} while reading a text file

I am currenly working on an erlang project and stuck in reading the file. I want to read a text file which is in the /src folder where all the erlang and a text file are in the same structure. Then too, I am not being able to read the file despite of specifying file paths. Any help would be appreciated.
start() ->
{ok,DataList} = file:consult("Calls.txt"),
io:format("** Calls to be made **"),
io:fwrite("~w~n",[DataList]).
The data file stores contents like : {john, [jill,joe,bob]}.
Try add folder name to the path or try set full patch to the file:
1> {ok,DataList} = file:consult("src/Calls.txt").
Notes: the error {error,enoent} mean that the file does not exist or you don't have a rights to read/write current file, for this case need set 777 rights or similar.
If you need to use src/call.txt, then this simply means that your IDE (or you) has created a src folder in which the calls.txt file has been placed. At the same time, the IDE is using a path that only includes the top level folder (i.e., the root folder for the IDE project). So src/call.txt must be used in that case. This isn’t a problem with Erlang, or even the IDE. It’s just the way your project is set up.
You can do either of two things. Move the calls.txt file up one level in the IDE file manager, so that it can be referenced as calls.txt, not src/call.txt. You can also just change the path to “calls.txt” before you run it from the command line.
enoent means "Error: No Entry/Entity". It means the file couldn't be found. When I try your code, it works correctly and outputs
[{john,[jill,joe,bob]}]

'C:\Program' is not recognized error

I set ANT_HOME=C:\Program Files\ant-1.8.0
then try to build local host by Weblogic. But, it gives me the following error:
C:\Program' is not recognized as an internal or external command.
I already tried putting quotes when defining the variable: "ANT_HOME=C:\Program Files\ant-1.8.0". but it is not working either, it shows the following error message:
Files\ant-1.8.0""=="" was unexpected at this time.
I have been stuck here for the past few weeks. Iv'e googled it many times but I still cant resolve the problem.
Edited:
dir c:\pro /x
didn't show the Progra~1 and Progra~2
set "var=content" is a good practice to avoid having unintended trailing spaces, but your error occures when using the value. There you need qoutes (that are not part of your variable content with the above syntax):
set "folder=c:\program Files"
dir %folder%
dir "%folder%"
the first dir will give you "file not found", because it tries to show you the contents of c:\program (which doesn't exist) plus the contents of files (which also doesn't exist). The second dir will show you successfully the contents of "c:\program files"
Even current versions of Windows automatically create a second file name which adheres to the old 8.3 naming scheme which has been there since DOS was invented. This name does not contain a space character which makes it a good candidate to be used in scenarios like that described by you.
Unless this has been explicitly disabled you can show the alternative filenames.
Open a dosbox and enter dir C:\pro* /x. The result will be similar to this:
I ran this on a German Windows 10 Pro but the output will be identical on other versions of Windows.
You can see that for C:\Program Files Windows created an alternative name C:\Progra~1.

Windows 7 - Add Path

I need to add a new path (sumatraPDF) on my PATH variable.
I don't know why it does not work...
I think everything is right but when I try to execute sumatrapdf.exe from CMD it cannot find the program.
This is what I did:
The path is correct, I checked it 1000 times.
The idea is use LaTeX with sublimetext and when I save a .text file sumatra has to open and show to me the result. If I want that I have to add the path of SumatraPDF... but it does not work.
I think you are editing something in the windows registry but that has no effect on the path.
Try this:
How to Add, Remove or Edit Environment variables in Windows 7
the variable of interest is the PATH
also you can type on the command line:
Set PATH=%PATH%;(your new path);
Another method that worked for me on Windows 7 that did not require administrative privileges:
Click on the Start menu, search for "environment," click "Edit environment variables for your account."
In the window that opens, select "PATH" under "User variables for username" and click the "Edit..." button. Add your new path to the end of the existing Path, separated by a semi-colon (%PATH%;C:\Python27;...;C:\NewPath). Click OK on all the windows, open a new CMD window, and test the new variable.
I founded the problem:
Just insert the folder without the executable file.
so Instead of:
C:\Program Files (x86)\SumatraPDF\SumatraPDF.exe
you have to write this:
C:\Program Files (x86)\SumatraPDF\
In answer to the OP:
The PATH environment variable specifies which folders Windows will search in, in order to find such files as executable programs or DLLs. To make your Windows installation find your program, you specify the folder that the program resides in, NOT the program file itself!
So, if you want Windows to look for executables (or other desired files) in the folder:
C:\PHP
because, for example, you want to install PHP manually, and choose that folder into which to install PHP, then you add the entry:
C:\PHP
to your PATH environment variable, NOT an entry such as "C:\PHP\php.exe".
Once you've added the folder entry to your PATH environment variable, Windows will search that folder, and will execute ANY named executable file you specify, if that file happens to reside in that folder, just the same as with all the other existing PATH entries.
Before editing your PATH variable, though, protect yourself against foul ups in advance. Copy the existing value of the PATH variable to a Notepad file, and save it as a backup. If you make a mistake editing PATH, you can simply revert to the previous version with ease if you take this step.
Once you've done that, append your desired path entries to the text (again, I suggest you do this in Notepad so you can see what you're doing - the Windows 7 text box is a pain to read if you have even slight vision impairment), then paste that text into the Windows text box, and click OK.
Your PATH environment variable is a text string, consisting of a list of folder paths, each entry separated by semicolons. An example has already been given by someone else above, such as:
C:\Program Files; C:\Winnt; C:\Winnt\System32
Your exact version may vary depending upon your system.
So, to add "C:\PHP" to the above, you change it to read as follows:
C:\Program Files; C:\Winnt; C:\Winnt\System32; C:\PHP
Then you copy & paste that text into the windows dialogue box, click OK, and you should now have a new PATH variable, ready to roll. If your changes don't take effect immediately, you can always restart the computer.
The path is a list of directories where the command prompt will look for executable files, if it can't find it in the current directory. The OP seems to be trying to add the actual executable, when it just needs to specify the path where the executable is.
Try this in cmd:
cd address_of_sumatrapdf.exe_file && sumatrapdf.exe
Where you should put the address of your .exe file instead of adress_of_sumatrapdf.exe_file.

Lua - My documents path and file creation date

I'm planning to do a program with Lua that will first of all read specific files
and get information from those files. So my first question is whats the "my documents" path name? I have searched a lot of places, but I'm unable to find anything. My second question is how can I use the first four letters of a file name to see which one is the newest made?
Finding the files in "my documents" then find the newest created file and read it.
The reading part shouldn't be a problem, but navigating to "my documents" and finding the newest created file in a folder.
For your first question, depends how robust you want your script to be. You could use Lua's builtin os.getenv() to get a variety of environment vars related to user, such as USERNAME, USERPROFILE, HOMEDRIVE, HOMEPATH. Example:
username = os.getenv('USERNAME')
dir = 'C:\\users\\' .. username .. '\\Documents'
For the second question, there is no builtin mechanism in Windows to have the file creation or modification timestamp as part of the filename. You could read the creation or modification timestamp, via a C extension you create or using an existing Lua library like lfs. Or you could read the contents of a folder and parse the filenames if they were named according to the pattern you mention. Again there is nothing built into Lua to do this, you would either use os.execute() or lfs or, again, your own C extension module, or combinations of these.

iOS App Contains Developer Path Information

Inspecting an archived app, I can see the full path listed for a few source code files in the app binary. Not all source code files are listed.
strings - the_binary_app | grep "\.m"
reveals
/Users/bbarnhart/myPath/myPath/App/path/path/SourceCodeFile.m
as well as a few others. I can not determine how the full paths for a few source code files are embedded in the app binary. I would like to remove them. Any ideas? Is this a build setting or is the project file slightly corrupted?
Some belong to a lib and others are files that belong to the project.
The __FILE__ macro expands to full path to the current file. This is one likely way you might be getting the paths into your executable. For example, the expansion of the assert macro includes the __FILE__ macro.
Look at the output of your strings | grep pipeline. For each of those files, go into your project in Xcode and open that file. Then go to the Related Files doodad and choose “Preprocess”:
Then search through the preprocessor output for the file's path. You will find lots of false positives, because there will be lots of # line number/path directives. You can ignore these, because they only produce debug output, which is not included in your executable file (unless you've done something weird with your build settings). You might find it faster to save the preprocessor output to a file, then open that file and pipe it through grep or use a regexp search/replace to delete all lines starting with #.
Find the other instances where your path appears as a string constant. For example, if you used the assert macro, you will find something like this:
(__builtin_expect(!(argc > 0), 0) ? __assert_rtn(__func__, "/Volumes/b/Users/mayoff/TestProjects/textViewChanged/textViewChanged/main.m", 16, "argc > 0") : (void)0);
That's a case where the path will end up embedded in your executable.
If that doesn't find all the places where you're embedding your path, try selecting “Assembly” from the Related Files doodad. The assembly will be full of comments containing your path; everything after # is a comment in the assembly output, so ignore those.
You will also see your paths in .file directives. I believe these only produce debug symbol output, which doesn't go into your executable, so you can ignore those too.
You will also see your paths in .asciz directives shortly after .section DWARF,... directives. This is more debug symbol stuff that you can ignore.
Look for the remaining cases where your path appears in the assembly output. You need to figure out how to eliminate these cases. How you do that will depend on the context in which the paths appear, so if you need more help, update your question with what you find.
Sounds like your code contains the __FILE__ macro somewhere.

Resources