metadata

Develop and run MSTest unit tests in Visual Studio 2010 without including .vsmdi and .testsettings

半世苍凉 提交于 2019-12-03 10:37:17
问题 I know this is somehow possible, as we have a project that contains MSTest unit tests that are runnable via the VS2010 test runner. We can even add new test methods or classes to the existing projects, and the runner will pick them up and include them in the test run. The problem comes when I try to add a new unit test project to the solution. If I add a project of the type "test project" to the solution, VS2010 will generate the test metadata and settings files that were not needed for

What is the origin of __author__?

浪子不回头ぞ 提交于 2019-12-03 10:31:33
Where does the convention of using private metadata variables like __author__ within a module come from? This Python mailinglist thread seems to hint at some discussion about it in 2001, but by the sound of it the convention was already out in the wild. Other than that, I can only find this PEP on package metadata , which seems influential but tangental at best. I'd like to try and find some explicit material on the subject so my documentation tool can parse these metadata variables successfully. My guess is, it's from the old times when packaging meta data was not common then. In PEP 8 one is

Subclassing the Django ImageFileField

冷暖自知 提交于 2019-12-03 09:13:49
I'm interested in subclassing django's ImageFileField to allow access to the image IPTC metadata, something like: >>> from myapp.models import SomeModel >>> obj = SomeModel.objects.all()[0] # or what have you >>> obj.image.iptc['keywords'] ('keyword','anotherkeyword','etc') ... the docs say to read over django's internal code , which I did; I've tried to produce a working implementation and I am not sure what I'm doing -- I've defined custom fields before, but I can't come up with boilerplate setup for a file-based field. I know I need to define an attr_class and a descriptor_class to make it

jquery.validate, jquery.metadata and html5 data

时光总嘲笑我的痴心妄想 提交于 2019-12-03 09:03:53
I'm looking into using the html5 data- attributes to pass the validation rules to jquery.validate as a stop gap until the plugin is updated with HTML5 support. I'm using jquery 1.4.2, jquery.validate 1.7 and jquery.validate 2.1. In my HTML I'm using code such as this: <input name="foo" type="text" data-validate="{required:true,digits:true}" /> In my jQuery I'm doing the following: <script type="text/javascript"> $.metadata.setType ("html5"); $(function () { $('#myForm').validate ({debug:true}); }); </script> This just causes an error message, validator.methods[method] is undefined I did do a

MEF GetExports<T, TMetaDataView> returning nothing with AllowMultiple = True

自闭症网瘾萝莉.ら 提交于 2019-12-03 08:34:06
I don't understand MEF very well, so hopefully this is a simple fix of how I think it works. I'm trying to use MEF to get some information about a class and how it should be used. I'm using the Metadata options to try to achieve this. My interfaces and attribute looks like this: public interface IMyInterface { } public interface IMyInterfaceInfo { Type SomeProperty1 { get; } double SomeProperty2 { get; } string SomeProperty3 { get; } } [MetadataAttribute] [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public class ExportMyInterfaceAttribute : ExportAttribute, IMyInterfaceInfo {

How does telegram shows the Icon of some websites?

◇◆丶佛笑我妖孽 提交于 2019-12-03 08:30:56
问题 I am working with telegram on windows and its online version on web.telegram.org, when I share a link with my friend Telegram shows the icon or logo of some websites in that message: Image The first website is vajehyab.com and it has a favicon too (But do not showing that website icon), and the second is Stackoverflow and as you see the logo of stackoverflow and a litle description shows beside it. Does websites do something or having some metadata that allow Telegram to access their logo, or

Selecting MySql table data into an array

时光怂恿深爱的人放手 提交于 2019-12-03 07:55:38
I try to catch data from mysql to put them all in array. Suppose: users table ----------------------- id| name | code ---------------------- 1| gorge | 2132 2| flix | ksd02 3| jasmen | skaod2 $sql = mysql_query("select id, name, code from users"); $userinfo = array() while($row_user = mysql_fetch_array($sql)){ $userinfo = $row_user[name] } ------------------------- foreach($userinfo as $usinfo){ echo $usinfo."<br/>"; } Here is the problem i can only insert user name but cant insert also code & id in userinfo array please help me to insert all data in same array. [P.S] No object oriented please

Read EXE, MSI, and ZIP file metadata in Python in Linux

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 07:18:00
I am writing a Python script to index a large set of Windows installers into a DB. I would like top know how to read the metadata information (Company, Product Name, Version, etc) from EXE, MSI and ZIP files using Python running on Linux. Software I am using Python 2.6.5 on Ubuntu 10.04 64-bit with Django 1.2.1. Found so far: Windows command line utilities that can extract EXE metadata (like filever from SysUtils), or other individual CL utils that only work in Windows. I've tried running these through Wine but they have problems and it hasn't been worth the work to go and find the libs and

Microsoft SQL Server - Who created a Stored Procedure?

人盡茶涼 提交于 2019-12-03 06:53:07
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? It may be too late for you now, but you can keep track of DDL activity. We have a table in our administrative database that gets all the activity put in it. It uses a DDL trigger, new to 2005. These scripts create a table in your admin DB (SQL_DBA for me), create a trigger on the model db, create triggers on existing databases. I also created a sp_msforeachDB

java annotations: library to override annotations with xml files

戏子无情 提交于 2019-12-03 06:28:43
Java has annotations and that is good. However, some developers feel that it is best to annotate code with metadata using xml files - others prefer annotations but would use metadata to override annotations in source code. I am writing a Java framework that uses annotations. The question is: is there a standard way to define and parse metadata from xml files. I think this is something every framework that uses annotations could benefit from but I can seem to find something like this on the Internet. Must I roll my own xml parsing/validation or has someone already done something like this?