source for examples
This commit is contained in:
		
							parent
							
								
									f295e933be
								
							
						
					
					
						commit
						a990295f7e
					
				
							
								
								
									
										25
									
								
								tex/dart/flutter.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								tex/dart/flutter.dart
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | |||||||
|  | import 'package:flutter/material.dart'; | ||||||
|  | 
 | ||||||
|  | void main() => runApp(const MyApp()); | ||||||
|  | 
 | ||||||
|  | class MyApp extends StatelessWidget { | ||||||
|  |   const MyApp({Key? key}) : super(key: key); | ||||||
|  | 
 | ||||||
|  |   @override | ||||||
|  |   Widget build(BuildContext context) { | ||||||
|  |     return MaterialApp( | ||||||
|  |       title: 'Flutter Demo', | ||||||
|  |       home: Scaffold( | ||||||
|  |           appBar: AppBar( | ||||||
|  |             title: const Text('Flutter Demo'), | ||||||
|  |           ), | ||||||
|  |           body: Center( | ||||||
|  |             child: Column( | ||||||
|  |                 mainAxisAlignment: MainAxisAlignment.center, | ||||||
|  |                 children: const <Widget>[ | ||||||
|  |                   Text('Hello World'), | ||||||
|  |                 ]), | ||||||
|  |           )), | ||||||
|  |     ); | ||||||
|  |   } | ||||||
|  | } | ||||||
							
								
								
									
										1
									
								
								tex/dart/hW.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								tex/dart/hW.dart
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | |||||||
|  | void main() => print("Hello World"); | ||||||
							
								
								
									
										3
									
								
								tex/dart/helloWorld.dart
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								tex/dart/helloWorld.dart
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | void main() { | ||||||
|  |   print("Hello World"); | ||||||
|  | } | ||||||
							
								
								
									
										10
									
								
								tex/dart/pseudoBFS.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								tex/dart/pseudoBFS.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  |     BFS(G, s): | ||||||
|  | 	queue Q | ||||||
|  | 	s <- visited | ||||||
|  | 	Q.add(s) | ||||||
|  | 	while (Q.not_empty): | ||||||
|  | 	    u = Q.pop | ||||||
|  | 	    for a in u.connections: | ||||||
|  | 		if a is unvisited: | ||||||
|  | 		Q.add(a) | ||||||
|  | 		a <- visited | ||||||
							
								
								
									
										12
									
								
								tex/dart/pseudoDFS.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								tex/dart/pseudoDFS.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,12 @@ | |||||||
|  | function doDfs(G[n]: Graph):  | ||||||
|  |    visited = array[n, false] | ||||||
|  |            | ||||||
|  |    function DFS(u: int):    | ||||||
|  |       visited[u] = true | ||||||
|  |       for v: (u, v) in G:       | ||||||
|  |          if not visited[v]:                | ||||||
|  |             DFS(v) | ||||||
|  | 
 | ||||||
|  |    for i = 1 to n:              | ||||||
|  |       if not visited[i]:                    | ||||||
|  |          DFS(i) | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user