1 questions about Iframset chunking
Today for a long time to a framework for the design.
Have done before, after a few months did not touch forget, today thought for half a day has not been well, finally simply installed DREAMWAVEMX. — —。
But it's good to review it again or make it clear, record down, lest later forget.
In the Framset:
rows = "*": fast by line, that is, from top to bottom, * represents the whole
rows = "100, 100, *": meaning is divided from top to bottom 3 fast, the first fast and second fastest is 100px, 3rd fast accounted for all other
There is also a cols attribute, which is divided quickly by column, that is, from left to right.
cols = "100,*": The meaning is from left to right, the first block 100px, the second block occupies all other
Q: Under what circumstances can you use a virtual method? It is different from interface and abstraction. What is the difference between an interface and an abstraction? An example of when to use an interface and when to use an abstract class
A:
Let's talk about virtual method.
If the declaration of an instance method contains a virtual modifier, the method is said to be virtual (virtual method). If there is no virtual modifier, the method is said to be Non-virtual (Non-virtual method).
When a virtual method is invoked, the Run-time type (runtime type) of the instance involved in the call determines which implementation of the method is to be invoked. In Non-virtual method invocations, the compile-time type of the instance (Compile-time type) is the determining factor.
Virtual methods can be overridden in a derived class (override). When an instance method declaration includes a override modifier, the method overrides the inherited virtual method with the same signature. A virtual method declaration is used to introduce a new method, and an override method declaration is used to make an existing inherited virtual method specialized (by providing a new implementation of the method).
Abstract methods are virtual methods that are not implemented. Abstract methods are declared using the abstract modifier and are only allowed in classes that are also declared abstract. Abstract methods must be overridden in each non-abstract derived class.
The interface is a specification or stipulation of a behavior; Just promised to be able to call the method
let's talk about interfaces and abstract classes.
1. An abstract class is an incomplete class that requires further specialization. An interface is merely a specification or provision of an act;
2. The interface basically does not have any specific characteristics of inheritance, it only promises to be able to invoke the method;
3. A class can implement several interfaces at a time, but can only extend one parent class
4. Interfaces can be used to support callbacks, and inheritance does not have this feature.
Q
1. Overload : Multiple functions with the same name exist at the same time, with different number of parameters/type.
The return type cannot be used as a distinguishing criterion for overloaded functions.
There is no problem when the compiler can clearly determine the meaning of a program before and after it. such as int x=f (), but because we can also call a function without assigning it to other variables (just to get "side effects") such as f (), the compiler will not be able to distinguish between the calls.
2, rewriting : The polymorphism between the parent class and the subclass. A method in a subclass has the same name and parameters as the parent class.
Q
Where the data is stored in memory, depending on its data type, in C #, the value type and reference type are grouped, and the data of the value type is stored in an in-memory stack, each variable or program has its own stack, and a stack address cannot be shared. When a variable of a value type is passed to another variable of the same type, two different addresses are allocated on the stack.
Data of a reference type is stored in an in-memory heap, and the data in the same location can be used by different variables or programs. When data is passed from a variable of a reference type to another variable of the same type, only the reference address of the variable is passed to the new variable, referencing the data stored in the current heap.
For example: class, String is a reference type, struct (struct), int belongs to value type.
Q
A:
Static variables are divided into global static variables and local static variables.
Global static variables, unlike global variables, although the same as static storage, but global static variables lose the global "universal meaning", which refers to the "global" only limited to this file, and global variables are visible to the individual files
A static local variable, which differs from a local variable:
1. Storage mode is different, the former is static storage mode, the latter is dynamic storage mode;
2. Scope is consistent, limited to "module" or "code segment";
The biggest feature of static local variables is that they function like global variables, the scope is similar to a local variable, after a function or code snippet, the lifecycle continues, with the application of life and death, when again back to the function or code snippet, the last time out of the value is still saved to the present, So the average person uses it to do the counter.
In addition, there are some that need to be explained, when a static variable is a member of a class, or when there is a static member function in a class, the static part (the variables and functions) is no longer part of the object, but only belongs to the class itself, and the class is not instantiated, so the static function and the static variable can also be invoked;
So it is often in the constructor to increment some static member variables to achieve the count of the number of objects.
Cases:
Class Staticandinstance
{
static int classvar;
int Instancevar;
static void Setclassvar (int i)
{
Classvar=i;
}
static int Getclassvar ()
{
return Classvar;
}
void Setinstancevar (int i)
{
Classvar=i;
Instancevar=i;
}
int Getinstancevar ()
{
return Instancevar;
}
}
public class Staticandinstancetest
{
public static void Main (String args[])
{
Staticandinstance m1=new staticandinstance ();
Staticandinstance m2=new staticandinstance ();
M1.setclassvar (1);
M2.setclassvar (2);
System.out.println ("m1.classvar=" +m1.getclassvar () + "m2.classvar=" +m2.getclassvar ());
M1.setinstancevar (11);
M2.setinstancevar (22);
System.out.println ("M1.") Instancevar= "+m1.getinstancevar () +" m2. Instancevar= "+m2.getinstancevar ());
}
}
The result is: m1.classvar=2 m2.classvar=2
M1. instancevar=11 m2. Instancevar=22
Q
Q
A:
Passing Parameters by URL
Q
A:
There are generally four of them:
· Data Store: Where the data resides. This can is a relational database, an XML file, a text file, or some the other proprietary storage system.
· Data Access Layer: The code that is takes care of retrieving and manipulating the raw data saved in the data store.
· Business Logic Layer: The code that takes the "data retrieved by" the "data Access tier and exposes it to the" the client in a more abstracted and intui tive way, hiding low-level details such as the data store ' s schema, and adding all the validation logic The input is safe and consistent.
· Presentation Layer (User Interface): The code that defines what a user should to the screen, including formatted data and system navigation menus. This layer is designed to operate inside a Web browser into the case of ASP.net, but some applications might use Window s Forms at this layer.
Q
A:
It seems to pass directly.
Hyperlink1.navigateurl = "forum.aspx?a=" + "Chinese";
You can also decode and pass this
String urlfmt = "forum.aspx?a={0}";
Hyperlink1.navigateurl = string. Format (URLFMT, Server.URLEncode ("Test Chinese"));
Q:response.flush ()