C#揭密II

C#揭秘 中文版 相当精典的C#书籍,百读不厌,值得经常翻阅,money不多的下吧 立即下载
 
C#揭密II(大师们在说些什么?)
C#揭密II(大师们在说些什么?)
先声明这篇文章属于收藏性质的,推荐给那些喜欢dotNET技术的爱好者。
这之前我曾转载了OReilly的一篇关于C#的访谈录。OReilly一向以技术和评论公见长,他们的编辑一般都有着很深的技术背景和功力(所以出的书也比较贵haha),所以那篇着重整个流行技术,有不少是和Java相关的;而这一篇都是MS内部的几个高手在交谈聊天,涉及的范围比上次的专访要广,里面有一些很新奇的术语和许多问题的观点。另外我认为这篇文章对以前非常熟悉COM+、ASP和Window DNA(N 层结构)的人目前评估和思考向新的dotNET体系迁移都很有帮助。
Anders Hejlsberg是个很奇怪的人,从他身上你感觉不到一个程序语言创始人那种对某种语言偏爱的狂热,却很容易感觉到他所透露出的那种对技术对程序语言的坚定和深厚理解。很喜欢他在上一篇访谈录中说的一句话:“Language is a funny thing: Its a matter of taste. Language is almost a religious thing, and its a lifestyle choice for programmers。”不过我知道这句话说的不是他自己。这篇文章中还有好些人:Brian Harry,Peter Golde ,Scott Guthrie(ASP老怪),Mark Anders。有了这些人,Microsoft有福啊。

小气的神
2001.09.24

 


Conversations on .NET

Derived from on-line chats with our early adopters, a series of conversations with Microsoft engineers, designers, and developers look at issues involving C#, ASP.NET, and the Common Language Runtime. 
 
Summary: What follows is a series of conversations with Microsoft engineers, designers, and developers, looking at issues involving C#, ASP.NET, and the Common Language Runtime. (10 printed pages)
A Conversation with Anders Hejlsberg and Peter Golde on C#
Anders Hejlsberg is a Distinguished Engineer in the Developer Division at Microsoft Corporation. He is the chief designer of the C# programming language and a key participant in the development of the .NET Framework. Previously, Anders was the architect for Visual J++ and the Windows Foundation Classes.
Peter Golde is a Software Design Engineer in the Developer Division at Microsoft Corporation. Peter has worked on development tools at Microsoft for over 10 years, contributing to products such as Microsoft C, OLE Automation, Visual Basic, Visual Basic for Applications, and Visual J++.
Q: Peter , you attended the ECMA meetings in March. Can you disclose anything about whats going on there that is new?
Peter Golde : Sure. As some of you may know, Microsoft, Intel, and HP jointly submitted two specifications to ECMA for standardization via the ECMA process. These two specifications are the C# language and the common language infrastructure (CLI), which is a subset of the .NET Framework. Were meeting with a number of companies every month as part of the standardization process. Its difficult to predict the schedule with absolute certainty, but we hope that E CMA will be able to complete standards for both parts by the end of 2001.
Q: How does the CLI compare to the CLS and the CTS?
Anders Hejlsberg : CLS stands for Common Language Specification, CTS stands for Common Type System. The CLS is a specification of what features any programming language implemented on the .NET platform must support.
Q: OK, the CLS is less than the CTS. Where does the CLI fit?
Anders Hejlsberg : The CTS is basically another word for the type system in .NET, i.e. a specification of what a class, struct, enum, or such is. CLI is really just another word for the large subset of the .NET Framework that we submitted to ECMA.
Peter Golde : The CLI includes the CLS and the CTS.
Q: Anders , after your work on Turbo Pascal , Delphi , Visual J++ and now C#, how do you see programming languages evolving today?
Anders Hejlsberg : Jeeez, had to ask an easy one, eh? I guess Im becoming less and less of a believer in revolutionary approaches to language design. It really is amazing how much the capabilities of computing have evolved, yet were basically still using the same kinds of programming languages. It gives me hope that we can go even further with an evolutionary approach where we dont just invalidate all the work that went before.
Q: Have you thought much about moving toward an intentional programming model?
Anders Hejlsberg : Cant say that we have. As I see it, one of the problems of intentional programming is that youre basically creating a new programming language for every domain specific application. I really am more of a believer in having a core set of abstractions (such as classes, methods, properties, and events) and then applying them in each domain—but in a way that preserves familiarity.
Q: Customers looking at the .NET Framework for their application development efforts have asked whether or not the common language runtime (CLR) is a virtual machine (VM), and if so, what limitations or penalties associated with VMs (performance and so forth) will folks need to consider in their efforts?
Peter Golde : Yes, I think that the CLR can be considered in the broad class of things that one might call a VM. As to performance, though, I dont think that this classification says much of anything interesting about performance. You should judge performance by measuring performance on the applications that you are interested in. Dont try to prejudge performance based on your preconceptions about what will and wont be slow—just test it!
Q: Peter , are there any kind of applications that you would explicitly not build on the CLR due to issues with running managed versus unmanaged code?
Peter Golde : In terms of what applications I wouldnt write, I would say that "hard real-time" kinds of programs probably wouldnt be a good fit (at least right now), because we dont make very strong guarantees about the garbage collector, things like robot control and the like. There are real-time friendly garbage collection algorithms, so I dont think this would be a limitation forever.
Q: Can you discuss any advantages C# would have over Visual Basic (VB) in terms of the framework?
Anders Hejlsberg : Regarding C# vs. Visual Basic, it really primarily comes down to what you already know and are comfortable with. It used to be that there was a large perf difference between VB and C++, but since C# and VB.NET use the same execution engine, you really should expect the same perf. C# may have a few more "power" features (such as unsafe code), and VB.NET may be skewed a bit more towards ease of use (e.g. late bound methods calls), but the differences are very small compared to what they were in the past.
Q: Ok, can you contrast C# with VB.NET? Questions usually come in the form of "I know you guys say VB.NET and C# let you do the same thing, but C# was designed for the CLR, so I dont believe you when you say VB.NET is just as good."
Anders Hejlsberg : Regarding C# versus VB.NET, the reality is that programmers typically have experience with either C++ or VB, and that makes either C# or VB.NET a natural choice for them. The already existing experience of a programmer far outweighs the small differences between the two languages.
Q: It has been said a few times that C# is the language designed for the CLR. Considering that all the languages that Microsoft will ship with the VS.NET will be able to target all the features of the CLR, what makes C# more CLR "friendly" than the other?
Peter Golde: I dont think that C# is necessarily any more friendly to the CLR than other languages. The CLR has been designed to be accessible via multiple languages. However, you will probably find that C# is more strongly focused on the CLR than other languages like C++, which have a number of other facilities that are less oriented toward the CLR. By designing C# in conjunction with the CLR, we have the "luxury" of not having backwards compatibility constraints.
Q: Is there any difference between the DEFAULT Equals function (implemented in Object) and the =?
Anders Hejlsberg: For two reference types (classes), the default Equals() method is the same as ==. But for value types (structs), there is no == operator unless you provide an implementation in the value type.
Q: Is Lock (this) similar to the synchronize key word in Java?
Peter Golde : Yes, lock (<expression>) is extremely similar to synchronized (<expression>) in Java. We dont support the notion of a modifier on methods, because our experience is that it leads to deadlock or poor performance in too many cases.
Q: We mostly want the COM+ benefits of memory caching, independent process space, etc.; we dont need to worry about database transactions. Is this a valid reason to place CLR components into COM+, or is it better to just let the CLR handle it?
Anders Hejlsberg : I would look at .NET Application Domains and not use COM+ in that case.
Q: Can you elaborate on .NET Application Domains?
Anders Hejlsberg : Sure. An Application Domain is sort of like a light-weight process. Two application domains will share the same GC heap, but the CLR provides automatic and transparent marshalling between the application domains. It allows you to protect light-weight processes from each other without taking the fairly large overhead of an OS process.
Q: Is the Application Domain a similar concept to the Java Package?
Anders Hejlsberg : No, a Java Package is a different thing. The closest analogy in .NET is an assembly.
Q: What are the plans to allow C# code to run on a PocketPC?
Peter Golde : Weve announced that well have a ".NET Compact Framework" that will be optimized for portable devices. Obviously there are limitations in terms of the scope of the class library, memory limitations, and so forth compared to the desktop or server. I should add that one of the focuses of the ECMA standardization work is to standardize a library framework that is appropriate in size and scale for portable devices. There is obviously a large amount of interest in this from many companies.
A Conversation with Mark Anders and Scott Guthrie on ASP.NET
Scott Guthrie co-founded the ASP.NET Team and leads the design team responsible for architecting the product. His individual technical contributions include: ASP.NET Web Forms Page Architecture, ASP.NET Web Services Infrastructure, ASP.NET Compilation System, ASP.NET Distributed Session State Infrastructure, ASP+ Deployment Architecture, ASP.NET Reliability System, and the ASP.NET HTTP Runtime Architecture. Prior to ASP.NET, Scott was a member of the IIS and Windows NT teams.
As the Microsoft Product Unit Manager of the .NET Framework, Mark Anders leads the team that designs and develops the .NET Framework, including ASP.NET, Windows Forms, Base Class Libraries, and other class libraries. Prior to this, he co-founded the ASP.NET team and held lead positions in program management as well as development.
Q: Scott , Mark , if you had to pick one thing, what do you think is the single coolest developer feature of ASP.NET?
Mark Anders : Well, Ill tell you the feature that gets the most applause: its tracing! Seriously, its almost a spontaneous standing ovation. One guy who I showed it to said that it was "the coolest thing Ive ever seen." (Note, I wouldnt go that far!) Actually, my favorite feature is server controls.
Scott Guthrie : I think the partial page output caching feature that we are going to ship in Beta2 is probably the coolest developer feature, because it can dramatically impact the performance of literally any site. The xcopy deployment features (no restart on DLL updates) we have I think also are pretty close.
Q: Tracing is a great feature. One of the questions we get a lot: is there any penalty for having all the tracing code but turning it off when going into production?
Scott Guthrie : There shouldnt be any noticeable performance difference when tracing is turned off (but code left in). One thing to keep in mind, though, is that if you have expensive "trace calculations" that you output as part of tracing, then you should scope it within an "if (Trace.Enabled = True) Then" block. When tracing is turned off, "Trace.Enabled" will return false
Mark Anders : Note that we dont gather all of the statistics if trace==false.
Q: Could you discuss the security of the config files. I have seen a lot of concern that since they are simple XML files, they can be hacked into easily.
Scott Guthrie : We do block all access to the config files from remote users. However, I think the concern people have is whether a rogue user who gets access to the config file can modify and take over things. Note that this problem exists with ASP today as well, in that the metabase APIs can be written to, which would effectively do the same thing. However, there are some things that you can do to reduce this problem. Specifically, with ASP.NET we support the ability to "lock down" settings at a parent directory. For example, you might want to lock down the security identity of the worker process (i.e.: the username it runs under) at the machine level and then restrict sub-applications abilities to override it.
Q: I see confusion as to whether to mimic the Windows DNA model by creating ASP Presentation interfaces talking to COM+ components, or in the .NET era to just write code behind and stick Dynamic Link Libraries (DLLs) in the /BIN and be done with it.
Mark Anders : I would say that services provided by COM+ are still required if you want transactions. However, the model of using DCOM to put components on another box and scale out that way is not recommended.
Scott Guthrie : In general I would recommend continuing to logically partition your application code (which was one of the things Windows DNA suggested). For example, putting all of your data access logic within modular classes that you then call them from pages—like we do from the IBuySpy applications. ...In general, you shouldnt use COM+ transactions unless you are actually doing distributed transactions across multiple data store machines. If you are just updating a single database, then leverage the transaction capabilities within it.
Q: What if you are planning on using remoting to communicate between our first and middle tiers, and youve only gotten C# working? Are there any known issues today with using remoting to communicate from ASP to Visual Basic (VB)?
Scott Guthrie : There shouldnt be any problems doing remoting from VB (like C#), although you should be a little careful about how to use remoting. In many cases it is best not to do the extra network hop. There is a big performance penalty to going to the other machine, so you shouldnt look to do it for either performance or scalability reasons. It does make sense if you are connecting to a different application or data center, where for org/technical or political reasons you need code to run elsewhere.
Q: What if you want to use it to communicate from Web servers that are hosted at an outsourcer across a firewall back to the network where the databases are? For security reasons, we wont put the database out in the DMZ.
Scott Guthrie : One other possible solution you might also investigate for that would be to leverage ISA (Internet Security and Acceleration) server, where you would put ISA in front of the firewall, and then ASP.NET and the database behind it. We actually just finished doing some benchmarking numbers with that solution and saw really great results. It is also really easy to set up and administer, and might be easier to ultimately deploy and manage going forward. One nice thing about ISA is that it doesnt require any ASP.NET code changes to leverage it, so it is pretty easy to try out and evaluate.
Q: Could you comment on interoperability (via Session Objects, Query Strings, etc.) between ASP and ASP.NET? Any gotchas?
Mark Anders : There are a few. First, weve made the object models as close as possible. However, if for example you store COM objects (not new CLR objects) in sessions, and you want those to be out of proc, they wont work. You need to have new objects that can be serialized. One thing to note is that ASP and ASP.NET will run side by side on a box, because at an application level ASP and ASP.NET do not share sessions.
Q: Ive seen a lot of concern that data can be passed page to page (ASP to and from ASP.NET).
Mark Anders : Since we really use standard Web techniques, passing info page to page should not be a problem. However, page to page in ASP and ASP.NET typically assumes services that are provided by each, such as session and application state. These services are not shared, and so you cant rely on them.
Scott Guthrie : I have a list of things you can do to ease migration of ASP code to ASP.NET.
1.                  Use only a single language within the ASP application. Dont intermix VBScript and JScript together in the same page (in general a bad programming practice with ASP, but also a migration issue for ASP.NET in that we now require only one inline <% %> language.
2.                  Explicitly declare all of ASP page functions within a <script language="VBScript" runat=server> block as opposed to <% %> blocks. In ASP.NET we no longer support this later function declaration option. It is just a copy/paste change in order to fix I
3.                  Explicitly use VBScripts "Option Explicit" keyword at the top of every ASP Page (this will become the default with ASP.NET and will also ensure that you write slightly better code today).
4.                  Use the "Call" keyword anytime they call a subroutine in VBScript today (for example: "Call FooBar (1, 2)"). This will enable/require them to wrap parenthesis around all subroutine arguments (if you dont use the "call" keyword, then VBScript today will raise a compilation error if you have parentheses). In VB.NET, parentheses are now required (note that the "call" keyword is still supported in VB.NET). So if they didnt use the "call" keyword, theyd have to go back and change all subroutines.
5.                  Avoid relying on "default properties" in VBScript, and instead fully qualify property references: (For example, with an ADO Recordset write: rs("a_name").Value instead of just rs("a_name")). Default properties are no longer supported in VB.NET.
6.                  Avoid using "render function" tricks (a specific unintended hack/trick that people can use in ASP but which was never intended as a feature). Instead explicitly use Response. Write blocks when constructing render functions.
Q: Scott , are there any estimates on the time needed to migrate a project from ASP to ASP.NET? Ive seen a rough number of 5 percent of the development time to migrate a VB 6 project to VB.NET.
Scott Guthrie : I actually dont have any good time estimates. Its going to depend somewhat. In general, if you follow the ASP coding suggestion I posted above, then I think the porting effort should be pretty minimal (a day or two for even complex apps)
A Conversation with Brian Harry on the Common Language Runtime
Brian Harry is the Product Unit Manager for the Common Language Runtime. He has contributed to the design and features of the CLR from its very beginning, serving first as Development Manager and then as Product Unit Manager. Before the Common Language Runtime, Brian worked on SourceSafe and the Microsoft Repository. He joined Microsoft in 1994.
Q: We have heard a lot about possible support for generics in future versions of the runtime. Can you explain your current thinking about generics, and how they might be used i.e. functional languages, templates etc.?
Brian Harry : We have had an effort in Microsoft Research for over a year to design and implement generics in the Runtime. The research team has, in fact, already implemented generics in both the Runtime and the C# compiler. The product team has reviewed the design and implementation and is generally happy with the approach. It is similar to the implementation we have for arrays. Youll note that arrays are a form of generic (or parameterized type).
Q: Is the CLR for NT4 and Windows 2000 a fully self-contained module for deployment purposes? In other words, does it upgrade IIS on NT4 and supply all the elements needed as a fully self-contained entity?
Brian Harry : No, the CLR does not redistribute many other pieces of the operating system. We will have a set of pre-requirements that will specify the OS service pack, version of IE, etc. There will be a .NET Framework redistributable that is pared down from the SDK by quite a bit.
Q: What is the relationship between the CLR and the CLI thats been submitted to the W3C?
Brian Harry : The CLI is a specification for many of the core designs that the CLR implements. In addition to the CLI specification, the CLR implements many Windows specific features like COM interop, Windows Security Policy, Windows Forms, etc.
Q: Where are we in the ECMA process?
Brian Harry : We are working with the technical committees to refine the specifications for submittal. This is a fairly long process and involves a lot of input and consensus building.
Q: Please explain how Long and Short Weak References work and the usage scenarios for both.
Brian Harry : The differences between long and short weak references are when the object reference inside the weak reference gets nulled out.
Q: So if the reference is held after GC then it is considered long?
Brian Harry : For short references, the contained reference gets nulled out as soon as the object is deemed unreachable. This is ultimately more performant because we remove the reference sooner. Long weak references are nulled after the object has been finalized.
Q: What benchmarks have been run comparing the CLR to native code?
Brian Harry : We have run a large set of benchmarks comparing the CLR to native code and are still measuring and tuning performance. We have broken benchmarks down into a variety of categories, including: Web, rich Windows apps, Benchmarks and micro benchmarks. For Web we have compared mostly to ASP and a bit to JSP. ASP.NET proves to be substantially faster than both in almost every scenario. For rich windows apps we have taken a variety of forms-based apps and have focused on tuning working set and startup time. We have also done a variety of benchmarks like Spec 95, Spec 2000, Bytemark, etc.
Q: There have been a lot of questions about running transactions on the .NET platform. Care to comment?
Brian Harry : We fully support transactions on the .NET platform. We fully support the COM+ Services and have worked hard to make sure that writing CLR components is the best way possible to write software that takes advantage of the COM+ services.
Q: Is there a lot of sample code for leveraging transactions from within .NET code?
Brian Harry : Indeed, there are quite a lot of samples of using all of the COM+ services available. Some are in the SDK and some are on gotdotnet.com
Q: If I utilize COM+ on Windows 2000, will the CLR enable COM+ like functionality on NT4 or will some sort of MTS interop have to occur?
Brian Harry : We have not done anything to move COM+ Services to NT4. MTS is on NT4 and there have not been any recent updates to that code.
Q: Tell me about deployment of the CLR and Whistler—will it be native (in the shrink-wrap)?
Brian Harry : We have been looking at the schedules to decide whether the .NET Framework could ship with Whistler. No decision has been made, so I have nothing to announce.
Q: I am interested in your opinion of distributed transactions (two phase commit) over Web Services?
Brian Harry : My opinion is that you should not, in general be doing DTC style 2 phase commit across Web Services. I am not the expert on this, but Web Services were designed for loosely coupled computing and compensating transactions is a better approach to this style of application. That said, it is possible to build a tightly coupled app over web services, it just wasnt the design point.
Q: So if you need to span a transaction across two Web Services calls, use a compensating transaction on failure?
Brian Harry : Yes, that is my opinion, Id be interested in what the COM+ Services team has to say about that, but I believe they would agree with me.
Q: Idempotent transactions then?
Brian Harry : Im not sure what you mean by idempotent transaction. What I mean is a transaction that can be reversed.
Q: Can you talk about features of the CLR that help high volume applications run faster and more stable than our existing platforms? For example, memory allocation appears to be rather streamlined now that GC is in the picture.
Brian Harry : There are several aspects to the .NET Framework that help improve reliability and scalability. Starting with things like the built in thread pool, easy asynchronous programming, the general approach of a stateless server programming model that enables scale out, the ASP.NET process model that enables process recycling, auto restart, etc.
Q: I know that was a pretty generic question. Can you talk a little bit more about the built-in thread pool?
Brian Harry : The CLR has a thread pool that has been heavily optimized to cooperate with the GC and the managed environment. It has a very simple and approachable API but is very powerful. Further we are strongly promoting using the thread pool, especially in server apps rather than spinning up application threads to process work loads. Using the thread pool will result in a much more scalable application
Q: What exactly do you mean by "easy asynchronous programming."
Brian Harry : Easy asynchronous programming. I mean, there is a well-established design pattern, our frameworks expose it where appropriate, we enable many modes: callback, polling, subsequent block for completion, etc. Also, you can use asynchronous delegates to easily turn any API into an asynchronous API.
Q: How is interoperability testing going with the CLR being installed onto a system with many other apps already installed—Office, Visio, etc.?
Brian Harry: At a lower level type safe code helps reduce memory leaks, eliminates dangling pointers and deployment issues, all helping contribute to more reliable applications. We are thoroughly testing internally in every configuration we can imagine. Further, we are doing a VERY wide beta program. Recent data I saw showed that the .NET Framework Beta1 had reached almost 1 million people.
Q: What are the definite "no-nos" for developers writing to the CLR?
Brian Harry : Hmmm, most of the no-nos are the same as always—dont allocate too much memory, dont write n^2 algorithms, etc. The main things that are added, are you need to be careful where your managed/unmanaged boundaries are and how many times you cross them. You also need to be aware of security checks. Too many can kill your perf so you need to design for them.
Q: Can you comment on the CLR on other non-Windows platforms?
Brian Harry : We have a product under development called the .NET Compact Framework targeted at devices and designed to be very portable. We also have submitted the core specs to ECMA and expect to get a lot of cross platform implementations as a result of that.
Q: Are there design considerations for those writing applications to the CLR to make it easy to run on Starlite? Im thinking architecture of the applications to make it easy to have a CLR version and a read-made Starlite version? "Ready-made" type.
Brian Harry : Yes, the .NET Compact Framework will have a subset of the overall .NET class libraries (in order to keep the size down) but it will also include device specific features (like wireless APIs). You can either write an app that targets .NET compact framework, leveraging the device APIs, or you can write one that targets the intersection with the desktop. I believe the docs will help you identify this intersection.
Q: In reference to string manipulation, it appears that we can no longer directly manipulate the buffer in managed code. For example, string[0] = a. Instead we do something like string.Replace(0, a) and get a new string back.
Brian Harry : Yes, the reason for this is that strings are immutable. This makes for a simpler programming model and eliminates problems around synchronization and sharing of strings. In some cases, it allows us to give better performance by avoiding copying strings.
StringBuilder allows you to modify the string in place. A string builder can be converted to a string and then it becomes immutable.
Q: Does this mean if I had a member variable that is a StreamReader, I will need to implement it to be able to call the StreamReaders close method?
Brian Harry: StreamReader—It will depend on how your class is used, but if you are exposing it out to arbitrary clients, then yes you might want to.
Q: Under what conditions do I need to implement Idisposable.
Brian Harry : A class should implement IDisposable if it encapsulates "limited" resources. Examples are: window handles, file handles, database connections, etc. Anything where the user of the resource needs to be able to free itpreemptively.
Q: A related question is why do you really care about resurrection, i.e. getting the object back to life once it has died?
Brian Harry : Actually, I dont care about resurrection; it is a terrible thing in my opinion. It is somewhat of a necessary evil of the notion of Finalizers. We had a plan (which we may bring back in a future version) for something called "static finalizers" that would eliminate the possibility of resurrection.
Q: Is it true that deterministic finalization cannot be achieved because of resurrection, or am I mixing them here?
Brian Harry : No, deterministic finalization has nothing to do with resurrection. Resurrection is an issue after we have already run the finalizer. Deterministic finalization (as I have most frequently heard it used) has to do with not calling the finalizer at a well-defined point in time.
Q: Which brings us back to my question about when to use long and short weak references?
Brian Harry: Long/Short—As a general rule, always use short weak references. Only use long ones if you need to access the handle to find the object even during finalization. This is a very rare need. There are some caching schemes where this turns out to be valuable but I dont think I could describe them very well without spending a while to think about it.
199、影像技术 roadmap 规划:未来移动影像的技术趋势与芯片算力展望 本文探讨了未来移动影像技术的发展趋势与芯片算力规划。作者从实际案例出发,指出影像技术演进需平衡传感器、ISP、算力和功耗。文章分为三部分:1)传感器将从堆像素转向提升信息密度,重点关注双层晶体管结构、混合快门和多光谱技术;2)ISP架构将向可编程计算单元转型,强调神经网络加速、硬件化多帧融合和语义处理;3)芯片算力瓶颈在于数据搬运,需优化存算一体架构、专用DMA和统一内存。最后给出五点建议:避免盲目追高像素、重视持续功耗、平衡ISP灵活性、预留算力余量、加强传感器与ISP协同设计。作者强调,影像技术的突破在 阅读详情

