提交 7cacb814 编写于 作者: W wizardforcel

2020-07-10 21:34:32

上级 ae3b47eb
......@@ -172,7 +172,7 @@ namespace Conditional
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
12 is greater than or equal to 5
......@@ -259,7 +259,7 @@ namespace Conditional
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
12 is greater than 5
......@@ -346,7 +346,7 @@ namespace Conditional
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
13 is the largest
......
......@@ -116,7 +116,7 @@ namespace Loop
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Sum of first 5 natural numbers = 15
......@@ -169,7 +169,7 @@ namespace Loop
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
i = 0 and j = 0
......@@ -211,7 +211,7 @@ namespace Loop
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
C# For Loop: Iteration 1
......
......@@ -100,7 +100,7 @@ namespace Loop
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Sum = 15
......@@ -184,7 +184,7 @@ namespace Loop
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
5 * 1 = 5
......
......@@ -173,7 +173,7 @@ namespace Loop
}</int>
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Sum = 44
......
......@@ -193,7 +193,7 @@ namespace Conditional
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Enter first number: -13.11
......
......@@ -113,7 +113,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
14 & 11 = 10
......@@ -164,7 +164,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
14 ^ 11 = 5
......@@ -207,7 +207,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
~26 = -27
......@@ -278,7 +278,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
42<<1 = 84
......@@ -333,7 +333,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
42>>1 = 21
......
......@@ -339,7 +339,7 @@ namespace Directive
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
CSHARP is defined, PYTHON is undefined
......@@ -386,7 +386,7 @@ namespace Directives
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Program.cs(10,26): warning CS1030: #warning: 'CSHARP is undefined' [/home/myuser/csharp/directives-project/directives-project.csproj]
......@@ -434,7 +434,7 @@ namespace Directive
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Program.cs(10,24): error CS1029: #error: 'CSHARP is undefined' [/home/myuser/csharp/directives-project/directives-project.csproj]
......@@ -480,7 +480,7 @@ namespace Directive
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
AnotherProgram.cs(200,22): warning CS1030: #warning: 'Actual Warning generated by Program.cs on line 10' [/home/myuser/csh
......@@ -528,7 +528,7 @@ namespace Directive
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Hello
......@@ -579,7 +579,7 @@ namespace Directive
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Program.cs(12,22): warning CS1030: #warning: 'This is a warning 2' [/home/myuser/csharp/directive-project/directive-project.csproj]
......
......@@ -202,7 +202,7 @@ namespace MyProgram
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
Nested Namespace Example
......
......@@ -182,7 +182,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
23
......@@ -215,7 +215,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
-1109
......@@ -246,7 +246,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
51092
......@@ -277,7 +277,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
-7091821871
......@@ -312,7 +312,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
62
......@@ -343,7 +343,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
42019
......@@ -374,7 +374,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
1151092
......@@ -405,7 +405,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
17091821871
......@@ -441,7 +441,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
43.27
......@@ -473,7 +473,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
-11092.53
......@@ -507,7 +507,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
B
......@@ -542,7 +542,7 @@ namespace DataType
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
53005.25
......
......@@ -121,7 +121,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
14.4 + 4.6 = 19
......@@ -193,7 +193,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
10 == 20 returns False
......@@ -252,7 +252,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
True
......@@ -307,7 +307,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
+number = 10
......@@ -342,7 +342,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
10
......@@ -405,7 +405,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
10 is Even Number
......@@ -467,7 +467,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
~10 = -11
......@@ -547,7 +547,7 @@ namespace Operator
}
```
When we run the program, the output will be:
当我们运行程序时,输出将是:
```cs
15
......
......@@ -69,7 +69,7 @@ namespace Sample
}
```
When we run the program, the output will be
当我们运行程序时,输出将是:
```cs
Prints on
......@@ -105,7 +105,7 @@ namespace Sample
}
```
When we run the program, the output will be
当我们运行程序时,输出将是:
```cs
10
......@@ -137,7 +137,7 @@ namespace Sample
}
```
When we run the program, the output will be
当我们运行程序时,输出将是:
```cs
Hello World
......@@ -185,7 +185,7 @@ namespace Sample
}
```
When we run the program, the output will be
当我们运行程序时,输出将是:
```cs
5 + 10 = 15
......@@ -267,7 +267,7 @@ namespace Sample
}
```
When we run the program, the output will be
当我们运行程序时,输出将是:
```cs
Press any key to continue...
......@@ -321,7 +321,7 @@ namespace UserInput
}
```
When we run the program, the output will be
当我们运行程序时,输出将是:
```cs
Enter integer value: 101
......
......@@ -78,7 +78,7 @@ If number > root->data
![if the value is found in any of the subtrees, it is propagated up so that in the end it is returned, otherwise null is returned](img/6b854cf280b11a6cab8c1ac2e97186ec.png "Search operation in BST")
If the value is found in any of the subtrees, it is propagated up so that in the end it is returned, otherwise null is returned
如果在任何子树中找到该值,则将其向上传播,以便最后返回,否则返回`null`
......@@ -136,7 +136,7 @@ Insert 4 as a left child of 6
![Image showing the importance of returning the root element at the end so that the elements don't lose their position during the upward recursion step.](img/ce2d9cee5465f26c3b802e5d6da4dd1d.png "Insertion operation on a BST")
Image showing the importance of returning the root element at the end so that the elements don't lose their position during the upward recursion step.
该图显示了在最后返回根元素的重要性,这样根元素才能在向上递归步骤中不丢失其位置。
......
......@@ -74,9 +74,7 @@ int findSum() {
爱丽丝(Alice)和鲍勃(Bob)感到欣喜若狂,他们几乎可以在短时间内建立自己的东西。 让我们潜入他们的工作区,听听他们的谈话。
```
Alice: Let's run this code and find out the sum. Bob: I ran this code a few minutes back but it's still not showing the output. What's wrong with it?
```
> 爱丽丝:让我们运行这段代码,找出总和。 鲍勃:我在几分钟前运行了这段代码,但仍未显示输出。 它出什么问题了?
哎呀!出事了! 计算机是最确定的机器。 返回并尝试再次运行它将无济于事。 因此,让我们分析一下此简单代码的问题所在。
......
......@@ -12,7 +12,7 @@
![graph data structure explained using facebook's example. Users, groups, pages, events, etc. are represented as nodes and their relationships - friend, joining a group, liking a page are represented as links between nodes](img/85cd94ece58965f7646c95b7496418ba.png "Example of graph data structure")
Example of graph data structure
图数据结构示例
......
......@@ -70,7 +70,7 @@ Vertex 2 has an unvisited adjacent vertex in 4, so we add that to the top of the
![After we visit the last element 3, it doesn't have any unvisited adjacent nodes, so we have completed the Depth First Traversal of the graph.](img/c6b4ab621d2161bf1c6b2bbe94020da2.png "A DFS example")
After we visit the last element 3, it doesn't have any unvisited adjacent nodes, so we have completed the Depth First Traversal of the graph.
在访问最后一个元素 3 之后,它没有任何未访问的相邻节点,因此我们完成了图的深度优先遍历。
......
......@@ -50,7 +50,7 @@ Visit start vertex and add its adjacent vertices to queue
![visit the first neighbour of start node 0, which is 1](img/e61d8587262a8fefe84261c48467812a.png "BFS example")
Visit the first neighbour of start node 0, which is 1
访问起始节点 0 的第一个邻居,即 1
......
......@@ -22,7 +22,7 @@
![on the left, there is a graph and on the right there is an array representation of the same graph to compare equivalent indices](img/54db1979822031a282d59faef672e35d.png "Comparison between array and heap indices")
Relationship between array and heap indices
数组和堆索引之间的关系
......
......@@ -48,13 +48,12 @@ Go to each vertex and update its path length
![If the path length of the adjacent vertex is lesser than new path length, don't update it](img/9c1101cb0ca5e466b0964ca9f58d9adc.png "Dijkstra's algorithm steps")
If the path length of the adjacent vertex is lesser than new path length, don't update it
如果相邻顶点的路径长度小于新路径的长度,请不要更新它
![Avoid updating path lengths of already visited vertices](img/b961908028a33489992e43ed5d3937c6.png "Dijkstra's algorithm steps")
Avoid updating path lengths of already visited vertices
避免更新已访问顶点的路径长度
......
......@@ -35,7 +35,7 @@ Start with a weighted graph
![Choose the edge with the least weight, if there are more than 1, choose anyone](img/1c59d11ae3cf6a1272c0bbfb7fbff158.png "Kruskal's algorithm example ")
Choose the edge with the least weight, if there are more than 1, choose anyone
选择重量最小的边,如果大于 1,则选择任何东西
......
......@@ -265,11 +265,11 @@ GenericsClass<Integer> list = new GenericsClass<>();
// calls method of GenericsClass
list2.display("String");
```
In the above code, we have a generics class. Here, the type parameter indicates that the class is working on Integer data.
在上面的代码中,我们有一个泛型类。 在这里,类型参数指示该类正在处理`Integer`数据。
Hence when the string data is passed in argument, the compiler will generate an error.
```
因此,当在参数中传递字符串数据时,编译器将生成错误。
### 3.与集合一起使用
......
......@@ -169,7 +169,7 @@ do {
![Flowchart of do while loop in Java](img/d1b9b2b80aeb37477fda1f86be292d73.png "Working of do...while Loop")
Working of do...while Loop
`do...while`循环的原理
......
......@@ -58,5 +58,5 @@ Java Development Kit
![JRE contains JVM and class libraries and JDK contains JRE, compilers, debuggers, and JavaDoc](img/e81a27912388282d5dc563dda1cdf750.png "Relationship between JVM, JRE, and JDK")
Relationship between JVM, JRE, and JDK
JVM,JRE 和 JDK 之间的关系
......@@ -524,6 +524,6 @@ Keys: One, Two, Three,
Values: 1, 2, 3,
```
In the above program, note that we have imported the `java.util.Map.Entry` package. Here, `Map.Entry` is the nested class of the `Map` interface.
在上面的程序中, note that we have imported the `java.util.Map.Entry` package. Here, `Map.Entry` is the nested class of the `Map` interface.
This nested class returns a view (elements) of the map.
\ No newline at end of file
......@@ -365,10 +365,10 @@ Searched value: Three
`reduce()`方法累积(聚集)映射中的每个条目。 当我们需要所有条目来执行一项共同任务(例如添加映射的所有值)时,可以使用此方法。
It includes two parameters.
它包含两个参数。
* `parallelismThreshold` - 它指定在映射了几个元素之后,并行执行映射中的操作。
* `转换器` - 在将数据传递到指定功能之前,它将转换数据。
* `conventor` - 在将数据传递到指定功能之前,它将转换数据。
例如:
......
......@@ -54,7 +54,7 @@ class HelloWorld {
所有字符流类均从基本抽象类`Reader``Writer`派生。
To learn more, visit
要了解更多信息,请访问:
* [Java `Reader`类](/java-programming/reader "Java Reader Class")
* [Java `Writer`类](/java-programming/writer "Java Writer Class")
\ No newline at end of file
......@@ -88,7 +88,7 @@ add()
print("In main:", c)
```
When we run the above program, the output will be:
当我们运行程序时,输出将是:
```py
Inside add(): 2
......
......@@ -71,7 +71,7 @@ print("Data type of num_str:",type(num_str))
print(num_int+num_str)
```
When we run the above program, the output will be:
当我们运行程序时,输出将是:
```py
Data type of num_int: <class 'int'>
......@@ -82,7 +82,7 @@ Traceback (most recent call last):
TypeError: unsupported operand type(s) for +: 'int' and 'str'
```
In the above program,
在上面的程序中,
* 我们添加了两个变量`num_int``num_str`
* 从输出中可以看到`TypeError`。 在这种情况下,Python 无法使用隐式转换。
......@@ -124,7 +124,7 @@ print("Sum of num_int and num_str:",num_sum)
print("Data type of the sum:",type(num_sum))
```
When we run the above program, the output will be:
当我们运行程序时,输出将是:
```py
Data type of num_int: <class 'int'>
......@@ -136,7 +136,7 @@ Sum of num_int and num_str: 579
Data type of the sum: <class 'int'>
```
In the above program,
在上面的程序中,
* 我们添加`num_str``num_int`变量。
* 我们使用`int()`函数将`num_str`从字符串(高位)转换为整数(低位)类型以执行加法。
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册