metadata

How can I find a Qt metaobject instance from a class name?

99封情书 提交于 2019-12-21 13:36:10
问题 Is there a way to find the QMetaObject instance of a class, given the class name? what I like to do is to load objects from disk, but for this to happen, I need a way to retrieve a QMetaObject instance using the name of a class, in order to use the QMetaObject to create an instance. 回答1: You should be able to do this with QMetaType. You might need Q_DECLARE_META_TYPE() and/or qRegisterMetaType() to make your types known. Then it should work roughly like in this example from the link: int id =

Accessing Greasemonkey metadata from within your script?

点点圈 提交于 2019-12-21 07:50:44
问题 Is there any way that my script can retrieve metadata values that are declared in its own header? I don't see anything promising in the API, except perhaps GM_getValue() . That would of course involve a special name syntax. I have tried, for example: GM_getValue("@name") . The motivation here is to avoid redundant specification. If GM metadata is not directly accessible, perhaps there's a way to read the body of the script itself. It's certainly in memory somewhere, and it wouldn't be too

R find time when a file was created

允我心安 提交于 2019-12-21 07:08:46
问题 I am using R function list.files to get a list of files in a folder. I would also like to record when each file was created, modified and accessed how can i do that? i tried google search, but didnt find any useful command Below screenshot is from my Windows machine. I get it when i right click a file name and click "properties" 回答1: Check out file.info() for this and other file properties: ## With a single path p <- R.home() file.info(p)$ctime # [1] "2014-11-20 08:15:53 PST" ## With a vector

What does “^:static” do in Clojure?

风流意气都作罢 提交于 2019-12-21 06:47:15
问题 I've seen the ^:static metadata on quite a few function in the Clojure core.clj source code, e.g. in the definition of seq? : (def ^{:arglists '([x]) :doc "Return true if x implements ISeq" :added "1.0" :static true} seq? (fn ^:static seq? [x] (instance? clojure.lang.ISeq x))) What precisely does this metadata do, and why it it used so frequently throughout core.clj ? 回答1: In the development of Clojure 1.3 Rich wanted to add the ability for functions to return types other than Object. This

Custom Spotlight Importer and Finder's Get Info “More Info” section

老子叫甜甜 提交于 2019-12-21 05:12:19
问题 I have written a Spotlight Importer for the custom document type my application defines. Everything is working fine, the metadata fields are correctly indexed by Spotlight (verified using mdls command), and a Spotlight search reveals my documents. The only problem I have is that items I specify in the <displayattrs> section of the schema.xml file aren't displayed in the "More Info" section when I ask for informations about a file (Cmd+I in the Finder). I expected these fields to appear there

How can I edit file metadata in OS X?

ⅰ亾dé卋堺 提交于 2019-12-21 04:27:24
问题 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). 回答1: 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

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

廉价感情. 提交于 2019-12-21 03:57:49
问题 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?

Where does windows explorer store file meta data?

大憨熊 提交于 2019-12-21 03:52:22
问题 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? 回答1: Starting with Windows Vista, metadata is now stored inside the file itself. 回答2: Windows stores this in COM Structured storage. The implementation is either in the file itself (Office docs support this, or any

Dynamics Crm: Get metadata for statuscode/statecode mapping

风格不统一 提交于 2019-12-21 03:48:27
问题 In Dynamics CRM 2011, on the Incident entity, the "Status Reason" optionset (aka statuscode) is related to the "Status" optionset (aka statecode) e.g. see this screenshot When I use the API to retrieve the Status Reason optionset, like so: RetrieveAttributeRequest attributeRequest = new RetrieveAttributeRequest { EntityLogicalName = "incident", LogicalName = "statuscode", RetrieveAsIfPublished = true }; RetrieveAttributeResponse attributeResponse = (RetrieveAttributeResponse)serv.Execute

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

≡放荡痞女 提交于 2019-12-21 03:45:11
问题 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