相关推荐

高速串行信号仿真避坑指南:为什么你的SIwave Xnet设置了却不出结果?

本文深入解析SIwave中Xnet功能在高速串行信号仿真中的常见问题,包括模型缺失、网络不完整和端口设置错误等关键误区。通过详细的电路元件模型验证、网络完整性检查及端口配置指南,帮助工程师有效解决仿真不出结果的问题,提升信号完整性分析效率。

weixin_29218963的博客 258

C#揭密II(大师们在说些什么?)

C#揭密II(大师们在说些什么?)先声明这篇文章属于收藏性质的,推荐给那些喜欢dotNET技术的爱好者。这之前我曾转载了OReilly的一篇关于C#的访谈录。OReilly一向以技术和评论公见长,他们的编辑一般都有着很深的技术背景和功力(所以出的书也比较贵haha),所以那篇着重整个流行技术,有不少是和Java相关的;而这一篇都是MS内部的几个高手在交谈聊天,涉及的范围比上次的专访要广,里

ccBoy的专栏 1828

Krylov子空间与Arnoldi过程

一、应用背景 Krylov子空间方法是模型降阶(MOR)的一种,Krylov 子空间方法就是在Krylov子空间中寻找近似解。 二、Krylov子空间 n是原始矩阵的维度,m为降阶后矩阵的维度,通常m<<n。 三、Arnoldi 过程: 计算Km 的一组正交 对应上述MGS过程的python代码: import numpy as np def arnoldi_itera...

保持写作习惯,完成知识沉淀 6013

技术图文:C#语言中的泛型 II

C#语言中的泛型 I 知识结构: 6. 泛型接口 泛型类与泛型接口结合使用是很好的编程习惯,比如用IComparable<T>而非IComparable,以避免值类型上的装箱和拆箱操作。若将接口指定为类型参数的约束(接口约束),则要使用实现此接口的类型。在设计泛型接口时,我们需要注意以下几点: (1)一个接口可以定义多个类型参数,如下所示: public interface IDictionary<TK, TV> { //... } (2)可以用多个接口为类型参数指定接

老马的程序人生 1124

音频功放电路大全

作为硬件工程师,特别是做纯粹模拟电路、应用于音频功放的工程师,对于A类,B类,AB类,D类,G类,H类,T类功放应该特别熟悉。大多数工程师或许只知道其中的一部分、或者知道大概,为了让更多的工程师掌握更加详尽的音频功放知识,下文对以上说的音频功放做详细的说明。 功放,顾名思义,就是功率放大的缩写。与电压或者电流放大来说,功放要求获得一定的、不失真的功率,一般在大信号状态下工作,因此,功放电路一般包含电压放大或者电流放大电路没有的特殊问题,具体表现在:①输出功率尽可能大;②通常在大信号状态下工作;③非线性失真突

ltqdxl的博客 6608

VMware ESXi +DELL虚拟化存储磁盘容量处于紧急状态问题的处理

1、环境介绍 exsi server两台(DELL R730 ): 192.168.3.206 VMware EXSi6.5 192.168.3.207 VMware EXSi6.5 磁盘存储柜一台(DELL SC2000): 192.168.3.208 2、故障处理 由于前期规划的卷空间过大,虚拟机文件逐年增大以后,造成卷的磁盘占用过与整个磁盘空间的容量,虚拟化平台可用容量爆掉,DELL SC2000自动切换到紧急状态,禁止所有磁盘I/O,exsi主机上的虚拟机无法开机 首先,安装

wolf1105的博客 3538

C#揭密II(大师们在说些什么?) (转)

C#揭密II(大师们在说些什么?) (转)[@more@]C#揭密II(大师们在说些什么?) 先声明这篇文章属于收藏性质的,推荐给那些喜欢do.NET技术的爱好者。这之前我曾转载了O'Reilly的一篇关于C#的访谈录。O'R...

csd3176的博客 214

Win11任务栏图标消失?快速恢复指南

任务栏图标消失是Windows 11操作系统中常见的问题之一,但通过上述方法,用户通常可以轻松解决这一问题。无论是重启Windows资源管理器、使用命令提示符修复、检查系统更新和设置,还是考虑重装系统,都可以帮助用户恢复任务栏图标的正常显示。希望本文的介绍能对用户有所帮助,让Windows 11的使用更加顺畅和愉快。

