Search Results

Search found 9271 results on 371 pages for 'properties'.

Page 4/371 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Setting article properties for a publication using RMO in C# .NET

    - by Pavan Kumar
    I am using transaction replication with push subscription. I am developing a UI for replication using RMO in C#.NET between different instances of the same database within same machine holding similar schema and structure. I am using Single subscriber and multiple publisher topology. During creation of publication i want to set a few article properties such as Keep the existing object unchanged ,allow schema changes at subscriber to false a,copy foriegn key constarint and copy check constraints to true. How do i set the article properties using RMO in C# .NET. I am using Visual Studio 2008 SP1.I also want to know as how we can select all the objects including Tables,Views,Stored Procedures for publishing at one stretch. I could do it for one table but i want to select all the tables at one stretch. This is the code snippet i used for selecting single table for publishing. TransArticle ta = new TransArticle(); ta.Name = "Article_1"; ta.PublicationName = "TransReplication_DB2"; ta.DatabaseName = "DB2"; ta.SourceObjectName = "person"; ta.SourceObjectOwner = "dbo"; ta.ConnectionContext = conn; ta.Create();

    Read the article

  • Automatic Properties, Collection Initializers, and Implicit Line Continuation support with VB 2010

    - by ScottGu
    [In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/scottgu] This is the eighteenth in a series of blog posts I’m doing on the upcoming VS 2010 and .NET 4 release. A few days ago I blogged about two new language features coming with C# 4.0: optional parameters and named arguments.  Today I’m going to post about a few of my favorite new features being added to VB with VS 2010: Auto-Implemented Properties, Collection Initializers, and Implicit Line Continuation support. Auto-Implemented Properties Prior to VB 2010, implementing properties within a class using VB required you to explicitly declare the property as well as implement a backing field variable to store its value.  For example, the code below demonstrates how to implement a “Person” class using VB 2008 that exposes two public properties - “Name” and “Age”:   While explicitly declaring properties like above provides maximum flexibility, I’ve always found writing this type of boiler-plate get/set code tedious when you are simply storing/retrieving the value from a field.  You can use VS code snippets to help automate the generation of it – but it still generates a lot of code that feels redundant.  C# 2008 introduced a cool new feature called automatic properties that helps cut down the code quite a bit for the common case where properties are simply backed by a field.  VB 2010 also now supports this same feature.  Using the auto-implemented properties feature of VB 2010 we can now implement our Person class using just the code below: When you declare an auto-implemented property, the VB compiler automatically creates a private field to store the property value as well as generates the associated Get/Set methods for you.  As you can see above – the code is much more concise and easier to read. The syntax supports optionally initializing the properties with default values as well if you want to: You can learn more about VB 2010’s automatic property support from this MSDN page. Collection Initializers VB 2010 also now supports using collection initializers to easily create a collection and populate it with an initial set of values.  You identify a collection initializer by declaring a collection variable and then use the From keyword followed by braces { } that contain the list of initial values to add to the collection.  Below is a code example where I am using the new collection initializer feature to populate a “Friends” list of Person objects with two people, and then bind it to a GridView control to display on a page: You can learn more about VB 2010’s collection initializer support from this MSDN page. Implicit Line Continuation Support Traditionally, when a statement in VB has been split up across multiple lines, you had to use a line-continuation underscore character (_) to indicate that the statement wasn’t complete.  For example, with VB 2008 the below LINQ query needs to append a “_” at the end of each line to indicate that the query is not complete yet: The VB 2010 compiler and code editor now adds support for what is called “implicit line continuation support” – which means that it is smarter about auto-detecting line continuation scenarios, and as a result no longer needs you to explicitly indicate that the statement continues in many, many scenarios.  This means that with VB 2010 we can now write the above code with no “_” at all: The implicit line continuation feature also works well when editing XML Literals within VB (which is pretty cool). You can learn more about VB 2010’s Implicit Line Continuation support and many of the scenarios it supports from this MSDN page (scroll down to the “Implicit Line Continuation” section to find details). Summary The above three VB language features are but a few of the new language and code editor features coming with VB 2010.  Visit this site to learn more about some of the other VB language features coming with the release.  Also subscribe to the VB team’s blog to learn more and stay up-to-date with the posts they the team regularly publishes. Hope this helps, Scott

    Read the article

  • Access properties controls of a window from a page in WPF

    - by toni
    Hi, My problem is that I want to access from a page to the properties of a control (button, textblock, label, or a menuitem of the window....) placed in a window. The page is placed into the window. How can I do this? Is there any method to find controls by name in a specific window or page or entire application? Thanks.

    Read the article

  • Modifying vertex properties in a Boost::Graph

    - by Paul Nathan
    I am trying to figure out how to use boost::graph to store some information. However, there is information I want tied to each vertex. Staring at the documentation for the library reveals either(a)badly written documentation, or (b), I'm obviously not as good at C++ as I thought. Pick two. I am looking for either a tutorial on assigning properties, or a simple example use.

    Read the article

  • How to retry opening a properties file in Java

    - by Hoggy
    I'm trying to handle an FileNotFoundException in Java by suspending the thread for x seconds and rereading the file. The idea behind this is to edit properties during runtime. The problem is that the programm simply terminates. Any idea how to realize this solution?

    Read the article

  • Schema to support dynamic properties

    - by Johan Fredrik Varen
    Hi people. I'm working on an editor that enables its users to create "object" definitions in real-time. A definition can contain zero or more properties. A property has a name a type. Once a definition is created, a user can create an object of that definition and set the property values of that object. So by the click of a mouse-button, the user should ie. be able to create a new definition called "Bicycle", and add the property "Size" of type "Numeric". Then another property called "Name" of type "Text", and then another property called "Price" of type "Numeric". Once that is done, the user should be able to create a couple of "Bicycle" objects and fill in the "Name" and "Price" property values of each bike. Now, I've seen this feature in several software products, so it must be a well-known concept. My problem started when I sat down and tried to come up with a DB schema to support this data structure, because I want the property values to be stored using the appropriate column types. Ie. a numeric property value is stored as, say, an INT in the database, and a textual property value is stored as VARCHAR. First, I need a table that will hold all my object definitions: Table obj_defs id | name | ---------------- 1 | "Bicycle" | 2 | "Book" | Then I need a table for holding what sort of properties each object definition should have: Table prop_defs id | obj_def_id | name | type | ------------------------------------ 1 | 1 | "Size" | ? | 2 | 1 | "Name" | ? | 3 | 1 | "Price" | ? | 4 | 2 | "Title" | ? | 5 | 2 | "Author" | ? | 6 | 2 | "ISBN" | ? | I would also need a table that holds each object: Table objects id | created | updated | ------------------------------ 1 | 2011-05-14 | 2011-06-15 | 2 | 2011-05-14 | 2011-06-15 | 3 | 2011-05-14 | 2011-06-15 | Finally, I need a table that will hold the actual property values of each object, and one solution is for this table to have one column for each possible value type, such as this: Table prop_vals id | prop_def_id | object_id | numeric | textual | boolean | ------------------------------------------------------------ 1 | 1 | 1 | 27 | | | 2 | 2 | 1 | | "Trek" | | 3 | 3 | 1 | 1249 | | | 4 | 1 | 2 | 26 | | | 5 | 2 | 2 | | "GT" | | 6 | 3 | 2 | 159 | | | 7 | 4 | 3 | | "It" | | 8 | 5 | 3 | | "King" | | 9 | 6 | 4 | 9 | | | If I implemented this schema, what would the "type" column of the prop_defs table hold? Integers that each map to a column name, varchars that simply hold the column name? Any other possibilities? Would a stored procedure help me out here in some way? And what would the SQL for fetching the "name" property of object 2 look like?

    Read the article

  • Why do so many wpf controls implement CLR properties instead of dependency properties ?

    - by msfanboy
    Hello, is it because the controls programmers are lazy, too hard to implement or not knowledgeable? Wether they are custom controls from 3rd party vendors or Microsoft itself, very much controls have often clr properties instead of DP. Result is I can not bind to them and is wpf not all about binding? :/ My next side question would be, why do so many wpf controls offer visual parts but they are not member of the visual tree ? see wpf datagrid columns, headers... What do you think?

    Read the article

  • Creating Class Properties in Visual Studio

    - by pm_2
    Using the standard VS IDE, is there a fast way to create class properties that are linked to the local variables? The class diagram seems to provide something, but it basically just created a property stub. Is there something better / easier out there ?

    Read the article

  • Silverlight 4: Binding to a calculation of control properties

    - by Rich.Carpenter
    What I would like to do is pretty simple. Given textboxes for ItemPrice, Tax and Total, I need the text value for Total to be bound to ItemPrice + Tax and the Tax value to display ItemPrice * taxRate. Could someone offer a brief explanation as to how this would be accomplished or point me to an appropriate example? I see property binding examples all over the place, but none that show binding to a calculation of the properties of two controls.

    Read the article

  • Define a default .properties file in JAVA

    - by bnabilos
    Hello, I have 2 .properties files in my java project and I want to define one of them as default file to be used when the language of the operating system is different from the 2 languages already defined. Can you tell me please what should I add to my code to make that possible? Thank you

    Read the article

  • Adding format to properties

    - by chris
    I have an object with a couple of DateTime properties: public DateTime Start_Date { get; set; } public DateTime? End_Date { get; set; } I would like to set a format for each of these, along the lines of Start_Date.ToString("M/d/yyyy hh:mm tt") Do I have to code the get, or is there an elegant way to do this?

    Read the article

  • What are common patterns for handling possible pluralization in message properties?

    - by C. Ross
    Obviously users like to see text properly pluralized, and pluralization schemes vary in the various written languages one may encounter. When internationalizing an app, what pattern(s) are useful for handling messages with possible pluralization? What about messages with multiple possible pluralization? For example: "N review(s):" One pattern would be reviews.title.singular="{0} review:" reviews.title.singular="{0} reviews:" And this may not support all languages. Or a more complicated case: "Found M question(s) with N comment(s)." This would be difficult to support in English?

    Read the article

  • The Properties dialog box not working for any Start Menu Program Lubuntu 14.04

    - by user236378
    When Lubuntu 14.04 first came out, the Properties dialog was present for all Start Menu Programs but did not work when right-clicked on as nothing happened and no other box popped up the the Start Menu Program information, such as the executable info, etc. Then the issue was fixed. Now the issue has returned when I upgraded to Lubuntu 14.04.1. Is there any way to retrieve the Properties info pop-up box via a configuration file? Does the issue have to do with a faulty LXShortcut? I noticed when I uninstalled the LXShortcut the Properties tab disappeared. When I re-installed the Properties tab returned however once again when you right-click on the Properties tab nothing happens. Any assistance would be greatly appreciated. Thank you.

    Read the article

  • Spring: PropertyPlaceHolderConfigurer to set values for non-string/integer properties

    - by babyangel86
    Hi, All the examples I have seen where the PropertyPlaceHolderConfigurer is used seem to be setting simple values like Strings and ints. How do you use the PPC to set the values of classes. E.g. If i had a class signature Source(String name, DistributionSample batch, DistributionSample delay) How would I go about setting the batch and delay properties. There is also a small catch. DistributionSample is an abstract class. On the bright side, The class that is using the propertyPlaceHolder knows the beanName of the "Solid" class that needs to be instantiated. Any help would be much appreciated.

    Read the article

  • Overloading properties in C#

    - by end-user
    Ok, I know that property overloading is not supported in C# - most of the references explain it by citing the single-method-different-returntype problem. However, what about setters? I'd like to directly assign a value as either a string or object, but only return as a string. Like this: public string FieldIdList { get { return fieldIdList.ToString(); } set { fieldIdList = new FieldIdList(value); } } public FieldIdList FieldIdList { set { fieldIdList = value; } } private FieldIdList fieldIdList; Why wouldn't this be allowed? I've also seen that "properties" simply create getter/setter functions on compile. Would it be possible to create my own? Something like: public void set_FieldIdList(FieldIdList value) { fieldIdList = value; } That would do the same thing. Thoughts?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >