Anders Hejlsberg - Chief Architect at Microsoft

大数据学习-scala(1) 跟随王老师学习第一个课总结,scala基础知识:变量定义、if else、while、for、数组、map、函数定义 阅读详情

Anders Hejlsberg - Chief Architect at Microsoft

Anders Hejlsberg is the architect of the C# language and a Microsoft Distinguished Engineer. He joined Microsoft in 1996, following a thirteen-year career at Borland, where he was the chief architect of Delphi and Turbo Pascal.

1So Anders, tell us a little bit about your background, and what you do in Microsoft?

I am a distinguished engineer at Microsoft and I am also the chief designer of the C# programming language, and then I sort of have a dotted line relationship with the base class library team in the .NET framework where I do some architect work as well. I came to Microsoft about eight years ago and before that I was at Borland for 13 years and wrote the core of Turbo Pascal originally and then later worked as the chief architect of the Delphi product line.

2What made you wanna jump ship to Microsoft?

Thirteen years at one company in this industry is pretty much a lifetime and I was ready for some new challenges and to try something different. It has been a wonderful experience. It's a rare opportunity to be able to come to a big company like Microsoft and actually get to design a whole new programming experience, programing language. Microsoft put their weight behind it, of course it has been wonderful.

3So, C#, when the folks at Microsoft, the big leagues, came to you and said, Anders design for us our next generation language. What core principles, I mean what three things I guess, were really in your head as you sat down and designed out C# and what it should do and what it should not?

I think you have to put in context in what timeframe did this occur. At the time when we started .NET, the way people programmed the Windows platform at that time was COM and Active-X and DNA was the marketing thrust of all of all of that. It was not the most seamless programming experience at all times. There was a lot of debate in-house about how to make that experience better. Should we evolve COM or should we go to a new platform. There is always sort of the evolutionist and the revolutionist.

So I was definitively in the revolutionist camp, and after that sort of shook itself out and everybody agreed that no, we have to think bigger than just trying to jam classes into COM or whatever the idea "de jour" might have been. We also realized that to execute on this vision of increased productivity and web services and whatever, we needed a language that could appeal to the C, C++, Java developer crowd.

I think language is a lifestyle choice. I have actually been in this business long enough that I have become very agonistic when it comes to that. I don't try to persuade people that this language is better than the other. It is kind of like having a debate about whether French is better than English, it all depends on your point of view. So I certainly felt that that something that could appeal to the C, C++, and Java crowd would be a very valuable addition to our toolset. So some of the core principles then, some of them we inherit basically from .NET. The notion of a type safe execution environment with garbage collection, and exceptions, and guaranteed index checks on arrays and what have you. All of those things that the managed code brings you come from .NET, so to speak, but of course we wanted to be a language that fully envelopes that and just sort of takes that as granted, if you will, I suppose to try to pepper it on.

I think above that I always felt that it was important to have some conceptual simplicities in the language, and one of them that I think is fairly subtle, but I am really happy that we got in, is the unified type system. The notion that in C# you can just say everything is an object. You can start with that premise and then you can later delve into the sort of subtle differences between reference types, value type, but you can put anything in an object to begin with and the mechanisms, like boxing for value types, and so forth are all sort of technically interesting. But the broad simplification or the deep simplification you get by starting there, as opposed to say a language like Java, where you have to immediately up front say well there are classes and everything is class, except these eight guys over here that are specially blessed and only the language will do those.

TSS: Which in all fairness has caused Java programmers no end of angst.

Sure, and the sort of dichotomy between the built-in and the integer wrapping class, and so forth, and of course it looks like Java now is getting auto-boxing, but even so, after the fact it is hard to make it feel built in from the beginning, so that is one thing. I think the other thing is, again sort of a subtle concept, but the thing that we call components or component-oriented programming, the notion of the programming language giving first class treatment to all of the concepts that you use when you write components.

So anyone who has done any kind of development on a modern development platform like .NET or JAVA will be familiar with components that have properties, and methods, and events and attributes that describe how the components host themselves in the various environments and documentation that is built into the component and so forth. The interesting thing to note for example, if you compare us with Java or C++ is that, even though we all fully embrace the concepts of properties, methods and events, they don't actually all get first class treatment in the language. So Java has methods, but it does not have properties, you have a getter and a setter method and then you squint and it looks like a property.

But it is funny because in the language it is get blah and set blah, but when you are looking at property inspectors it is just blah. So there's that, and then events are emulated with interfaces and again you sort of got to squint, and metadata is done through beans and patterns, and if you don't know the patterns, you don't actually see that this is metadata. So we just sort of felt that, hey it is time to give first class treatments to these concepts, build them into the programming language. Lets not pretend that they are not worthy, because we use them everyday, there is value to be had. Yes, people can argue they are syntactic sugar, but everything in a programming language ultimately is syntactic sugar so just as long as it is good sugar.

TSS: As long as it tastes good going down..

So those are some of the core things, I would say maybe if I had to add one more it would be the pretty heavy emphasis that we put on interoperability with the existing platform, giving programmers direct access to COM and DLL entry points and not just telling them that this is a complete rewrite strategy, you have got to start from scratch or whatever. We realize that Moore's law has already long since passed us by. We will never fill all this capacity. The only way we can do it is by leveraging existing systems.

When I started in this industry, 64K was all you had right, you got to leave at least 32 of them over to the users, so really you only have 32 k. Back then it was like, hey, how long does it take to write a program that takes up 32 k? Well it goes pretty quick, right, so even at 640 k it coincides with the time that you would want to release the next product. So you could just start from scratch every time. You do it, do it as little bit better, forget that. The demands on software, and what people demand from us, has just far passed us by and we have to leverage existing systems, and that means, we have to take interoperability seriously.

4People have suggested that C# is sort of Delphi v2.0. Do you think that is a fair assessment? Is a lot of like breaking in the component model as part of the language, is a lot of that experience from having done some of the stuff with Delphi at Borland?

Well, there is no doubt that there is heritage from Delphi. Delphi has properties, Delphi has events and so forth, and if I have to go do it again, I still think they are useful concepts. So I would put into the next one too, if there was a next one. I think you learn from what you've done. You learn from your past mistakes, you know what worked and what didn't, and you keep the stuff that worked, and then you get rid of the stuff that didn't. Those are definitely things that worked and I think they are some of the things that made Delphi a great product.

Generics seemed to have been fairly important on your agenda of language items. C++ does not get semblance until 3.0 and Java does not get everything until arguably, the fifth release, now sixth release of Java. Why is generics so important? Why do we care?

Well, I think generics are, in a nutshell, all about providing even stronger type checking. To the extent that we can type check stuff at compile time, we can get better software because the errors are found sooner and faster. We can get better performance, because things that we can guarantee are true about the code, do not need to be dynamically checked at runtime. So those are some of the good things. The other thing I would say is that you get more expressiveness in the type system.

In a sense, it is not a completely correct analogy, but imagine that you had methods that could not take parameters. They certainly would not be as useful as methods that you write; or methods that could only take parameters of type object if you will, as opposed to methods that can take true type parameters and so forth. It is really what parameters do for methods, is what type arguments and type parameters do for types themselves. The ability to not just create a list, but a list of something, and you can say what that something is later, for example list of order, list of customer, list of T and so fort.

So that is sort of the core value proposition of generics. It has been an interesting project by the way. I chalk it up as one of our really nice success stories in working with Microsoft Research. All of the hard work of generics was done by Don Simon, Andrew Verde from MSR Cambridge. And even some of the work in the actual shipping product, they not only did the research but actually did a lot of work too to move it into the runtime. So it has been phenomenal stuff and it is great to see that there is that sort of cross bleed from research into the product groups.

TSS: Research guys are actually doing something concrete.

Yes, definitely. We are seeing some returns on that.

TSS: Excellent. That's good to hear. Awesome.

5We've seen C++ templates. When templates first shipped it was always stack of T, that was the big draw, and then we turned into the standard template library, and we turned into the traits, idiom and so forth. Do you think that there is more to generics, there is more emergent behavior in generics than just collections of T and was that going through your head when you sat on designed some of this stuff?

I think there is, with anything,first tier effects and those are the strongly typed collections that you talk about there. And definitely those are the ones that people in .NET will immediately see as being most beneficial;,list of T, dictionary K of column V and stack MQ and so forth. I think going further out you will see some second order effects that are somewhat more subtle, but one of the things that is really interesting about generics is that it allows us to be much more faithful in our representation of complicated object graphs.

Let's take sort of a business example. Let's say you have customers and orders and details right. If you model that with objects today, it is easy to have a customer, and is easy for the customer to have strongly typed properties and so forth, but then the customer also wants to have a collection of orders. The question is how do you model that? Well you could model it as an order array and now you preserve type. Now the compiler can look at it and follow the link and know that here are one to many and so forth right. But an array can't grow itself and does not have all the convenience methods, like Find(), and Sort(), and blah blah blah or Add(), that you would want on a collection like that.

So, the alternative you then have is you can put an array list in there, but now you lose the type. Or you can roll your own manually where you follow a pattern manually, but the compiler can't see through this pattern so to speak. Do you know what I mean? It is not like it is actually a part of the type system. So with generics we actually get the ability to faithfully model these complicated relationships, and once you do that then you can start talking about, gosh now that the compiler can understand this whole web of objects, well could we perhaps have set operations or queries or whatever that are strongly typed over all of the stuff, because now the compiler actually knows what is going on. Before it was kind of like you could not see the forest but the trees, but now, because the type system is richer, it opens up a whole sort of new avenue of interesting things that we can do. Some of it relates in some ways actually even to partial programming and whatever, and there are all sorts of more type inferrencing that we can do and these are the things that we are starting to think about and I think will be pretty fruitful going forward.

6You've talked a lot now in the last couple of minutes about type, and it seems that type seems to be pretty important in Anders' world, and I am sort of curious why you think the notion of the type system is so important? We're seeing a lot of loosely typed languages like some of the Groovy and some of the other scripting things and there seems to be a lot of traction there. Why do you think type is so important. What do I lose if I go to typeless?

It is interesting, because I see people talk about how types are overblown, and boy, you could do everything without types and just have untyped languages and unit tests and that is good enough. I don't really buy that argument. Let's take one example. One of the great things that types buy you is IntelliSense statement completion. Because we have a strongly typed language, because every variable and every expression has a type, we know what members of a particular type are, and we can show them in a list and filter them for you and we can give you help and guidance because of type. If we had no type, I mean we could sometimes guess, but sometimes we did get it wrong

7Can't we infer that from syntax? Can't I look at, you know, in terms of evaluation and so forth?

Sometimes you can. If you just assign to the variable on the line before, well then you can sort of guess what. If you pass that as a parameter, you have no idea what this incoming var x is. So sorry, buddy, on your parameters you don't get any help. If I have to say one of the great innovations certainly in programmer productivity tools over the last decade has been statement completion. It is just unthinkable that you would want a program without it today and honestly that is the reality you face in a typeless language, but that is just one thing.

There is also the ability to find errors up front that otherwise you'd have to wait to catch at runtime. There is the ability to provide better documentation. There is the ability to do all sorts of reflection tools and FXCop this new thing that we have, this tool that checks whether everything is coded according to conventions, without types that would be hard to do. So I think strong typing is a good thing. Now that said, strong typing is like security, it is a dial. If you dial it up too hard, the systems becomes unusable, so you got to find just the right setting somewhere in the middle, where there is still flexibility and when you want to do dynamics stuff like type fast and treat things as objects you have to have that ability too. So it is a balancing act. But I think just taking an extreme it is a trap because extremes are always interesting but I do not think it is particularly truthful.

8Do you think in the practical world of people getting stuff done, do you think there's room for multiple languages on a project? Do you know think I can take C# for where I need the strong typing stuff and pick, say JScript .NET where I need the loosely typed stuff or some other language? Do you think that is a viable option?

Absolutely. I mean, I think people do it everyday. They may not know that they do it, but they relay on components that were written by someone else in some other language and the notion that our platform supports multiple languages, I will staunchly defend this being a good and important thing for a variety of reasons. Like I said, first of all language is a lifestyle choice and some people just think better in one languages than another, and this is not just about VB or C#. It could be, I like these loosely typed languages and they give me capabilities,that otherwise I wouldn't have had. But I think also a multitude of languages is how progress gets made, that is how innovation happens. There is healthy competition between the various languages and something happens over there and you can pull it in over here. If there is only one language then well is that it, are we done or can we all go home? I do not think so.

9So what languages were going through your mind as you designed C#?

Many. I come from, of course, a very strong Pascal background. So that essentially is something that is burned into my backbone at this point. So anything in that family tree, Algol, Pascal, Modula, Oberon so forth, Then there is the C family of languages, so C, C++, Java. Then there is the object orientation that we've gotten from SmallTalk and now lots of interesting things happening in functional languages like LISP and Haskell and ML, and there is stuff in JScript that is interesting. There are so many languages that it almost impossible to just say that there were a few. It's the multitude of all of them.

10Now F# are you familiar with that?

Yes the project that Don Syme has been looking at.

11So the question becomes why as a guy who wants to ship software, why might I be interested in F#?

F# at this point is a research project that Don is looking at. It's really just sort of trying to take things from functional programming and imperative programming and put them together in a new way is really what it boils down to. Ultimately, it's interesting but at this point I would not start writing products in F# or whatever, that is not what it's about. It's more about like experimenting with new things that you want to do in the type system and in programming languages. But certainly, I would urge anyone who is interested to go look.

12When you were designing C#, how much influence did the design of the C# language have on concepts in the runtime and vice versa. It already is kind of accused C# as being the first among equals. Were you in a position where you could dictate to the runtime theme or were they dictating to you or was it kind of a give and take in both their actions?

I don't think anyone was dictating to anybody. We worked, of course, very closely together. I was involved in a lot of the design of the type system, and certainly, all of the unification of the type system. I was a strong champion for that on both sides of the table, be that in the runtime or in C# itself. Yeah, I mean C# is in the enviable position of not having, or at least was, not having any backwards compatibility to worry about and that makes a lot of things a lot easier. I will say in 2.0 we have bent over backwards to remain 100% backwards compatible. There are no more keywords, you can compile all your existing code without modifying anything. I continue to think that that is very important. I don't want to have to run an upgrade wizard or whatever in order to use the new features, it should just be seamless.

13Why is introducing a new keyword such a pain? I just never understood that.

Because if you have an identifier by the same name as that keyword, that identifier is now an error. So let's say that we had made the yield keyword. Well it is not actually a keyword. If you look at the way we design so yield is used by iterators in C# and there are two new statements, yield return and yield break. But the yield word in yield return is actually not a keyword, it is the identifier yield coming immediately before the keyword return that constitutes yield return, because that was never a valid thing to say before. But you can still have, in your financial application, a parameter called double yield, that is the yield of your investments or whatever and you will not break that code. It is very subtle, but you know, it is the real world right. If we tell people, hey your C# 2.0 upgrade today, and bam, the first thing that happens is all their code breaks and it is just not a happy experience. You really have to make sure that the barrier to entry is nonexistent.

14So we have talked a little about generics, which is obviously sort of the top of the list of features coming in 2.0. Can you give us a sort of a high level overview of what else is there?

Yes, certainly generics is the big thing. But there are lots of other new features. For example, anonymous methods, iterators, partial types, nullable types, which we talked about here at the TechEd for the first time, and then a bunch of smaller features than that such as static classes external aliases, names, alias qualifier, pragma warning etc., etc. Actually just in the compiler implementation itself better, error warnings, and performance improvements and so forth. So anonymous methods I think is an interesting extension that we have to the language that allows you to do delegates written directly in place. So, instead of having to new a delegate to a method you just get to write block of code right there, and pass it almost like we you pass code as parameters this way. In fact you can almost create your statements this way because you can create closures. These are true closures just like in LISP and partial languages.

15Is this somewhat similar to Java's anonymous classes?

It's similar and different. Actually, I would say it is mostly different. So anonymous classes differ in that you are not creating a closure on a single method, but you are creating a class instance. Now, the methods that you implement in an anonymous class can refer to local variables of the enclosing scope, but those local variables must be declared final in Java. So you can have closures, but they only capture the R value of the local variables of the enclosing variables. We capture the L value. Meaning that you don't have to make these variables final and you can actually modify them. You are indeed capturing that location and I am referring to the same memory cell, if you will, as the local variable and within the delegate, and so you can use these as a communication device, you know, between the outside code and the inside code or between two separate delegates, which opens up some very interesting avenues in programming.