mmoo_python的博客 5423

IT文档 16

统计VB程序的运行时间编写个人Internet上网计费软件编写后台监控软件的技巧编写安全的SQL Server扩展存储过程编写支持多国语言的程序编写跨平台Java程序注意事项编写通用的ASP防SQL注入攻击程序编写通用的程序更新模块编写驱动拦截NT的API实现隐藏文件目录编程实现墙纸平铺/居中或拉伸编程实现拨号网络连接及FTP应用网络扫描器的设计与实现网络游戏外挂编写初级教程自制THyperLin

iamhere1956的专栏 403

InSAR_ISCE软件数据处理流程之:利用哨兵数据获取2015年尼泊尔地震同震形变场

ISCE软件数据处理流程之:利用哨兵数据获取2015年尼泊尔地震同震形变场 ISCE软件做干涉只需要将数据准备好,并配置好insarApp.xml文件即可进行。 一、数据准备 1、SAR数据获取 本利中使用的数据为欧空局提供的sentinel-1A/B数据,可从阿拉斯加数据服务器上下载,具体下载方法可参考: 哨兵数据下载方法. 2、哨兵卫星轨道文件下载 哨兵数据处理除了需要SAR影像外,还需提供轨道参数文件,可从https://qc.sentinel1.eo.esa.int/aux_poeorb/下载。下载

weixin_42128764的博客 1万+

实干派!网易易盾增强版滑块验证码,全方位讲解识别思路(含源码)

该验证码是异形滑块验证码中的一种,缺口旋转+偏移的处理需要你有很好的图像处理知识,能很好的处理透明通道,同时,该验证码需要你能很好的处理缺口和背景之间匹配的关系,该验证码的处理难点就是两个缺口之间如何找到正确的,两个检测框都有很强的相似度,且加上背景图的干扰,在图像处理和有优化上难度大大增加。

码王吴彦祖的博客 2022

IT文档 2

C++箴言:理解inline化的介入和排除C++箴言:视类设计为类型设计C++箴言:资源管理类的拷贝行为C++箴言:防止异常离开析构函数C/C++中的整型常识C/C++中的日期和时间CBuilder中帮助文件的连接及显示讨论COM应用软件开发技术COM组件转换成.NET组件CORBA技术及在Delphi中的实现C数值计算程序移植到VC开发环境C程式中关于整数储存的说明C语言初学者入门讲座 第一讲

iamhere1956的专栏 416

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

C#命名规范(参考)

两种命名方式: Pascal:每个单词首字母均大写 Camel: 第一个单词首字母小写,其余单词大写 1.Class命名:采用Pascal方式,不加任何前缀或后缀,在微软给出的建议中认为这些是冗余信息。 2.Method命名:采用Pascal方式,使用动词或动词短语,如Remove();或GetCharArray();等。 3.参数命名: 采用Camel方式,微软反对使用匈牙利命名方式,...

weixin_30527323的博客 238

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

做工业上位机,这个 C# 开源框架把 PLC 通讯、流程控制和 MES 对接都备好了

