Friday, October 8, 2010

c # and class differences in the structure


Directory

Comparison with the structure of the instance of the class

The difference between class and structure

How to choose the structure or class

1. Example of class and structure comparison:

Structure Example:

public struct Person

(

string Name;

int height;

int weight

public bool overWeight ()

(

file / / implement something

)

)

Class example:

public class TestTime

(

int hours;

int minutes;

int seconds;

public void passtime ()

(

file / / implementation of behavior

)
)

Call the procedure:

public class Test

(

public static ovid Main

(

Person Myperson = new Person file / / declare structure

TestTime Mytime = New TestTime file / / declare class

)

)

From the example above we can see, the class declaration and the structure is very similar statements, only a qualifier followed by the struct or class distinction, and used to define the new structure and definition of new classes of methods are very similar. Then the specific type and structure is the difference between what?

2. The difference between class and structure

1. Value types and reference types

Structure is a value type: Value types are allocated on the stack address, all the basic types are structure types, such as: int corresponding System.int32 structure, string corresponding system.string structure, by using the structure can create more value types

Classes are reference types: reference types allocated on the heap address

The execution efficiency of the stack implementation efficient than the heap, stack, but limited resources, the logic is not suitable for handling large complex objects. Therefore, as the base type of treatment to treat the structure of small objects, while handling a business logic class

Because the structure is a value type so assignment between structures can create new structure, but the classes are reference types, type assignment is duplicated between the reference




[Next]



Note:

1. Although the structure of different types and classes, but their base type is an object (object), c # in all types of base types are object



2. Although the structure of the initialization operator also uses the New Structure of the object, but is still allocated on the stack instead of heap, if you do not use the "new" (new), then initialize all the fields before the field will remain unassigned state, and the object is not available

2. Succession

Structure: not from another structure or class inheritance, in itself and can not be inherited, although the structure with sealed statement is not clear, but the structure is implicitly sealed.

Categories: fully scalable, unless shown otherwise, the statement sealed class can inherit other classes and interfaces can also be self-succession

Note: Although the structure can not be inherited, but the structure can be inherited interfaces, methods, and interfaces inherit the same class

For example: Structures of Interfaces

interface IImage
(
void Paint ();
)

struct Picture: IImage
(
public void Paint ()
(
/ / Painting code goes here
)
private int x, y, z; / / other struct members
)

3. Internal structure:

Structure:

No default constructor, but you can add constructor

No destructor

Not abstract and sealed (because they can not inherit)

Not have the protected modifier

Can not use the new initialization

Initialize instance fields in the structure is wrong

Category:

A default constructor

There destructor

You can use abstract and sealed

Are protected modifiers

Must use the new initialization

3. How to choose the structure or class

Discussed the structure and the similarities and differences in class, the following discussion of how to choose the structure or class:

1. Stack space is limited, the number of logical objects, create a class to create structures better than

2. Structure expressed as points, rectangles and color of such lightweight objects, for example, if the statement contains an array of 1000 Point objects, each object will be allocated for the reference to additional memory. In this case, lower cost structure.

3. In the performance level of abstraction and multi-object level, the class is the best option

4. In most cases just a few of the types of data, structure the best option






Recommended links:



Evaluation Browser Tools



Motorola recall: a beautiful mistake



Compare Reference Tools



Production OF football Photoshop 7.0



WMV to MOV



MPEG4 To WMV



quot failed to start because d3dx9 37 dll Quot



Teach you QUICKLY learn how to record "unknown error" occurs



Li ZHONG: encourage employees to as "General"



RUP Tailoring principles and cutting process



XML Or CSS TOOLS Guide



Easy to use Remote Computing



Flash TO MPEG



Dell Digital denial distribution relationship With HP induced breakdown



Do they only quick Ctrl + Alt + End defects more quickly shutdown



L'OREAL portrait of "Edgar" Human resources together to create



Friday, September 24, 2010

The bitmap on the Symbian operating



Symbian operating a bit in the bitmap and the Windows SDK similar to a Context with Device, following some comments:

Bitmap graphics context
By the CBitmapContext class provides a Graphics context (CGraphicsContext) bitmap graphics implementation. It provides the following features:
1, clear and copy rectangular area;
2 bitmap block transfer (block transfer);
3, set the pen color and gray;
4, set the shadow mode;
5, the GC settings reset to default values

Window Server Client-side API provides an implementation: CWindowGc, which is mainly used for screen graphics, and the other to achieve a CFbsBitGc, which is mainly used for in-memory bitmap drawing, each of these are useful:)

See Figure




Bitmap graphics device
By the CBitmapDevice class provides a Graphics device (CGraphicsDevice) bitmap graphics to achieve.

Here Window Server Client-side API provides an implementation, CWsScreenDevie, used for screen rendering. Another realization is CFbsBitmapDevice, used to draw an in-memory bitmap, there is a CFbsScreenDevice, is primarily used (seldom used) to directly access the screen, skip the window server intermediary.

See Figure



Maintain the operation of the bitmap in CFbsBitmap, it can represent a font and bitmap server is managed by a bitmap. It provides digital map generation, loading and storage. There is also a TBitmapUtil related class, this class provides
Many functions to the user to manipulate the bitmap bits (!), Oh, is not very practical ah.

Bitmap is generally based on their size is stored in two different heap, large bitmap (there is a limit value for 4KB) storage location and small size of the bitmap is different, store large bitmap heap can automatic defragmentation to optimize their space:)

Each bitmap has a two-inch scale units, one twip size, this is the real world of WYSIWYG sizes, and one pixel size.

If you want to be more direct action bit map, you can use CFbsBitmap:: DataAddress (), it can get a bitmap loaded into memory address, inferior race to manipulate bitmap bit, I am afraid that is the fastest way, but still very trouble, huh, huh, attention, such as RGB to operate here, to note that the color difference, the general concept is 0xXXXXXX, with 6 bits to represent the RGB values, which became the 24-bit color, but the 3650/7650 is 4094 color, or 12bit color (4KColor), so operation, we have to switch between the two, we can use TRgb:: Color4K conversion, attention, and its parameters are TInt value, do not write * Address style, or in the simulation device on the pass, the phone will report Kern-Exec 3 errors, and a headache:)






Recommended links:



Cottage in China



VOB to Zune



DLL gray dove release type articles of the back door of the signature changes



after the fall of THE open source mysql database



Zhongguancun business will have been cleaned up and returned rectifying Zanji



Watch cool MECHANICAL picture production process



AVI to 3GP



Picked Font Tools



Is Out Of Date, ADSL Anecdotes



evaluation Audio Video Tools



The official version of Opera 10 September 1 showing the speed will increase 40%



Good Password MANAGERS



DAT to 3GP



BenQ compete in, with a hope that the road



News about Graphic CAD



Thursday, September 16, 2010

Xi Guohua, vice minister of MII: China's 3G licenses around four factors


Yesterday conducted the work of China Telecom Group meeting in 2007, despite the Ministry of Information Industry Xi Guohua, Vice Minister again stressed the "3G licenses being issued when the study, no conclusion." But he has further pointed out that China 3G licenses payment depends on four factors:

First, products, technology, business maturity.

And Xi pointed out that TD-SCDMA has been basically mature.

Second, the competitive landscape of the optimization. Xi Guohua clear that China's current telecom market is facing a serious imbalance in the competitive landscape. China Mobile, a single large, thriving new business telecom operation this year, revenues and profits in China Mobile accounted for 70% -80%. In contrast with China Mobile is growing more difficult for fixed network operators.

"We have recognized that mobile business license issued less. China Mobile and China Unicom unequal strength, not form effective competition." Xi Guohua said yesterday, Ministry of Information Industry is stepping up research, how to adjust regulatory policies, such as issuing 3G mobile licenses, the implementation of all business operations to reverse this pattern, it is necessary to prevent duplication, but also to compete effectively.

The third is the intellectual property rights. Xi Guohua stressed, 3G-standard intellectual property fees must be reasonable, too easy to create a monopoly, would lead to the results of human civilization will hinder the application.

Fourth is the need to fully support TD-SCDMA. Xi Guohua said the Ministry of Information Industry is doing a recent evaluation report, the basic view that "TD-SCDMA basic conditions for the commercialization": The testing results show the core TD-SCDMA has independent intellectual property rights standards and technology, is feasible in principle, can set a large network, although there are still some problems, but the construction and application in the future can be resolved gradually. For the follow-up TD-SCDMA development, Xi said, "The industry is developing technology evolution roadmap."






Recommended links:



WMV mpeg converter



IP and MAC binding of crack



About Groovy And Grails



youtube mkv



Matting, Photoshop master of the Road, 2



CATALOGS Screen Capture



Art - SCREEN Savers Report



Dell second quarter profit by 28 percent cited dissatisfaction with the price war has hurt revenue



Evaluate XML Or CSS Tools



"Chino conflict" Comment



e-cology in the Pan Micro Series 29



Chemistry TEACHERS and multimedia courseware



windows MEDIA player psp



Matroska format



Wednesday, July 28, 2010

Talks like a child (I)



Pure, clever, passionate. We talked about children, the mind think of all these terms. But there is a group of words also apply to them: stubborn, determined, high-handed, there are winners.

If you want to debate anything to do with the kids, they are often the final victory, but the parents will be defeated. Many parents will say to yourself: "I am afraid we now have to go downstairs to the child's toy elephant brought it, because we will finally agreed to go get the."

Indeed, the child is the world's best negotiators.

So what will this child be the parent you want to consistently accommodate the situation is how this happen? Several successful manager of a 40 people do not know how things will be lost to a four-year old Mao Haizi it? More importantly, the adult How to control children who possess the skills that it shocking?

Why in the negotiations on the children skills so superb, we do not have a single explanation. More reasonable because, under the specific circumstances they will use different techniques, including most of us have already been abandoned in some social shameless ploy.

The following are some children's negotiation skills, if you can, almost can be done time-tested.

Tips 1: bad temper

Bad temper is the most basic negotiation children wrist. Noise is often the most vicious people can get what you want. Just think of Walt Disney's Eisner (Michael Eisner) and Microsoft's Bill Gates (Bill Gates) on this hard to understand. The two are notoriously violent temper, but get whatever I wanted.

Of course, you do not want to rely on angry known benefits to their fishing, but to learn how to use these skills to the company for their own interests. Even if the only thing to give up your own principles to the extent of concessions, you will not waver.

Skills II: the fool

Children in the use of this technique when the following two forms: either pretend they do not understand it, or pretended not to hear. For example a child will gradually increase with the tone said, "What? What? What?!" Finally, the other children and he will not argue. In desperation, they will accept the fact that and the child did not understand.

Just think, if you do not want to deal with someone while blocking all communication with him, how strong this feeling. To give an example of telemarketing. And others are usually some kind of perfunctory dialogue, which is precisely used by telemarketers. Therefore, you should do is to immediately block such communication, methods can be confused and or simply no response. In this way, you eliminate the negotiations will be beneficial to this particular way telemarketers end of any possibility.

Pretend not to hear for such a situation, is that you never worked and the other was. If it is in their own companies to do so, you will think you do not listen to the views of others or lack of sensitivity. Pretend you do not know what the other party to do or say, you can also play at a time when not fully prepared to postpone talks. In this case, that the purpose is to control the time that their own interests.

Tips 3: do self-

Children will not adopt a different role to adapt to the environment. They are more children, no camouflage and cover. And they all know each other, know who was more shy, who more noisy, who like boasting, who say funny jokes, who always has a lot of stuff pocket, etc.. In short, the children have their own strengths and weaknesses. When you know a child, you will know he is a kind of person. They rarely disguised himself into another person.

