As a little program to learn about language, I apply linq to The method of trying (usually known as a map outside of VB), although it seems that I have participated in a small problem, it will not let me call the function again because It assumes that the type does not match here is the code:
Iterator function map (A, B (As a joke, A, B), In the form of input (AK)) as IEnumerable (B) If there is nothing in input then there is no use when the fun (head) input map (Fun, Input)) 'Error Here End End Function Note here that head () is a function that is the first element of the input list , And tail () is a method that gives everything, but the first element I did a test first For what would a function I (A, B) was possible to have a function, such as I;
/ Code> has the following signature:
In the form of the function head (tk) (i.e. as IEnumerable (tk)) as t ... and function Function TEL (TK) (as IEInumerable (T)) as IEnumerable (TK) ... end function Then the query in the row generates the following error (signal Always include error messages in your SO question Data type of type parameter (A, B) (In the form of draft. Function (A, B) input, input as the system. Editor. Generic.list (ASK)) as a system. Colllections.Generic IEnumerable (BK) These arguments can not be estimated from. Specifying the data type can clearly correct this error.
Then let's ask for the error message:
Iterator function map ( Interesting as A, B) (Music, A, B), In the form of Input (AK) as IEnumerable (B) ... Map (A, B) (Interesting, Tail (Input)) ... function and we get a more specific error:
Selection. Generic 'System.Collections.Generic.List (A)'.
It makes sense: Tail a IEnumerable returns map to a The list requires . Since map does not use any list-specific properties, let's just make the map more generous in its input: Iterator Function map, like A, B) (such as A, B), as IEnumerable (AK) as input) like IEnumerable (B) ... end function now , Everything compiled properly In fact, we can now remove (A, B) again, because VB.NET is required to fix the required data type of the normal type parameter It can be assumed: Interesting as < / Html>
Popular posts from this blog
contains # lt; Stdio.h & gt; #to & lt include, conio.h & gt; #to & lt include, windows.h & gt; Structure node {int a; Structure node * next; }; Zero constructivist (Structure node ** head) {struct node * p, * temp; Int n; Printf ("Enter number \ n"); Scanf ("% d", & amp; n); P = (straight node *) maulok (psychophag (strip node)); P-> = N; If (* head == 0) {* head = p; P-> Next = 0; Temporary = p; } And {temp-> next = p; Temporary = p; P-> Next = 0; }} Void frontbacksplit (Structure node ** head, Structure node ** Head1, Structure node ** Head 2) {int counter = 0, i; Structure node * temporary, * p; Temporary = * head; While (temporary! = 0) {counter ++; Temporary = temp-> Next; } Int n; If (counter% 2 == 0) {n = counter / 2; } And {n = (counter + 1) / 2; } Temp = * head; (I = 0; i & lt; n-1; i ++) for {if (* head1 == 0) {* head1 = temp; } Temp = temp- & gt; next; } P = temp; Temporary = temp-> Next; P-> Next ...
Then my Java online class, I must include the variable and provide the set and of course get the name of the instructor's course. Welcome to the grade book for: How to get the methods, and to display the message: And this course has been presented by: Class gradebook: public class gradebook {personal string string name; Public String Course Teacher; Public gradebook (string name, string teacher) {courseName = name; Course Teacher = Teacher; } Public ZeroServer Name (string name) {courseName = name; } Public string getCourseName () {return courseName; } Public Zero Setchers Teacher (String Teacher) {Course Teacher = Teacher; } Receive public stringTeker () {return course teacher; } Public Zero Display Message () {System.out.printf ("Welcome to the Book of Grade: / n% s! \ N", getCourseName (), "This course is presented as: \ n % S \ n! ", GetCourseTeacher ()); }} Main category: import java.util.Scanner; Public grade gradebook {public static zero ma...
इस सवाल का पहले से ही एक उत्तर है: 7 जवाब अधिकतम सरणी क्यों बदलता है स्थानीय घोषणा और वैश्विक घोषणा से? मैंने कुछ ब्लॉग में पढ़ा है कि अधिकतम आकार के सरणी को हम घोषणा कर सकते हैं, स्थानीय घोषणा के मामले में और 10 ^ 7 से 2 * 10 ^ 8 के बीच 10 ^ 6 होगा वैश्विक घोषणा के मामले में इसके लिए क्या कारण है? ये संख्या सामान्यतः एक चीज का अर्थ नहीं है, वे विशिष्ट हैं ओएस + मशीन के लिए लेकिन स्थानीय घोषणा और वैश्विक घोषणा आभासी स्मृति के विभिन्न क्षेत्रों में की जाती है। स्थानीय वेरिएबल्स स्टैक पर हैं, जो आमतौर पर ढेर (गतिशील रूप से आवंटित ग्लोबल वैरिएबल के लिए उपयोग किए जाते हैं) से छोटा होता है
Comments
Post a Comment