做产线设备上位机,工艺流程之外,还有不少基础功能要写。连接 PLC、断线重连、修改设备参数、查询报警、记录配置变更、设置按钮权限……换个项目,这些功能往往又得做一遍。这次想给大家分享的 IFA,就是一个把这些基础功能整理好的开源上位机框架。它基于 C#、WinForms 和 .NET Framework 4.7.2 开发,做工业自动化应用的宝子们,可以拿来参考,也可以在它的基础上继续开发。

三少爷的剑 207

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

学习C#开源报表组件Seal Report(46:LINQ数据源使用示例——Excel文件)

学习基于LINQ数据源从EXCEL文件中抓取数据的基本方式。

gc_2299的博客 213

C#开发HTTP服务端侦听GET、POST请求解析Json获取刷卡机上传卡号

本文实现了一个基于TCP协议的Windows Forms服务端程序,用于接收并响应客户端(如智能设备)的连接请求。通过绑定指定IP和端口开启侦听,支持多客户端并发连接,采用后台线程处理通信。服务端可解析GET、POST及JSON格式数据,提取卡号、设备信息等参数,并根据配置返回响应指令,包括显示内容、语音提示、蜂鸣器控制等。代码包含跨线程更新UI、中文编码转换、数据包解析等功能,适用于物联网设备通信场景。

55

ctfshow-pwn-unlink-堆溢出-143

ctfshow-pwn-unlink-堆溢出-143

2501_93884468的博客 205

(开源)助农销售系统实战指南 基于 C# + ASP.NET Core + Vue + MySQL

这是一个基于 ASP.NET Core + Vue + MySQL 构建的完整助农销售系统,功能持续优化中...用户登录 用户注册 商品信息 商品分类管理 商品信息评论 商家管理 商品订单 购物车管理 收货地址管理 我的收藏管理 用户个人中心 修改密码 找回密码 系统用户管理 系统配置管理

小小码农身兼魔法师职位!除你武器~ 314

在鸿蒙 PC 上原生跑通 Rust 编译器:不用虚拟机、不用交叉编译,官方 dist + 内核签名全链路适配实录

本教程完整记录开源录屏与 GIF 制作工具 ScreenToGif(原 C#/.NET 9 + WPF)在 OpenHarmony / HarmonyOS PC 上从零到跑通的适配过程:每一步做什么、遇到什么报错、怎么定位、改哪一层、如何确认生效。所有命令与报错均真实执行并留档,完整方案与证据见 (附录与验收报告)与 。适配没有搬运 C#/WPF 代码,而是「以 ScreenToGif 为行为规格」重新构建链路。界面层由原版的 WPF/XAML Ribbon 换为 ArkTS + ArkUI(Ribbon

m0_55927959的博客 1万+

C# Web API 第一课(上):一次请求的完整链路、7 个 HTTP 方法、模型绑定与路由,把 HelloApi 三个接口拆开看

步发生什么出问题时你会看到1客户端把拆成 host + path端口写错 → 连接被拒绝2TCP 三次握手连上 5078服务没启动 →无法连接到目标计算机3发 HTTP 请求行 + 请求头(+ 请求体)缺→ 4154Kestrel 解析,交给 ASP.NET Core 管道5路由匹配:找哪个控制器的哪个方法路径不对 → 4046方法匹配:GET 还是 POST方法不对 → 4057模型绑定:把 URL / 查询串 / Body 填进参数JSON 格式错 → 4008。

2501_94699871的博客 185

C# Web API 第一课(下):WinForm 用 HttpClient 调接口,中文乱码、端口对不上、跨域与 Swagger 的 10 个坑

上篇讲"服务端怎么把一个 URL 变成 JSON"——环境与模板、Program.cs 逐行、路由与模型绑定、七个 HTTP 方法与状态码。怎么用调通三个接口,以及那四个一定会遇到的坑——。

2501_94699871的博客 207

学习C#开源报表组件Seal Report(48:LINQ数据源使用示例——CSV文件)

学习基于LINQ数据源从CSV文件中抓取数据的基本方式。

gc_2299的博客 103

VS Code 配置 C# 开发环境(.NET 10 LTS)

本文详述如何用轻量级的 VS Code 与 .NET 10 LTS 构建高效 C# 开发环境。涵盖 SDK 安装(含离线加速)、扩展配置、项目创建、F5 断点调试及 NuGet 管理,全程实测可用。无需安装 Visual Studio,跨平台支持,适合现代 C# 开发,特别推荐新项目使用 .NET 10 LTS。

Joey 的工作空间~ 521
上一篇: 水仙花数算法
下一篇: C#揭密II(大师们在说些什么?)
咖啡色的浪漫
博客等级 码龄21年 16粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值