This capability can help you simplify and speed up the negotiation process, because you do not play the first insight into what role the other side, do not try to get to the bottom of their intrinsic motivation or intention is.

If you can do to keep themselves and make sure that other people believe you are what they seem, then people will believe that it is because of you that matters to progress very smoothly.







Recommended links:



SHANGHAI 10 career professional orientation fuzzy confusion baked the first place



flv to Mp3



convert 3gp to wmv



Storage Telephony



HP and Novell reach a new exclusive alliance agreement



f4v converter



Photoshop mouse painted Illustration major combat (3): Draw Butterfly



Using Photoshop Background ERASER Easy Matting



BenQ competing against the SHINING 2008 SEPG Conference



How to deal with VAT ACCOUNTING



Video file converter



Hot Registry Tools



FREEHAND instance - Drawing Football



AMD switch to heat: between fundamental to the king of Wu-Soft international Cisco Rong Jin



Fun Chinese Version Of Firefox Mode Conversion Work Great Transfiguration Entertainment



Sunday, July 25, 2010

Some feel the use of multimedia courseware



The use of multimedia technology in the modern teaching are nothing new, and I tried so many times in teaching, this year I took a small class teaching in small classes in various activities, try to use multi-media courseware, I have some new feelings:

1. Courseware material image of the need to be lovable. Because younger children prefer some lovely realistic image of teachers in the design of courseware should take this into account when alone oral preaching does not work, the focus for the activities and difficulties appear to have been as much as possible in the courseware vivid appearance, meet the children's understanding.

2. Courseware to be closer to the lives of children in small classes. In the past in the design process, we pay more attention to the transfer of scientific knowledge, but practice it, I found that many children of small age are not interested in these, and they all look, do some performing more interested in performing these areas, because " experience "is the old children the most direct way to acquire knowledge in the choice of content from the old children to avoid the contents of life.

3. Courseware presentation time should not be too long. In actual operation, we also found that, although multimedia courseware for child care has a certain appeal, but more than a certain time, their attention will also shift, so we should pay attention in the design of courseware courseware content and teacher explanation, questioning the interaction, so as to truly play the role of courseware.

In the specific practice, we will encounter many problems naturally, as long as we are good at in the review and summary of activities, I believe we will play a more multi-media teaching unexpected results!







Recommended links:



How to compile kernel



COMMENT Active X



AMD switch to heat: between fundamental to the king of Wu-Soft international Cisco Rong Jin



Mp3 to m4a converter free



Flash highlights Examples of forms produced (6)



Accounting And Finance BRIEF



Ten Rational Unified Modeling Elements [3]



Converter Flv To Mp3



M4v to flv



2007, Han Is Not The Only



CSS Syntax Guide (5) Color and background Properties



PTC Announced The Listing Of CADDS 5i R14



What Is the ARP protocol? How to guard against ARP cheating Trojan?



.mkv file



Saturday, July 24, 2010

PowerBuilder menu creation



Chapter VII of the menus, toolbars and status bar
Application menu is an important means of dealing with customers, a good application should interact as much as possible through the menu. It can also be toolbar buttons and menu commands associated with them, more convenient and efficient implementation of the menu above command. Status bar generally appears in the bottom of the window, prompt the user to use the program's methods, and some of the current system state. This chapter will be presented about how to create and use menus, toolbars and status bar of the relevant knowledge.

7.1 Creating the menu

To introduce the menu of the operation, first introduced under the previous process of creating a new application object MENU-SAMPLE.

In PowerBuilder, the menu for each menu item is an object, each menu item can also have child objects, then on to create a new menu.

Click the MENU button on the toolbar POWERBAR, the system dialog box pops up SELECT MENU, choose from the menu to open an existing object.

Click the NEW button to create a new menu object. System used to define the pop-up menu MENU drawing board (Figure 7-1), drawing board in the MENU BAR 99vEMS MENU column enter the first menu item entitled FILE, can be found at the drawing board to the right column system MENU 99vEM NAME automatically enter the FILE menu to the object just named the M-FILE.



