file-extension

What are the .db-shm and .db-wal extensions in Sqlite databases?

时间秒杀一切 提交于 2019-12-17 17:54:20
问题 I am seeing some strange behavior with my application and the state of its database file after running some tests that close the database, delete it, and replace it with a test fixture. When I examine the database file with a tool on my debugging PC, it doesn't match what the application itself seems to be reporting. It's possible that this strange behavior is related to this bug. I noticed that there are two files with the same base name as the database (with the normal .db extension.) The

PHP: Get file extension not working on uploads to S3

房东的猫 提交于 2019-12-17 16:46:12
问题 I am using the Amazon S3 API to upload files and I am changing the name of the file each time I upload. So for example: Dog.png > 3Sf5f.png Now I got the random part working as such: function rand_string( $length ) { $chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; $size = strlen( $chars ); for( $i = 0; $i < $length; $i++ ) { $str .= $chars[ rand( 0, $size - 1 ) ]; } return $str; } So I set the random_string to the name parameter as such: $params->key = rand_string(5

complete list of mime-type <-> file extension mapping

痴心易碎 提交于 2019-12-17 12:51:39
问题 I can't find a complete list of mime-type mappings on the internet. I would like to have a list that refers a file extension to every existing mime type. The list of all mime-types can be found here: http://www.iana.org/assignments/media-types but that resource doesn't include the file extension mapping. I googled a while and couldn't find a mapping list with all mime-types. Only lists with most common ones. In all lists I found for example this entry is missing: application/vnd

Codeigniter multiple file upload messes file extension

独自空忆成欢 提交于 2019-12-17 07:13:02
问题 I am trying to get a multiple upload library working for my Codeigniter based website. I have it working almost but I have a slight problem if I upload more than one image, the file extentions get screwed up; for example, if I upload three JPEGS, I get this in my uploads folder, image1.jpg image2.jpg.jpg image3.jpg.jpg.jpg I cannot see what is causing it, this is the library in question and I am pretty sure that it is in there that the problem is, <?php if ( ! defined('BASEPATH')) exit('No

How come some site urls do not include a file extension?

折月煮酒 提交于 2019-12-17 06:08:13
问题 I was browsing the internet and noticed, YouTube, for example, contains a URL like this to denote a video page: http://www.youtube.com/watch?v=gwS1tGLB0vc . My site uses a URL like this for a topic page: http://www.example.com/page.php?topic_id=6f3246d0sdf42c2jb67abba60ce33d5cc . The difference is, if you haven't already noticed that on youtube, there is no file extension for their watch page, so I am wondering, why do some sites not use file extensions and what use does it serve? 回答1: File

ASP.NET Webforms routing with extension

[亡魂溺海] 提交于 2019-12-13 16:45:21
问题 I have a simple ASP.NET Webapplication project with url-routing and want to "allow" routes with the fileextension like ".html", e.g... http://www.mywebsite.com/cms/test.html http://www.mywebsite.com/cms/sub/test.html http://www.mywebsite.com/cms/sub/sub/test.html My global.asax routes looks like this: routes.MapPageRoute("", "cms/{a1}", "~/default.aspx"); The route is matched with when i access the website like this: http://www.mywebsite.com/cms/test If i try this one, it doens't work too:

Custom php extension not being parsed

蹲街弑〆低调 提交于 2019-12-13 06:34:27
问题 I wanted to change the .php extension to .foo, to hide it for visitors. My webserver has cPanel installed, so I logged in and clicked on "MIME Types", and entered the following: MIME Type: application/x-httpd-php Extension: foo The problem is that it's not being parsed as PHP, but instead is downloaded (when you click the link, a file containing all the code of that file is being downloaded) How would I solve this? 回答1: Add in httpd.conf or vhost.conf <IfModule mime_module> AddType

File extension for tab-delimited values that can be opened by Excel?

谁都会走 提交于 2019-12-13 04:25:54
问题 I'm outputting a tab-delimited file from my webapp that should be opened in Excel. The problem is that .xls seems not good for opening and editing it, then Excel required some other format, and if I change the extension to .tsv then the file becomes unknown for Excel (on Windows 7) and .csv is for comma-separated. Can you advice me which the file extension should be? This is the code that outputs the file and it works. It's just that I should choose the most suitable extension for tab

How to associate a file type with a (my) Java application on OSX?

狂风中的少年 提交于 2019-12-13 00:41:19
问题 I want to be able to double click on textfile.myext and have my java program open and handle the file. How should I go about making my program accept files that are set as default to open in said program? What are the steps and what is passed to the program after something is set as default? 回答1: Deploy the app. using Java Web Start, which provides.. ..splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates),

Opening a file in my application from File Explorer

走远了吗. 提交于 2019-12-12 10:59:13
问题 I've created my own application in VB.NET that saves its documents into a file with it's own custom extension (.eds). Assuming that I've properly associated the file extension with my application, how do I actually handle the processing of the selected file within my application when I double click on the file in File Explorer? Do I grab an argsc/argsv variable in my Application.Load() method or is it something else? 回答1: Try this article but short answer is My.Application.CommandLineArgs 来源: