30 minutes ago I pushed an HTML file (of Unicode categories). Half an hour later the corresponding address on the site still gives a 404. (A green checkmark here indicates that 25 minutes ago "GitHub Pages successfully built your site." The deployment activity log agrees it was deployed.)
It turns out that the HTML file was deployed without the .html extension. Which is very strange, because markdown files on the same site (example) are deployed with an .html extension.
Why is this happening? Is there something wrong with my _config.yml?
Edit: OMFG, I uploaded a modified Unicode character table and this one requires the html extension - without .html it's 404! So now, the original file works with or without .html, but the new file requires .html. I guess GH pages is just... glitchy.
Related
I've tried loading a local html file using webkit_web_view_load_uri() with a file:// URL. However, the webview would display a blank page. To circumvent this, I tried using webkit_web_view_load_html() and it worked correctly.
Now that I'm trying to load some images in the html using the <img> tag, the images aren't loaded (It displays a blank page).
I'm puzzled because I tried before (~ 2 months ago) a similar method and it worked.
Note: I copied the contents of the generated HTML into a file and loaded it with Firefox and it worked as it should (The images are visible), but with another WebKitGtk application I had lying around the images didn't load.
Note: I'm using C++ as the main programming language (I'd prefer having C++ types in the solutions only if possible)
Note: I have set webkit_settings_set_allow_file_access_from_file_urls() and webkit_settings_set_allow_universal_access_from_file_urls() to TRUE
Ok, I've managed to solve this. The solution had NOTHING to do with webkitgtk, which is strange. It seems that the application was trying to download the page instead of loading it. This traces to a faulty MIME type database.
Tl;Dr:
Execute this:
rm ~/.local/share/mime/packages/user-extension-html.xml
update-mime-database ~/.local/share/mime
and use webkit_web_view_load_uri() instead of webkit_web_view_load_html() with a file:// URI
I had the same problem in C. You have to explicitly set file:// as base_uri when you call webkit_web_view_load_html().
See also answer here
This works in my C# .NET Web form. It is a simple link to a .pdf file and it either opens it or prompts for location to download it. I have about 8 of this links for various documents. This has been working for years.
Evaluation Procedure for New and Renewal Courses
But in my new .NET Core 2.2 Razor Pages application I am migrating the application to I can't figure out how to make this simple link. No matter how I make the link I get this error:
This localhost page can’t be found No webpage was found for the web address: http://localhost:xxxx/docs/evaluationprocedure.pdf
The pdf is in "Pages/docs/" folder.
I have tried:
Evaluation Procedure for New and Renewal courses
"./docs/evaluationprocedure.pdf"
"~/docs/evaluationprocedure.pdf"
"Pages/docs/evaluationprocedure.pdf"
"~Pages/docs/evaluationprocedure.pdf"
"../docs/evaluationprocedure.pdf"
I have searched pretty extensively and I seem to get mostly answers to the desire to stream a file or dynamically create the file at runtime.
So, right before I went to bed I tried googling the answer again and found this link over on the right that had no accepted answers (it had a zero in the green area in front of the Title/Link.
But I looked and there was an answer with 3 votes but no checkbox! My problem was that only the wwwwroot folder allows static file downloads. But the answer showed how to add code to the configuration in Startup.cs to allow downloads from a new custom folder of one's choosing.
Add a PDF link in a .NET Core project
So I got this link in the wwwroot folder to work:
<a href='#Url.Content("~/evaluationprocedure.pdf")'>Evaluation Procedure for New and Renewal courses</a>
I just copied the file over to wwwroot for initial test.
Now to use the rest of the answer to allow my docs folder to hold static files.
I have an analysis project that is requiring me to extract the 'current state' of a PDF that houses our report that is sent out 4 times daily. I have the code written to scrape my PDF but I need to figure out how to extract the PDF from the email so I can step through it with my code.
I tried using the code below
import win32com.client
import os
location = r'C:\Users\myusername\OneDrive - companyinfo\Department Projects\TestEmails'
files = [f for f in os.listdir(location)]
print(files)
for file in files:
if file.endswith('.msg'):
outlook = win32com.client.Dispatch("Outlook.Application").GetNamespace("MAPI")
msg = outlook.OpenSharedItem(file)
att = msg.Attachments
for i in att:
i.SaveAsFil`e(os.path.join(r'C:\Users\username\OneDrive - companyname\Department Projects\TestPDF', i.FileName))
The error it produces is:
pywintypes.com_error: (-2147352567, 'Exception occurred.', (4096, u'Microsoft Outlook', u"We can't open 'Stats Report.msg'. It's possible the file is already open, or you don't have permission to open it.\n\nTo check your permissions, right-click the file folder, then click Properties.", None, 0, -2147287038), None)
I am only currently testing with one saved test.msg file but I have over 1400 I need to parse through. Maybe this isn't the best technique as I know VBA could do something similar within outlook, but I don't have much skills in the VBA region.
I have outlook 2016 installed on Windows 7 computer running python 2.7. Is this error something easy to fix? Is there a better technique to take an attached PDF and save it to a folder so my other program can grab the necessary data?
Desired output: PDF Attachment is Extracted and Saved into a separate folder.
Thank you for your help and expertise,
Andy
So I figured out the answer and how simple and stupid it was makes me unreasonably frustrated.....
My working directory was wrong even though I grabbed the file, the file name was the only item created.
I created a true_location variable that gave it the true full working directory and it worked like a charm.
true_location = location + '\\' + file
Enter that in the for loop under the if clause and it works like a charm.
Best,
Andy
I'm thinking this might have something to do with a template, but it's really weird.
I started off with a .doc file and a .docx file that I had previously edited, combined them, and saved the result as a .docx file. Both files were originally created as templates by someone else long ago. Within a few minutes, the fonts and spacing of everything in the document have been changed, making a total mess out of my document. I also noticed something in the lower left corner referencing "contacting" a template. I never noticed this before with these templates.
What a mess. How can I make it stop doing this? If I take the time to reformat everything the way I want it again, I don't want it to revert back the next time my back is turned.
Thanks,
Rebeccah
Ah. I got it figured out. One of the component documents, and the merged document, had a template attached to it that was stored on a server. The template file on the server doesn't exist any more - someone must have recently deleted it. The reformatting apparently reflects Word automatically changing the template to normal.dot.
If I catch it in time, before the changes are made, I can save the file as a .dot or .dotx (template) file, and then attach that local template file to future documents so they don't have to rely on the template that is no longer on the server.
How I figured this out:
Google found an answer to a question about disabling a long wait for a linked file that no longer existed, leading me to File | Options | Advanced | General - uncheck "Update automatic links at open." That didn't undo the reformatting that had already happened, but may have prevented reformatting of the component document the next time I opened it.
The same answer pointed me to the right side of the File page, where various file properties are displayed. When I click on "Show All Properties", I can see the file name of the Template file, as the eighth property displayed.
General googling about Word templates led me to File | Options | Customize Ribbon | Customize the Ribbon, where I checked the previously empty box next to "Developer". Now, Developer | Document Template allows me to see and change the location of the document template.
I opened a previous version of one of the component files (the .doc file), the one that had the template from the server attached to it, and watched Word search for the template. But it did not reformat it the file. I saved the file as .dot, as .dotx with compatibility, and as .dotx - just to be sure I had all necessary options available.
I opened my reformatted composite file, went to Developer | Document Template, and specified my recently saved .dotx file as the template, made sure that "Automatically update document styles" was checked, and clicked OK.
Voila! I have my previous formatting back.
Rebeccah
I put yaml file on GitHub Pages, but I don't find that yaml file. I'll change file's extension (to txt), and I want to know what kind of files I can use? Any white list or document exist?
This is my trial and errors.
OK
txt - http://tachikoma.io/i18n-step.txt
html - http://tachikoma.io/index.html
js - http://tachikoma.io/js/init.js
css - http://tachikoma.io/css/prism.css
json - http://tachikoma.io/locales/en/translation.json
NG(404)
yml - http://tachikoma.io/example/bundler/.tachikoma.yml
pot - http://tachikoma.io/_build/translation.pot
repository: https://github.com/tachikomaio/maguro.tachikoma.io
Edited: 2014-11-12
GitHub pages does not show a file which name starts with period e.g. .example.yml.
This is due to the fact that GH pages tries to manage your site as a Jekyll site. Then ignoring some file name patterns.
If you want all your files to be copied just add an empty file named .nojekyll at the root of your site.