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 ?
...
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...
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...
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 ...
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...
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
{
...
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...
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...
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...
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...
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...
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...
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...
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...
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 ...
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...
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...
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 = "...
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...
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
{
...