metadata

What's the best strategy for get/setting metadata on Ruby methods at runtime?

I have a class with some methods. It's supersekret but I've reproduced what I can here. Class RayGun # flashes red light # requires confirmation # makes "zowowowowowow" sound def stun! # ... end # flashes blue light # does not require confirmation # makes "trrrtrtrtrrtrtrtrtrtrtr" sound def freeze! # ... end...

MS SQL: How to find out how many stored procedures?

How do you find out how many store procedures that you have in the database and is it a bad practice to have too many store procedure? how many are too many? ...

Getting Metadata / Schema information from Microsoft Analysis Services

I know you can get metadata and schema info from relational stores in Microsoft SQL Server 2005+ via: INFORMATION_SCHEMA Object Catalog Views What is the equivalent of this in Microsoft Analysis Services? ...

In SQLServer is there a DMV to get the dependencies of an object?

I'm looking for something that would get me the same information that is displayed when I select "View Dependencies" + "Objects on which [some_table] depends" ...

Best way for multiple anchor links to reference a single value that can be used in JavaScript

I have any number of anchor links on a page that need to execute the same block of JavaScript code on click, and that code needs to be associated with one value. There are several of these on each page. I usually use a hidden input to store the value in a one-to-one relationship, but what is the best way to associate several links placed...

How to programmatically find a many to many relation in an SQL Server 2005 database

I can find a direct table foreign key in c# like: foreach (ForeignKey key in CurrentTable.ForeignKeys) { Console.WriteLine("FK:" + key.ReferencedTable); } The classic representation for a many to many relationship is achieved via an intermediate table that has a one to many relation to the two principa...

What is a simple way to generate keywords from a text?

I suppose I could take a text and remove high frequency English words from it. By keywords, I mean that I want to extract words that are most the characterizing of the content of the text (tags ) . It doesn't have to be perfect, a good approximation is perfect for my needs. Has anyone done anything like that? Do you known a Perl or Pyt...

reading/writing xmp metadatas on pdf files through pypdf

I can read xmp metadatas through pyPdf with this code: a = pyPdf.PdfFileReader(open(self.fileName)) b = a.getXmpMetadata() c = b.pdf_keywords but: is this the best way? And if I don't use the pdf_keywords property? And is there any way to set these metadatas with pyPdf? ...

How to retrieve metadata for return values of an sql server stored procedure

I want to analyze an SQL Server stored procedure from .NET code to retrieve metadata for the data/columns it returns (not OUTPUT parameters). Like when you drag/drop a sp on a DataSet i VisualStudio and it automatically generates columns. It could be useful for me for some code generation I'm testing out. The procedures contains simple...

Methods for storing metadata associated with individual files?

Given a collection of files which will have associated metadata, what are the recommended methods for storing this metadata? Some files formats support storing metadata internally (EXIF,ID3,etc), but not all file formats support this, so what are more general options? Some of the metadata would almost certainly be unique (titles/descri...

Analyzing, categorizing and indexing metadata

I have a large (~2.5M records) data base of image metadata. Each record represents an image and has a unique ID, a description field, a comma-separated list of keywords (say 20-30 keywords per image), and some other fields. There's no real database schema, and I have no way of knowing which keywords exists in the database without iterati...

How to include metadata in a template file?

I have a system that filters template files through erb. Using convention over configuration, the output files get created in a file hierarchy that mirrors the input files. Many of the files have the same names, and I was able to use the directories to differentiate them. That plan worked until I needed to associate additional info wi...

How can I change order of the displayed columns in Dynamic Data ?

Hi, For some of my Dynamic Data meta data tables I would like to control the order of the displayed columns. I have a custom page and I created a sub-directory named the same as my table. I copied the ListDetails.aspx and code file to the new directory. And changed AutoGenerateColumns to false(in Gridview) and AutoGenerateRows to fals...

Check if a column is auto incremented in Sybase with JDBC

To check if a column is auto incremented i can do the following Connection con = ... DatabaseMetaData meta = con.getMetaData(); ResultSet metaCols = meta.getColumns(catalog, schema, table, "%"); while ( metaCols.next() ) String value = rs.getString("IS_AUTOINCREMENT") ... works fine except with Sybase databases. I've...

How do I know if CONSTRAINT_NAME is a Primary or Foreign Key?

Using this SQL on SQL Server 2005 SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME = @TableName AND COLUMN_NAME=@ColumnName I get the Primary Keys AND the Foreign Keys. How can I get only Foreign Keys? How can I see if a Constraint is a Primary or a Foreign Key? Thanks ...

What's the best library for manipulating JPEG metadata?

I'm after a library that can read and write JPEG image metadata. For example if I wanted to embed and read back a short description or story relating to the jpeg image, in the image file itself, what development library/s would you recommend? I'm not too fussed about what language (it's a new project), though I've tagged this question f...

Programmatically extracting relationships between tables in an RDBMS w/out foreign keys?

I'm reverse engineering the relationships between a medium-sized number of tables (50+) in an Oracle database where there are no foreign keys defined between the tables. I can count (somewhat) on being able to match column names across tables. For example, column name "SomeDescriptiveName" is probably the same across the set of tables....

Microsoft SQL Server - Who created a Stored Procedure?

Is there a good way to tell who created a stored procedure in SQL Server 2005 (that also works in 2008)? In SQL Management Studio I can right mouse/properties on a proc to get the created date/time but how do I discover the creator? ...

Add metadata to an XSD definition

Hi. Not all that familiar with XSD, I wonder if it is possible to do the following: <xs:group name="SomeGroup"> <xs:sequence> <xs:element name="Groupingcode" type="OurType" origin="DB" /> <xs:element name="Description" type="StringType" origin="XML" /> To explain: I have an XSD schema file. I need to generate an X...

Make svcutil pick up documentation from C# files?

Folks, I'm creating a new WCF Service and started with my Service interface. Looks something like: public interface ISomethingService { /// <summary> /// some description /// </summary> /// <version>2.13.0</version> /// <copyright>2009 by myself</copyright> /// <author>Marc Scheune...