Windows .url links that point to same address when copied over or deleted - url

This is really annoying, we've switched our client downloads page to a different site and want to send a link out with our installer. When the link is created and overwrites the existing file, the metadata in windows XP still points to the same place even though the contents of the .url shows the correct address. I can change that URL property to google.com and it points to the same place when I copy over the file.
[InternetShortcut]
URL=https://www.xxxx.com/?goto=clientlogon.php
IDList=
HotKey=0
It works if we rename our link .url file. But we expect that the directory will be reused and that would result in one bad link and one good link which is more confusing than it is cool.

Take a look at here: http://www.cyanwerks.com/file-format-url.html
It explains there's a Modified field you can add to the .url file. It also explains how to interpret it.

.URL files are wierd (are they documented anywhere?)
Mine look like this and I don't seem to have that problem (maybe because of the Modified entry?)
[DEFAULT]
BASEURL=http://www.xxxx.com/Help
[InternetShortcut]
URL=http://www.xxxx.com/Help
Modified=60D0EDADF1CAC5014B

Related

QnA Maker Manage knowledge - Problem Adding new URL

I have problems adding a new URL when I manage knowledge base in QnAMaker.
I've tried adding this Url but I get the error:
Failed to extract QnAs from the source "URL" - Unsupported / Invalid url(s). Failed to extract Q&A from the source.
I've tested deleting the footer, publishing the page and in this case the URL works properly.
Also, I tested other very similar URLs, like this one and this has been parsed successfully.
What could be the problem?
It would appear that something with the way the questions are encoded on that page is preventing QnAMaker's services from reading the text of the question/answer pairs. In order to get those questions, I was able to copy paste the whole list:
I put them all into a word doc (or equivalent program), and then saved it as a PDF:
Then uploaded this to QnA Maker, where it was able to read the question/answer pairs just fine.
The reason I used a PDF as opposed to a .txt file is so the alternate characters (the Spanish ? for example) would render as well as the bullets from the final question that caused so much grief for the initial renderer.
After left feedback in azure site, QnA Maker Team fixed it. Now, the url is parsed properly.

Stardog: Location of stardog.properties file

This must be a stupid question, because no one else has posted it and the explanation in stardog is very simple. It says 'Stardog Server’s behavior can also be configured via a stardog.properties—which is a Java Properties file—file in STARDOG_HOME.'
I am looking for the stardog.properties file. It is not in the folder I specified STARDOG_HOME to be. In fact, it is not anywhere. I have done a search of the entire computer.
What is going on?
*This question was answered below.
There is no default stardog.properties file which is why you cannot find it. You can create the file yourself in the STARDOG_HOME folder. You can find an example configuration file in the stardog-examples repo.

Delphi: Set Browsers Homepage

I want my application to be able to set IE, Firefox, Chrome & Operas homepages when a button is pressed. I understand IEs homepage is set in the registry, which I understand how to change, but can anyone give me any help with the others? Thanks
Chrome stores the homepage in a file called 'Preferences'. On Windows XP, this is located at;
C:\Documents and Settings\USERNAME\Local Settings\Application
Data\Google\Chrome\User Data\Default
On Vista+, it's located at;
C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default
This file is JSON format, and so it can be opened and viewed as plain text. In order to change the homepage, you'd need to load the JSON from this file, and change the homepage field value. You may also need to change the homepage_changed field value in order for it to stick. Using something like SuperObject to change the field would be an easy solution (if I get time, I'll write up some example code later).
Firefox uses a pref.js file to store it's settings, and realistically, a way of changing this would be to load this file, find the something that's along the lines of;
user_pref("browser.startup.homepage", "[URL]");
...and edit it as appropriate before saving the file. This should be a simple task using some simple find-and-replace code. I'd strongly advise that you use a pos() function though, as it could be that the end-user has already got their own custom homepage set and so searching for a preset string (e.g. [URL]) may not work, and certainly wouldn't be reliable.
A quick search hasn't given me enough information about Opera to provide a solution, but I'll keep looking and respond if I do find such a way.
Note that none of these methods have been tested and are merely provided based upon some very quick research.

Making a .dmg available for download from a website

Good day lovely computer peoples!
I've uploaded a .dmg file to my server, but when I test to see if it is downloadable by pointing the web browser to it's place in the directory (i.e. using it's URL) I get a 404.
Any possible ideas of why this could be happening?
Thanks
EDIT 1
I realize that the 404 means that it can't find the item, but I'm staring at both addresses (the one in the browser and the one in the FTP client that I use) and they seem identical. I have some underscores in the name of the .dmg. Could that be the problem?
You need to make sure you add a mime type for the file extension. Most servers now days do not allow access to files that don't have explicit file extension declarations in their list of mime types.
You didn't say what server you're using so I can't give you specific instructions on how to do it but in most servers it's fairly easy. Just google your webserver name and "add mime type" with the quotes.
The myfile.dmg is not found. Double check the file location and the URL you are pointing to.

RoR: Inspecting an Uploaded File

I need to inspect the bits of an uploaded file before it's ever saved off to the file system. PHP's documentation has a nice page that tells me exactly what properties are available for me to use (http://us3.php.net/manual/en/features.file-upload.post-method.php), but I can't find something similar for Ruby and/or Rails.
I've also tried logging a JSON-formatted string of the upload, but that just gives me a redundant UTF-8 error. I can't think of anything else to try.
Can anyone offer any insight or point me to the right place?
Thanks.
UPDATE: I'm running Apache 2.2.11 on OS X (Leopard) in case Peter is right (see below).
UPDATE: In case it helps, my input parameter is logged as "upload"=>#<File:/tmp/RackMultipart.64239.1>. I'm just not sure how to access it to get to its "parts".
As far as I've been able to tell or find, there is no physical file until an upload is read. This is inline with derfred's reply. The only metadata that can be accessed is:
uploaded_file.content_type # the uploaded file's MIME type
uploaded_file.original_path # which is really just the name of the file
Additionally, there's a read method on the uploaded_file that allows the file' content to be accessed and, presumably, written to the permanent file system.
Something else that I've noticed is that the only means Ruby offers to inspect the MIME type of a file is in this content_type property of an uploaded file. Once the file is on the file system, there's no longer any way of accessing or determining the MIME type.
I think this depends on the web server you're using. I remember having different fields for mongrel, apache and nginx.
AFAIK Rails and the various app servers totally abstract the upload part. However here is a thorough discussion of the topic:
http://www.jedi.be/blog/2009/04/10/rails-and-large-large-file-uploads-looking-at-the-alternatives/
This is just a File object, something that you can duplicate by going:
File.open("some_file")
The /tmp/RackMultipart.64239.1 is just a filename.
If you want to see/output its contents from the controller:
puts params[:upload].read

Resources