This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Channels-driven concurrency with Go | |
| // Code examples from Rob Pike's talk on Google I/O 2012: | |
| // http://www.youtube.com/watch?v=f6kdp27TYZs&feature=youtu.be | |
| // | |
| // Concurrency is the key to designing high performance network services. | |
| // Go's concurrency primitives (goroutines and channels) provide a simple and efficient means | |
| // of expressing concurrent execution. In this talk we see how tricky concurrency | |
| // problems can be solved gracefully with simple Go code. | |
| // (1) Generator: function that returns the channel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In the terminology of programming languages, first-class Objects are instances of a type | |
| that can be assigned to an identifier, passed as a parameter, or returned by a function | |
| In Python classes and functions are also treated as first-class Objects. | |
| For Example | |
| scream = print | |
| # assign name 'scream' alias name to print | |
| Modules are also first-class objects in Python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.ArrayList; | |
| import java.util.Scanner; | |
| class TestClass { | |
| public static void main(String args[] ) throws Exception { | |
| Scanner keyboard=new Scanner(System.in); | |
| int t=keyboard.nextInt(); | |
| keyboard.nextLine(); | |
| ArrayList<String> vowelList= new ArrayList<>(); | |
| vowelList.add("a"); | |
| vowelList.add("e"); |
NewerOlder