metadata

Sql Query to list all views in an SQL Server 2005 database

只谈情不闲聊 提交于 2019-12-03 14:20:53
问题 I need an sql query to enumerate all views (I only need the view names) of a specific database in SQL Server 2005. Thanks in advance! 回答1: To finish the set off (with what has already been suggested): SELECT * FROM sys.views This gives extra properties on each view, not available from sys.objects (which contains properties common to all types of object) or INFORMATION_SCHEMA.VIEWS. Though INFORMATION_SCHEMA approach does provide the view definition out-of-the-box. 回答2: SELECT SCHEMA_NAME

How to get the last modified date and time of a directory in java

别等时光非礼了梦想. 提交于 2019-12-03 14:04:38
See, the problem is that in Java, we can get lastmodified date by filename.lastModified() . But in Windows, what is happening is that whenever a file is modifed, only that file's date and time are getting modified, not the whole folder's. So I want to know when was the last time even one single file was modified in that folder, using Java? Find the latest (largest) lastModified() in the directory's files , or if there are none use the directory's itself: public static Date getLastModified(File directory) { File[] files = directory.listFiles(); if (files.length == 0) return new Date(directory

How can I edit file metadata in OS X?

半城伤御伤魂 提交于 2019-12-03 13:55:57
Does anyone know if it is possible to directly edit file metadata on OS X. Specifically in perl. The parameter I'm specifically trying to change is kMDItemFSLabel (The color of the file). I've had a search around and I can't seem to find a way to do this without using a module such as Mac::Glue or an external application (Finder). The kMDItemFSLabel attribute is a property of the Finder. You need to use a way to communicate with the Finder to change its data. As far as I know, there is no bit you can twiddle with Perl to change the Finder's data without going through the Finder. There are

Find out if user got permission to select/update/… a table/function/… in PostgreSQL

◇◆丶佛笑我妖孽 提交于 2019-12-03 13:19:19
问题 What is the recommended way to figure out if a user got a certain right (e.g. select or execute) on a certain class (e.g. table or function) in PostgreSQL? At the moment I got something like aclcontains( someColumnWithAclitemArray, makeaclitem(userOid,grantorOid,someRight,false)) but it's terrible since I have to check for every grantorOid that is possible and for every userOid the user can belong to. On a related note: what are the possible rights you can test for? I haven't found any

mutagen: how to detect and embed album art in mp3, flac and mp4

允我心安 提交于 2019-12-03 12:06:06
I'd like to be able to detect whether an audio file has embedded album art and, if not, add album art to that file. I'm using mutagen 1) Detecting album art. Is there a simpler method than this pseudo code: from mutagen import File audio = File('music.ext') test each of audio.pictures, audio['covr'] and audio['APIC:'] if doesn't raise an exception and isn't None, we found album art 2) I found this for embedding album art into an mp3 file: How do you embed album art into an MP3 using Python? How do I embed album art into other formats? EDIT: embed mp4 audio = MP4(filename) data = open(albumart,

Where does windows explorer store file meta data?

落爺英雄遲暮 提交于 2019-12-03 12:04:48
In Windows 7 I can add meta data to files for example title, rating and so on. Where is this meta data stored exactly? For NTFS they may use alternate data streams but I this meta data also happen to work in FAT32, so how ho they do it? Is there an API to make use of this feature? Starting with Windows Vista, metadata is now stored inside the file itself. Windows stores this in COM Structured storage . The implementation is either in the file itself (Office docs support this, or any file format that supports structured storage), or in NTFS itself. The API is available here: Structured Storage

Sqlite: adding comments to tables and columns?

我的未来我决定 提交于 2019-12-03 11:40:35
问题 In MySQL Workbench you can add comments to tables and columns in a MySQL database. Does Sqlite support adding comments to tables and columns? 回答1: I don't think it does. The "SQL As Understood By SQLite" page makes no mention of table or column comments nor does the CREATE TABLE or ALTER TABLE documentation. Also, the Unsupported SQL wiki page has this: 2009-08-04: Table and column comments - I have scoured the doco and can't find anything about applying comments to tables or their columns.

How can I edit an existing docker image metadata?

眉间皱痕 提交于 2019-12-03 11:21:43
问题 I would like to edit a docker images metadata for the following reasons: I don't like an image parents EXPOSE, VOLUME etc declaration (see #3465, Docker-Team did not want to provide a solution), so I'd like to "un-volume" or "un-expose" the image. I dont't like an image ContainerConfig (see docker inspect [image] ) cause it was generated from a running container using docker commit [container] Fix error durring docker build or docker run like: cannot mount volume over existing file, file

How to query the permissions on an Oracle directory?

試著忘記壹切 提交于 2019-12-03 11:17:00
I have a directory in all_directories, but I need to find out what permissions are associated with it, i.e. what has been granted on it? This should give you the roles, users and permissions granted on a directory: SELECT * FROM all_tab_privs WHERE table_name = 'your_directory'; --> needs to be upper case And yes, it IS in the all_TAB_privs view ;-) A better name for that view would be something like "ALL_OBJECT_PRIVS", since it also includes PL/SQL objects and their execute permissions as well. You can see all the privileges for all directories wit the following SELECT * from all_tab_privs

Can you control pinterest's “find image” results?

穿精又带淫゛_ 提交于 2019-12-03 11:04:18
Rather than add Pin It buttons through our site, I would like to simply control what images show up in Pinterest's "Find Image" results if a user decides to pin one of our URLs. As of now, "Find Images" allows the user to scroll through the images it finds on the page so they can select which image to pin. The "found" images start with the first jpg in the html file, I'm assuming (could that be a bad assumption??). On our site, this forces a user to scroll through about 15 navigation and promotion images before arriving at the featured product image. Is there any way to specify this image to