Figure 7-1

Note MENU drawing board in the "MENU FOR:" section, where you can define the object currently selected menu, FILE menu here is the object of a sub menu item. Here may wish to enter a sub-menu item EX99v, for the FILE menu on the definition of the sub-menu item,

Next, click the MENU canvas upper right side of the horizontal scroll bar arrows, began to define a second main course individual, may wish to enter the menu item's name to OPERATE, OPERATE menu, and then define the first sub-menu item set to BEEP.

Click the TAB key on the keyboard, the system pops up a new column OPERATE menu item used to define the second sub menu item, enter here the name of the second sub menu items for the COLOR,

Click NEXT LEVEL PAINTERBAR toolbar button, we can define its COLOR cascading menu item menu item menu item here is the so-called cascade COLOR menu item click the menu item will pop up the right side of the sub-menu menu item. Enter in MENU FOR COLOR menu item of a first cascade menu item to BULE.

Press TAB key, then enter the second cascade menu item for the WH99vE, then a similar way to enter the third cascade menu item is YELLOW.

The definition of the dishes in the individual, then click SAVE PAINTERBAR toolbar button, pop-up dialog box to save SAVE MENU designed menu object, There is no harm to the menu named MYMENU, and then click the OK button, so that good on their menu to create the object.

The menu of some of the basic operations, such as Insert menu item, delete menu items, menu items such move of more simple, is not presented here.







Recommended links:



Some knowledge OF JSP syntax



avi to Mp4



Using Photoshop Background Eraser Easy Matting



Professional DVD to FLV



Expert Math And Scientific Tools



Christmasgift Mobile CONVERTER



Best E-Commerce



Who hindered knowledge sharing?



Flv to 3gp converter free download



Ever CDA MP2 DVD-Audio to CD-R Ripper



Comment Recreation



WorldCup DVD Editor



China's environmental satellite data



.ts Files



Adventure And Roleplay Reviews



Youtube FLV To 3G2 Products



M4v



Thursday, July 1, 2010

How-to DAT Converter

How-to DAT Converter - A fast DAT video to DVD VOB Video converter which can convert and burn DAT, AVI, MPG, MPEG 1/2/4, WMV, MOV, MP4, RM, RMVB, DivX, Xvid, ASF, 3GP, Youtube FLV to DVD VOB VCD SVCD easily. With this DVD VCD SVCD converter, you will know how to make a DVD video. You can use it to convert and burn DivX, Xvid, AVI, MPG, MPEG 1/2/4, WMV, MOV, MP4, RM, RMVB files to DVD with chapter Menu. With that, you can convert downloaded videos and burn files into DVD, which means Internet become the storehouse of your home theater! Get Free download now!

How-to DAT Converter - What a powerful and attractive DAT, AVI, MPG, MPEG 1/2/4, WMV, MOV, MP4, RM, RMVB, DivX, Xvid, ASF, 3GP, Youtube FLV to Video converter. This software can burn DivX to DVD and convert DivX to VOB and finish all your tasks with the fastest speed possible and the best quality available. No one will ask how to make a DVD video anymore once they try this great DivX to VOB converter. We highly recommend this program because we think it will make your multimedia life a lot easier and more enjoyable. It allows you to specify NTSC or PAL format, adjust 4:3 or 16:9 video aspect, and burn either DVD disc or ISO file. By setting bitrate and framerate, you can get excellent quality on TV screen. Just free download and enjoy it right now!



Recommand Link:



PSP Movie Creator Pro 3.62



Youtube To MOV Guide



youtube to IPOD



Happiness YouTube to PS2



News about Astronomy



WorldCup DVD to SWF



Art - Screen Savers Storage



Youtube to Palm OS ONLINE



Youtube FLV to PS2 Deluxe



Virtins Pocket Oscilloscope



DOWNLOAD video to Sony NWZ-E443K soft



Ever MP3 DVD-Audio ID3 To OGG Creator



Recommend Network And Internet



Convert video to iPod Nano 5Gen