We've felt that it was important to capture L value instead of R value because we are after all an imperative language and imperative languages are sort of primarily characterized by the fact that you can modify values, as opposed to functional languages, that tend to be purely functional, you can assign once to a variable, and that's it. Whenever we have rules like that in imperative languages they tend to sort of conflict with people's intuitive expectation of what a variable is so we felt that it was important to do it the other way. So there are some big differences between anonymous classes and delegates.

16Looking beyond C# 2.0 what are some of the things you would like to see, time permitting, technology permitting, customer demand permitting folded into C# 2.1, 3.0 and beyond?

I think one of the problems that is starting to interest me a lot is the impedance mismatch that we have today between databases and general purpose programming languages. Whenever I talk to a group of programmers, be they C# or even VB programmers, it doesn't matter, I've had my Cabana session yesterday, I asked, how many people here write code that accesses a database? Sea of hands go up, a guy in the back yells, who doesn't? Everybody talks to a database and that really means that in order to successfully write an application you have to learn two languages. Your C# or VB or whatever your mid tier or your mainstream programming or general purpose programming languages, and then you have to learn your database programming language and that is typically SQL, some variant be that TSQL or PLSQL or whatever.

The impedance mismatches between these two worlds are just phenomenal, astounding. I mean it is relational versus objects. Its queries and set operations versus for loops and arrays and so forth. Its nullable types versus not, and the stuff that we go through today to successfully write these apps sometimes I feel makes us feel like plumbers right. We're just moving stuff from A to B and getting rid of the nullability and converting it to that, and stuffing it in here so I can take it out of there and you're again, you are doing all the housekeeping.

One of the things that made .NET incredibly successful was the fact that we took all of that housekeeping and put it in the platform, garbage collection, type safety, exception handling, whatever, all these things that programmers just get wrong, if they have to do it manually. Put them in the platform, just allow you to think about the algorithms. I am like trying to shift my focus to that space and try to do some of those same things. Truly integrate the database with the programing language. Of course, that is a very broad vision and many people lie on the rocks of unsuccessful database integration, and I am hoping not to be one of them, but I think we have some interesting thoughts about it.

17What is your favorite feature in C# either 1.0 or 2.0 or beyond? What really gets you up in the morning and says yeah! I did something cool here!

I think the generic stuff is very cool. If I have to talk about sort of my favorite feature in C# 1.0. I think it is actually the beauty and simplification we get from the unified type system. I always was really, really, happy with the way that came out, and that just simple beauty that you get from being able to represent everything as an object, and if you want to have a method that takes any number of arguments of any type, params object array and there it is. You can write your type safe printf() there and whatever it there is just something pretty about the way that worked out. I think I experience bears it out too because you always know when a feature is not successful you always get questions about it, and people not understanding how this works and whatever. This is one of those things that the silence is astounding, which to me, is a great of sign of success, because it means people are using it everyday and are not having an issue with it, so I like that feature.

18Any long-term future plans, you are going to be at Microsoft for the next five years? Because we see that you change companies every 13 years or so?

I've got at least another five.

TSS: Do expect to be working on C# for the next decade?

It is so hard to say. All I can say is right now I am having lots of fun, I just talked about how there is this big challenge that we are like trying to look at with databases in general purpose programming languages. That should keep me busy for a good long while. I am having a good time, so I have no desire to do anything else whatsoever.

Well since we just mentioned databases we have got the other big data store which is XML. Any thoughts on integrating XML into a language?

Sure, I think that when I talk about integrating databases, and whatever, you sort of have to see broadly there. XML in a sense is also data right, so I am talking about integrating data, if you will, richer data support in the language. So XML would clearly of course be a part of that. Now, the thing that is interesting is there is a lot of research being done about XML integration and programming languages and I think it is very important to understand that they are sort of different kinds of XML and there are different times when this pays off, and when it does not.

For example, if you look at the E4X stuff for java script, the ability to write XML literals, I don't know if you looked at that specification. So there is some interesting stuff there that you can write XML literals inside your program and sort of escape yourself out of XML and back in write a little expression and it's sort of XQuery a little bit, but not quite. It's very interesting, and it really only works in a typeless language, and we are a strongly type language, and once you are type language, knowing things about the type of XML, first of all is hard, because XSD is a very, very, complicated type system that unfortunately exists only in XSD.

My big issue with XSD has always been that people write their applications today with objects and classes and whatever be that in C# or Java or VB, or whatever, and then they want to transport them on the wire, and ideally, we would want to have some sort of type system that at least is fairly close to a what an object is so we can meaningfully map it to XML, and move it over, and then map it back. Unfortunately, XSD has a zillion other features that no one ever asked for. It is incredibly complicated to implement and just the notion of jamming XSD as a type system into C# would be the death of C#. So now you are faced with this unfortunate situation that you have a strongly typed language that really the core premises that you got to have type in order to delivery value, yet you have a type system that is just quite unlike anything ever seen in a programing language. That makes that particular integration very hard. So I think you know that is not to say that we are not looking at this problem, and I definitely think we are making progress, but it is a complicated feature area.

19Speaking of future directions and so forth, there has been a lot of buzz going on in the Java community about aspects, and aspect-oriented programming and so forth and I'm curious as to hear your thoughts. Will we see some of those things show up in C# or how do you feel?

It is not something that we are actively looking at implementing at this point, so we are sort of if you will in wait and see mode. I have to yet see sort of large scale projects succeed with that development methodology. I see how aspects are very useful as a logging, debugging, monitoring, whatever, the prototypical example, that are always mentioned with aspects. I see how it's useful for that, but as a general purpose programming discipline, I still have some grave concerns about sort of aspects taking away your ability to reason about your own code because people can inject stuff anywhere practically anywhere in your code and it can even have side effects that might make it very, very, hard for you to reason about what your program does. That does concern me and I am sort of waiting for that to play out little bit.

TSS: So if tomorrow you see a successful aspect system going to production?

I would be definitely be interested in taking a closer look at what it is that works and doesn't and so forth.

TSS: Can I give Gregor Kiczales your phone number?

Sure, I think he has my e-mail already.

TSS: Thank you very much Anders for your time and good luck for the future.

Absolutely, thanks.

 
解决Java连接PostgreSQL中数组类型(Array)的传参问题 、、 之前困扰于Java连接PostgreSQL时数组类型的参数的入库问题,从Java的枚举类JdbcType可以看出跟数组有关的只有 "ARRAY(2003)" 这个类型 但是经尝试,PostgreSQL中并没有可以对应的类型 会报"No typehandler found for property xxx"的错 Caused by: java.lang.IllegalStateException: No typehandler found for property testArr 参考. 阅读详情

相关推荐

自动驾驶仿真:python和carsim联合仿真案例

carsim内部有许多相关联合仿真的demo,simulink、labview等等都有涉及,这里简单介绍下python和carsim联合仿真的方法,虽然carsim官方有个Steer_Control.py相关的案例,但是感觉比较冗余,这里抽出重点部分和大家交流探讨下。提示:以下是本篇文章正文内容,下面案例可供参考1、这里关于solvers的细节其实都没说,因为里面确实也没什么内容好讲的,本质就是调用carsim.dll,如果你需要更多的函数解析其实可以看vs_api.h,路径在,具体内容如下图所示。

zataji的博客 9066

Scala Language Programing Guide(章节二)

Scala Language Programing Guide 作者:jiangzz 电话:15652034180 微信:jiangzz_wx 微信公众账号:jiangzz_wy 百知教育 变量 Scala语言中没有原始数据类型,这一点和Java语言不同,在Scala中一切且对象。以下是Scala语言中常见类型和类型间的继承关系。 在Java中常见的基本类型在Scala中都被剔除了,Scala将...

麦田里的守望者-蒋中洲【相信相信的力量】 639

逆向某团mtgsig参数时,我踩过的3个坑:从H5guard混淆到Python校验

本文详细解析了逆向某团mtgsig参数时遇到的三大挑战:H5guard混淆破解、环境补全检测与Python结果校验。通过实战案例,揭示了JavaScript加密算法的逆向技巧,包括控制流混淆拆解、隐蔽环境检测点规避以及跨语言校验的解决方案,为开发者提供了一套完整的逆向工程避坑指南。

weixin_27722377的博客 1066

scala学习笔记之Array

数组的创建、赋值、取值和遍历 package com.zyc.scala import java.util import scala.collection.mutable import scala.collection.mutable.ArrayBuffer /** * Created with IntelliJ IDEA. * Author: zyc2913@163.com * Date: 2020/9/17 16:01 * Version: 1.0 * Description:数组的创建、赋值、

zyc2913的博客 815

Swin Transformer 与 CNN 结合实现图像分类

Swin Transformer 与 CNN 结合实现图像分类。(含swin transformer 结构讲解,cnn网络搭建,代码)

这里是Mae。 5028

【Bug已解决】zsh: command not found: claude 解决方案

方案适用场景推荐指数难度方案一:配置 npm 全局目录所有平台,长期使用⭐⭐⭐⭐⭐低方案二:修复 PATH 变量快速修复,不想改 npm 配置⭐⭐⭐⭐低方案三:重建软链接文件存在但链接断裂⭐⭐⭐中方案四:nvm 专属方案使用 nvm 管理多版本 Node.js⭐⭐⭐⭐低方案五:Windows 专属Windows 系统⭐⭐⭐⭐⭐低方案六:Homebrew 安装macOS 用户,npm 有问题⭐⭐⭐低根本原因。

博客 1万+

对Array对象的错误认识[Action Script]

      今天想写一个计算24点的class,里面用到了Array,虽然在此之前用到过很多次,但是一些细节却没有在意过,所以今天调试时遇到的很多情况都出乎意料之外,在此写出。1、new Array( )之前用它只用过两种var test_array:Array = new Array(inital_len); // 创建一个长度为inital_len的空数组var test_ar

生于忧患,死于安乐 1979

Level 4自动驾驶系统设计49——L4 架构设计 2

在 9.3.2 节所述的 SerDes 晶圆级原生“双出(Splitter Mode)”物理架构中,若解串芯片内部的其中一路 MIPI 供电轨因大算力 SoC 1 的高热漏电流污染突发二阶瞬态电磁耦合,导致双出通道产生 $\mathbf{\Delta} \text{Skew} \ge 15\text{ps}$ 的时序偏置。其中,$\mathbf{H}(t)$ 为最低限度生存网雷达几何测量的观测矩阵,$\mathbf{R}_{\text{fallback}}$ 为清洗后的雷达测量不确定度协方差。

Godspeed_zwh的博客 311

‘List.type‘ does not take parameters

目录 报错指示:'List.type' does not take parameters 报错代码:​ 报错原因: 解决: 延申: 参考文章: 报错指示:'List.type' does not take parameters List类型不接受参数 报错代码: 报错原因: 包里面有之前编写的一个List类,编译时优先调用了包里的List而没有调用java.util里面的List。即:注意看上图代码,左上蓝框,的类名,和,右上蓝框,的名字一样,代码里面调用了自己L.

weixin_54348877的博客 2451

【硬件】LT3763中文手册

1)精确控制输入和输出电流;2) 3000:1真彩色PWM™调光;3) ±1.5%电压调节精度;4) ±6%电流调节精度;5)6V至60 V输入电压范围;6)宽输出范围最高可达55V;7)<2µA关断电流;8)用于负载电流热控制的控制引脚;9)输入和输出电流监控和限制;10)开路、短路和C/10故障检测;11)适用于LED应用的PWM驱动器输出;12)热增强型28引脚FE封装。

qq_39200110的博客 492

matlab RANSAC拟合圆柱【2025最新版】

RANSAC拟合圆柱

点云侠的博客 3137

type Iterator does not take parameters

在ubuntu编译java程序时报错:type Iterator does not take parameters 源码如下: package object; import java.util.*; class Generate{ Map<Integer,String> map = new HashMap<Integer, String>(); ...

weixin_30815427的博客 1237

YOLOv8改进策略【注意力机制篇】| CVPRW-2024 分层互补注意力混合层 H-RAMi 针对低质量图像的特征提取模块

许多证据表明层次化网络对图像恢复(IR)任务通常不太有效,因为IR的目标是逐个预测像素值(密集预测),而缩小特征图会丢失重要的像素级信息。然而,层次化结构有降低时间复杂度以及学习语义级和像素级特征表示的优点。为了弥补缺点并利用优点,设计了H - RAMi层。

Limiiiing的博客 379

spark:rdd 转换dataframe报错: Array takes type parameters;toDF is not a member of org.apache.spark.rdd

tdf4.select("id").rdd.map(x=>Array(x(0),cmls)).toDF("id","cmls").show() 试图构造上述dataframe,其中cmls是个array[any] 此时报错: value toDF is not a member of org.apache.spark.rdd.RDD[Array[Any]] 尝试了网上的import sqlContext.implicits._. 不行后,发现是由于这个方法只针对下面几种格式: RD...

sisiel的博客 1063

SAP B1中文培訓教材_SDK

公司内部培训资料,对开发工具 ,DIAPI, UIAPI,Add-ON有详细解说

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

idea、goland泛型语法报错解决|go1.18泛型初体验

go在1.18正式推出了泛型,你是否和博主一样好奇其语法呢?快啊来看看吧 1. 版本更新&插件更新 go如何更新到最新版本,可以查看https://www.hengyumo.cn/momoblog/detail/20220417102155 idea插件更新: setting >> plugin >> installed 全部更新之后 idea版本更新(可能要更新多次,直到更新到不能更新为止): help >> check update 在此处勾选上泛型支持

衡与墨的博客 5275

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

TypeError array() takes from 1 to 2 positional arguments but 3 were given

错误案例 import numpy as np X = np.array([0, 0], [0, 0], [1, 1]) 错误提示 TypeError Traceback (most recent call last) ~AppDataLocalTemp/ipykernel_52444/1027577749.py in <module> 1 import numpy as np ----> 2 X = np.ar

m0_60721514的博客 2620

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

pb9常见错误及含义

1. by zero  发生被0除错误 2. Null object reference  空对象引用 3. Array boundary exceeded  数组越界 4. Enumerated value is out of range for function  枚举值超出函数的范围 5. Negative value encountered in function 

Java学徒 3万+

PB9常见错误及含义

1. by zero   发生被0除错误 2. Null object reference   空对象引用 3. Array boundary exceeded   数组越界 4. Enumerated value is out of range for function   枚举值超出函数的范围 5. Negative value encountered in function   函数...

chenhongdong的专栏 1万+

JavaScript Notes

JavaScript Notes Primitive Datatypes in stack string, number, boolean, null, undefined, Symbol(ES6) //string "hello world" //number 4 9.3 -10 //boolean true false // null and undefined null un...

fwu11的博客 409

arguments 向array转化中 需要注意的一个小细节

当然,ES6+之后可以直接用array.from来构造array了。这之前在转换时需要注意用concat时要把args作为参数而不是thisArg,slice则相反 function useArguments() { var s = [].concat.apply(arguments) console.log(s) /* [Ar

凝视深渊 420

Array类

class Array Arrays are ordered, integer-indexed collections of any object. Array indexing starts at 0, as in C or Java. A negative index is assumed to be relative to the end of the array—that is, a...

weixin_34384681的博客 333

Spark学习--scala

Scala语法 1.值和变量 val 值,不能发生变化 var 变量,可以发生变化 scala> val a:Int = 1 a: Int = 1 scala> a = 2; :12: error: reassignment to val a = 2; ^ scala> var a:Int = 2 a: Int = 2 scala> a = 3 a: In

ddhdzt的专栏 609

java.sql.array 初始化_Java数组学习

Java数组学习数组的定义数组是相同类型数据的有序集合数组描述的是相同类型的若干个数据,按照一定的先后次序排列组合而成其中,每一个数据称作一个数组元素,每个数组元素可以通过一个下标来访问它们数组的下标从0开始数组声明创建首先必须声明数组变量,才能在程序中使用数组。下面是声明数组变量的语法:dataType[] arrayRefVar; //首选方法或dataType arrayRefVar[];...

weixin_42121058的博客 1310

Scala学习笔记(2)

Scala基本语言特性相比Java``C++等语言,Scala融合了OOP``FP等编程范式,同时语法上更灵活。语法基础(概览) Scala语言中不强制要求分号,可以依行断句,只有一行带有多个语句时才要求分号隔开。 使用var``val定义变量``常量,类型可以由编译器推导,也可以显式指定。定义变量时甚至可以省略var``val关键字,无关键字时定义的变量默认即为val,在定义变量的同时就需要初始化

言の叶の庭 3502
上一篇: 【推荐】Winos.cn技术杂志第一期
下一篇: Vista以外的系统一样会10秒钟内崩溃吗?
itanders
博客等级 码龄19年 178粉丝 177原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值