Search Results

Search found 87932 results on 3518 pages for 'code vader'.

Page 24/3518 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • .NET Code Generataion | Unable to create a T4 template in Visual Studio 2008

    - by cedar715
    I've the Visual Studio 2008 installed on my machine(licensed one). When I try to add a new .tt(say bar.tt) file to the project, the following code is generated: I've seen in a screencast, where in an empty .tt file should be opened and the developer enters the T4 code. Even if I remove the code and enter T4 code, am getting build errors. using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Reflection; using System.Windows.Forms; namespace Foobar { partial class bar : Form { public bar() { InitializeComponent(); this.Text = String.Format("About {0} {0}", AssemblyTitle); this.labelProductName.Text = AssemblyProduct; this.labelVersion.Text = String.Format("Version {0} {0}", AssemblyVersion); this.labelCopyright.Text = AssemblyCopyright; this.labelCompanyName.Text = AssemblyCompany; this.textBoxDescription.Text = AssemblyDescription; } #region Assembly Attribute Accessors public string AssemblyTitle { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), false); if(attributes.Length > 0) { AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes[0]; if(titleAttribute.Title != "") { return titleAttribute.Title; } } return System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); } } public string AssemblyVersion { get { return Assembly.GetExecutingAssembly().GetName().Version.ToString(); } } public string AssemblyDescription { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyDescriptionAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyDescriptionAttribute)attributes[0]).Description; } } public string AssemblyProduct { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyProductAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyProductAttribute)attributes[0]).Product; } } public string AssemblyCopyright { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; } } public string AssemblyCompany { get { object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCompanyAttribute), false); if (attributes.Length == 0) { return ""; } return ((AssemblyCompanyAttribute)attributes[0]).Company; } } #endregion } } EDIT: I didn't download any T4 software separately as I got to know that it already ships with Visual Studio 2008.

    Read the article

  • Cut and Paste Code Reuse - JavaScript and C#

    - by tyndall
    What is the best tool(s) for tracking down "cut and paste reuse" of code in JavaScript and C#? I've inherited a really big project and the amount of code that is repeated throughout the app is 'epic'. I need some help getting handle on all the stuff that can be refactored to base classes, reusable js libs, etc... If it can plug into Visual Studio 2010, that would be an added bonus.

    Read the article

  • Exit code of a process terminated with Process.Kill() , in C#

    - by Emil D
    If in my C# application, I am creating a child process that can either terminate normally, or start misbehaving, in which case I terminate it with a call to Process.Kill().However, I would like to know if the process has exited normally.I know I can get the error code of a terminated process, but what would be a normal exit code and what would signify that the process was killed?

    Read the article

  • Code review tool for CM synergy

    - by Ravisha
    I am looking for a code review tool which can be configured with CM synergy .We are having java project with Eclipse 3.4 as IDE.And need a simple code review tool on windows XP. http://www.windriver.com/cgi-bin/partnerships/directory/viewProd.cgi?id=1451

    Read the article

  • Code Complete 2ed, composition and delegation.

    - by Arlukin
    Hi there. After a couple of weeks reading on this forum I thought it was time for me to do my first post. I'm currently rereading Code Complete. I think it's 15 years since the last time, and I find that I still can't write code ;-) Anyway on page 138 in Code Complete you find this coding horror example. (I have removed some of the code) class Emplyee { public: FullName GetName() const; Address GetAddress() const; PhoneNumber GetWorkPhone() const; ... bool IsZipCodeValid( Address address); ... private: ... } What Steve thinks is bad is that the functions are loosely related. Or has he writes "There's no logical connection between employees and routines that check ZIP codes, phone numbers or job classifications" Ok I totally agree with him. Maybe something like the below example is better. class ZipCode { public: bool IsValid() const; ... } class Address { public: ZipCode GetZipCode() const; ... } class Employee { public: Address GetAddress() const; ... } When checking if the zip is valid you would need to do something like this. employee.GetAddress().GetZipCode().IsValid(); And that is not good regarding to the Law of Demeter ([http://en.wikipedia.org/wiki/Law_of_Demeter][1]). So if you like to remove two of the three dots, you need to use delegation and a couple of wrapper functions like this. class ZipCode { public: bool IsValid(); } class Address { public: ZipCode GetZipCode() const; bool IsZipCodeValid() {return GetZipCode()->IsValid()); } class Employee { public: FullName GetName() const; Address GetAddress() const; bool IsZipCodeValid() {return GetAddress()->IsZipCodeValid()); PhoneNumber GetWorkPhone() const; } employee.IsZipCodeValid(); But then again you have routines that has no logical connection. I personally think that all three examples in this post are bad. Is it some other way that I haven't thougt about? //Daniel

    Read the article

  • Machine Code tutorial for Mac

    - by None
    I want to learn machine code. Not for a specific reason. Just for the heck of it. I was wondering if there were any good machine code tutorials. I have a macbook with a 2.4 GHz Intel Core 2 Duo processor.

    Read the article

  • ReSharper Code Cleanup/Reformat Code feature vs Versioning Control Systems

    - by Romain Verdier
    ReSharper Code cleanup feature (with "reorder members" and "reformat code" enabled) is really great. You define a layout template using XML, then a simple key combination reorganizes your whole source file (or folder/project/solution) according to the rules you set in the template. Anyway, do you think that could be a problem regarding VCS like subversion, cvs, git, etc. ? Is there a chance that it causes many undesired conflicts ? Thank you.

    Read the article

  • Script to rebuild git history, applying code cleanup to every version

    - by rjmunro
    Has anyone got a script for git that can go through the history, check out each version, apply a cleanup script, then check the cleaned version into another repository? I have some code which I've been developing, but I haven't been consistent with code formatting e.g. tabs vs spaces etc. I'd like to rewrite my entire history to be consistent with the new standards.

    Read the article

  • Code Analysis - Treat as Error

    - by Brian Schmitt
    Looking to enable the "Enable code Analysis on Build" feature in Visual Studio. Obviously the Rules are a best practice, and I am working with an existing code base that currently fails many of the rules. I am looking for input as to which rules are the most egregious and should be treated as an Error.

    Read the article

  • Generate money type fields using code first EF CTP5

    - by BBHorus
    In this blog post: EF4 Code First Control Unicode and Decimal Precision, Scale with Attributes, Dane Morgridge used attributes to control the creation of different types on your database. ...And I found this pretty unique BTW!!! How do I generate money type fields in my resulting database using code first API of EF CTP5, if is possible to do it from your model, using conventions or attributes? Sorry about my English is not my main language. Thanks in advance.

    Read the article

  • How to format long strings in arrays

    - by takeshin
    How should I format very long strings in my source code? I follow the rule, that line of code should not be longer than 80 characters. (The other rules are Zend Framework formatting standard) e.g. protected $_messages = array( 'key1' => 'very, very long string lorem ipsum dolor sit amet…', 'key2' => 'this one it very long too, and exceeds 80 characters len…' );

    Read the article

  • Code Generators for .Net

    - by user151190
    I'm looking to do some side projects but don't have the time to hand code everything. What code generators has anyone used? Currently, I am looking at Iron Speed, but can't really afford to buy it. So I'm looking for a product under $300.00. Any suggestions? Jim

    Read the article

  • What is the worst code you've ever written?

    - by Even Mien
    Step into the confessional. Now's your time to come clean. What's the worst code you personally have ever written? Why was it so bad? What did you learn from it? Don't tell us about code you inherited or from some co-worker. This is about your personal growth as a programmer and as a person.

    Read the article

  • Embed code for my web page

    - by hotcoder
    I've created a web application in asp.net. I've to generate embed code for one of my page so that other websites can embed that code in their websites. Tell me what is the best way to do this?

    Read the article

  • I do not know whether it should continue to develop this code sharing service :(

    - by user296268
    I created an open source Project : TwPaste on github. It provides The Social Source Code and Plain Text Sharing Service. You can post any source code here , All pastes and comments will post to twitter . I'm not sure the usefulness of this project , so I need your feedback to improve it , if you think it is useless , please tell me directly, I'll close it soon. Thanks. You can access it form below link twpaste.com

    Read the article

  • Code Golf: Spider webs

    - by LiraNuna
    The challenge The shortest code by character count to output a spider web with rings equal to user's input. A spider web is started by reconstructing the center ring: \_|_/ _/ \_ \___/ / | \ Then adding rings equal to the amount entered by the user. A ring is another level of a "spider circles" made from \ / | and _, and wraps the center circle. Input is always guaranteed to be a single positive integer. Test cases Input 1 Output \__|__/ /\_|_/\ _/_/ \_\_ \ \___/ / \/_|_\/ / | \ Input 4 Output \_____|_____/ /\____|____/\ / /\___|___/\ \ / / /\__|__/\ \ \ / / / /\_|_/\ \ \ \ _/_/_/_/_/ \_\_\_\_\_ \ \ \ \ \___/ / / / / \ \ \ \/_|_\/ / / / \ \ \/__|__\/ / / \ \/___|___\/ / \/____|____\/ / | \ Input: 7 Output: \________|________/ /\_______|_______/\ / /\______|______/\ \ / / /\_____|_____/\ \ \ / / / /\____|____/\ \ \ \ / / / / /\___|___/\ \ \ \ \ / / / / / /\__|__/\ \ \ \ \ \ / / / / / / /\_|_/\ \ \ \ \ \ \ _/_/_/_/_/_/_/_/ \_\_\_\_\_\_\_\_ \ \ \ \ \ \ \ \___/ / / / / / / / \ \ \ \ \ \ \/_|_\/ / / / / / / \ \ \ \ \ \/__|__\/ / / / / / \ \ \ \ \/___|___\/ / / / / \ \ \ \/____|____\/ / / / \ \ \/_____|_____\/ / / \ \/______|______\/ / \/_______|_______\/ / | \ Code count includes input/output (i.e full program).

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >