base

How to get modified file from base file and diff file ?

Consider the following example : $ls base.txt base-modified.txt $diff base.txt base-modified.txt > diff.txt $rm base-modified.txt $ I want the base-modified.txt from base.txt and diff.txt... Can anyone suggest a way ? ...

How to assign theme in base class using master page?

Hi, I am trying to assign a theme based on browser type. I would like to do this in a base class so it would only need to be in one place (I am using a master page). I coded the following but the "OnLoad" here is performed before the "Page_PreInit". This needs to go in Page_PreInit, but why isn't it firing? Imports Microsoft.VisualB...

NHibernate base and derived class mapping

Situation: I have a class MyClass and its "lightweight" version MyClassLite, so i have public class MyClass : MyClassLite I also use hbm file for mapping my classes (they are mapped to the same table). The thing is that when i try to get a list of MyClassLite entities, i get not only MyClassLite entities, but a list of MyClass entitie...

Base class for windows service

My new project has a design in which there are number windows services for performing different tasks. I have been given a task to create base class from which all of the windows service will inherit. This base class will perform common functions like creating instances of other windows services by iterating through the config file (may ...

Is it possible to have 2 Base class's which already inherit from something inherit or know of a third common class?

I have 2 class's Class 1. public class BaseContentPage : System.Web.UI.Page { } Class 2. public class BaseUserControl : System.Web.UI.UserControl { } And now i want them to be aware of this class. public class BaseCommon { public string Variable1 { get; set; } public string Variable2 { get; set; } public string Variable...

Using Base classes in WPF

Hello. I have problem with base classes in WPF. I try to make a base class with some base elements, so that other windows can inherit these components. But all that i have, when I inherit base class is only empty window, without these elements. For better understanding i put my code here: using XSoftArt.WPFengine; namespace XSoftArt { ...

Why can't Flash CS3 find the MovieClip base class even after classpath is set (AS3)?

Tearing my hair out. I created an as3 class - blah.Foo, which extends MovieClip. it is not in a package, cos Flash CS3 complained about nested packages, so it's a 'bare' class. And yes it's nested in myproj/as/blah/Foo.as And yes, it imports flash.display.MovieClip at the top of the file. I also have myproj/fla/main.fla. main.fla is se...

Cast concrete class to generic base interface

Here's the scenario i am faced with: public abstract class Record { } public abstract class TableRecord : Record { } public abstract class LookupTableRecord : TableRecord { } public sealed class UserRecord : LookupTableRecord { } public abstract class DataAccessLayer<TRecord> : IDataAccessLayer<TRecord> where TRecord : Record, n...

Visual Studio Test project base directory

Hi, I want to do some interaction testing in my test project, and would like to test some xml configuration based components... How can I find the base directory of the test project in code so that I can create paths relative to it? I want to have a sub folder that contains the test xml files. Thanks EDIT: Iv used Assembly.GetExecuti...

Validating C# base class constructor parameter

After running Code Analysis in VS2010 beta (FxCop for previous versions) I'm getting the following warning: In externally visible method 'Identity.Identity(WindowsIdentity)', validate parameter 'windowsIdentity' before using it. The constructor is: public Identity(WindowsIdentity windowsIdentity) : base(windowsIdent...

Firefox: Can I use a relative path in the BASE tag?

I have a little web project where I have many pages and an index/ToC file. The toc file is at the root of my project in toc.html. The pages are spread over a couple of subdirectories and include the toc with an iframe. The project doesn't need a web server, so I can create the HTML in a directory and browse it in my browser. The problem...

C# hiding with members

Hi, in the below example, what would happen? class Base { public int abc = 3; } Class Derived : Base { public int abc = 2; } static void Main() { Derived blah = new Derived(); Console.WriteLine(blah.abc); } I'm sure you would see '2' on your console, but what I'm reading (and seeing) opposes that... Why would you see...

derived class cannot display value of base class variables in C#

I am trying to execute the following code class A { protected int a; protected char b; public void Show() { a=5; MessageBox.Show(""+a); } } class B:A { public void Show() { b='z'; MessageBox...

C# base() constructor order

Possible Duplicate: C# constructor execution order class Foo { public int abc; Foo() { abc = 3; } } class Bar : Foo { Bar() : base() { abc = 2; } } In the example above, when an object of Bar is created, what will be the value of BarObject.abc? Is the base constructor called first, o...

Google Base Feed - XmlTextWriter or Google Client Library objects

Hello there, I have just gone through Google Base Feed documentation as a first step to start a new project. The project allows users to submit Property(Housing) feeds to Google Base. I am having following doubt regarding - How to submit Feed to Google Base at code level. There can be two approaches if I understand this right: To ...

C# combine the functions of two different base classes

Hi, I'm trying to combine the functions of two different base classes into a new class, to no avail. Say I have class A and B, whereas B is a descendant of A with different functionality (i.e. can't be used as a substitute for A during runtime) and need a class C, which combines A and B, uses both and provides a unique interface to users...

convert integer to a string in a given numeric base in python

Python allows easy creation of an integer from a string of a given base via int(str,base). I want to perform the inverse: creation of a string from an integer. i.e. I want some function int2base(num,base) such that: int( int2base( X , BASE ) , BASE ) == X the function name/argument order is unimportant For any number X and ba...

Base Conversion Problem

I'm trying to convert an integer to a string right now, and I'm having a problem. I've gotten the code written and working for the most part, but it has a small flaw when carrying to the next place. It's hard to describe, so I'll give you an example. Using base 26 with a character set consisting of the lowercase alphabet: 0 = "a" 1 = "...

Make custom string encoder .net

I know .net supports base64 encoding of byte arrays. But i thought that i could save even more space if use a higher number of characters. I read somewhere that Unicode supports thousands of different characters so why not use base1024 encoding for example? And if this is possible can you give some guidelines on how to implement it. Tha...

C# Class Inheritance

greetings. i have the following class: public class Ship { public enum ValidShips { Minesweeper, Cruiser, Destroyer, Submarine, AircraftCarrier } public enum ShipOrientation { North, East, South, West } public enum ShipStatus { ...