C++ is an object-oriented programming language that is an extension of C. It was developed in the early 1980s by Bjarne Stroustrup at Bell Labs. C++ supports concepts like inheritance, polymorphism, and encapsulation that make it suitable for large, complex programs. Inheritance allows classes to inherit properties from parent classes. Polymorphism is the ability to process objects of different types in the same way. Encapsulation combines data and functions that operate on that data within a single unit, hiding implementation details. File input/output in C++ can be handled through streams like ifstream for input and ofstream for output.
The document provides an introduction to HTML (Hypertext Markup Language) by explaining some key concepts:
HTML is used to create web pages and is made up of markup tags rather than a programming language. It describes the structure of a web page using elements like headings, paragraphs, links, images, lists and tables. The document then demonstrates and explains the use of various HTML tags through examples of code and the resulting web page output.
This is a one day workshop presentation, primarily on the new OMG Foundational UML specification for executable model semantics, but also discussing extensions for executable SysML (System Modeling Language) models.
The Sri Venkateswara Swami Temple is a landmark Hindu temple located on Tirumala Hill in Tirupati, Andhra Pradesh. The temple was built in the 3rd century CE and has been expanded over centuries, gaining much of its wealth under the Vijayanagara Empire. It is considered the richest temple in the world based on donations received. The temple follows Dravidian architecture and attracts 50,000 to 100,000 pilgrims daily, making it the most visited holy site in the world. The main deity, Venkateswara, is worshipped according to Vaikhanasa Agama tradition.
1) The document provides an introduction to industrial automation, including definitions, basic elements, types, and reasons for automating manufacturing processes.
2) It describes the three main types of automation systems - fixed, programmable, and flexible - and how they relate to product variety and production quantity.
3) Key factors that influence whether to automate including production volume needed, product complexity, and changeover flexibility requirements. Automation can increase productivity, quality, and worker safety.
This document provides an introduction to automation testing. It discusses the need for automation testing to improve speed, reliability and test coverage. The document outlines when tests should be automated such as for regression testing or data-driven testing. It also discusses automation tool options and the types of tests that can be automated, including functional and non-functional tests. Finally, it addresses the advantages of automation including time savings and repeatability, as well as challenges such as maintenance efforts and tool limitations.
This document provides an overview of diabetes mellitus (DM), including the three main types (Type 1, Type 2, and gestational diabetes), signs and symptoms, complications, pathophysiology, oral manifestations, dental management considerations, emergency management, diagnosis, and treatment. DM is caused by either the pancreas not producing enough insulin or cells not responding properly to insulin, resulting in high blood sugar levels. The document compares and contrasts the characteristics of Type 1 and Type 2 DM.
Power Point Presentation on Artificial Intelligence Anushka Ghosh
Its a Power Point Presentation on Artificial Intelligence.I hope you will find this helpful. Thank you.
You can also find out my another PPT on Artificial Intelligence.The link is given below--
https://www.slideshare.net/AnushkaGhosh5/ppt-presentation-on-artificial-intelligence
Anushka Ghosh
Groovy is a dynamic language for the Java Virtual Machine that aims to bring dynamic capabilities like Python and Ruby to Java developers. It has many features inspired by dynamic languages like closures, duck typing and metaprogramming, but also maintains compatibility with Java by having a Java-like syntax and the ability to interoperate with Java code. Groovy code can either be run directly from scripts or compiled into Java bytecode to be used within Java applications.
This document provides an overview of Groovy, including:
- Groovy is a dynamic language for the Java platform that adds features like closures and operator overloading.
- It started in 2003 and the latest version is 2.4.
- Groovy allows for dynamic typing, closure support, easier setup than Java, and integration with existing Java code and libraries.
- Key Groovy features covered include closures, operator overloading, GString, dynamic vs static typing, and working with files.
The document discusses the new features of Java 17, including a simpler free-to-use license valid for one year, long-term customer support to make migrations easier, support for cloud adoption through new management services, and expanded platform support for Arm 64-based computers. It concludes by introducing Ksolves as offering Java development services.
Java is an object-oriented programming language initially developed by Sun Microsystems. It was released in 1995. Key points:
- Java can be used to develop client-side standalone applications, applets for webpages, and server-side applications.
- It introduced the Java Virtual Machine (JVM) which allows Java programs to run on any platform that supports the JVM.
- Java's use of bytecode makes it portable and able to run on any device with a JVM, earning it the label of "Write Once, Run Anywhere".
Here I discuss about Java programming language and easiest way to solve programming problem. Java basic syntax and their uses are described briefly so that anyone can easily understand within very short time. If anyone follow the slide with proper way,I assure that he or she will find java programming interesting.
There are several JavaScript libraries available in the world of web programming. And, as the usage and complexity is increasing day by day, sometimes it becomes very difficult and confusing to understand and create modules using those libraries, especially for those having strong background of Object Oriented Languages.
So this one hour session will make an effort to go into the very basics of JavaScript and put a base for writing modular JavaScript code.
This document provides an overview of Spring Boot and some of its key features. It discusses the origins and modules of Spring, how Spring Boot simplifies configuration and dependency management. It then covers examples of building Spring Boot applications that connect to a SQL database, use RabbitMQ for messaging, and schedule and run asynchronous tasks.
OCP Java (OCPJP) 8 Exam Quick Reference CardHari kiran G
If you are preparing to appear for Oracle Certified Professional Java SE 8 Programmer (OCPJP 8) certification exam, this a reference card (sort of long cheat sheet) meant to help you. You may want to print this reference card for your easy and quick reference when you prepare for your exam.
The document summarizes some of the key new features in Java 17 including:
1. Long-term support for Java 17 which will be available in September 2021 and include features like records, text blocks, and enhanced null pointer exceptions.
2. Records, text blocks, helpful null pointer exceptions, pattern matching for switches, and sealed classes as some of the top new features in Java 17.
3. Enhancements to pseudo-random number generators with a new RandomGenerator interface and refactoring of legacy random classes.
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
This document provides an overview of C# programming basics, including:
- C# is an object-oriented language where the basic unit is a class containing methods and variables.
- A C# program consists of at least one class that must contain a Main method, which acts as the program entry point.
- The document discusses basic C# concepts like variables, data types, operators, conditional statements, loops, methods, and arrays.
- It also covers how to compile and run a simple "Hello World" C# program, and provides examples of different programming constructs.
I used these slides to present the benefits of using Kotlin to a group of people I work with. The presentation focuses on comparing Kotlin to Java, and in particular showing how Kotlin can help in writing safer, more concise and readable code. I used a few java gotchas/puzzles to demonstrate how Kotlin may prevent us from doing silly things.
This document provides an outline for teaching Java programming concepts. It begins with introductions to object-oriented programming, Java's working process, and programming language hierarchy. Subsequent sections cover Java topics like variables, data types, statements, arrays, loops, methods, threads, classes, inheritance, polymorphism, abstract classes, interfaces, and GUI programming using Swing. The document aims to guide students through Java concepts with examples and projects at each stage.
Introduction to Spring's Dependency InjectionRichard Paul
This document provides an overview of dependency injection in Spring. It defines dependency injection as a form of inversion of control where objects are provided to classes rather than having classes create their own dependencies. It discusses the benefits of dependency injection such as loose coupling, easy switching of implementations, and enhanced testability. It also compares constructor injection and setter injection and describes how to configure dependency injection using XML, annotations, and Java configuration in Spring.
The document provides information about Core Java concepts including:
1. James Gosling initiated the Java language project in 1991 and Sun released the first public implementation as Java 1.0 in 1995 with the promise of "Write Once, Run Anywhere".
2. Oracle acquired Sun Microsystems in 2010 and has worked to build fully integrated systems optimized for performance.
3. The document discusses the differences between C++ and Java and covers Java concepts like objects, classes, methods, variables, data types, identifiers, arrays and the Java Virtual Machine (JVM).
The document discusses the Open/Closed Principle (OCP), which states that software entities should be open for extension but closed for modification. It provides an example of an OCP kata using a bowling scoring problem. Programmers are instructed to write tests, then refactor the code by changing the object composite returned by a factory to make each new test pass without modifying existing code. The document also provides credits to people involved in developing and promoting OCP and related katas.
The document is a presentation on lambda expressions in Java 8 given by Isaac Carter. It introduces lambda expressions and functional programming concepts in Java 8 such as functional interfaces, streams, and method references. It provides examples of using lambda expressions with common Java 8 APIs like forEach(), Predicate, and stream(). The presentation emphasizes thinking declaratively rather than imperatively in Java 8 and leveraging lambda expressions to let Java do more of the work.
Priyanka Pradhan presents an introduction to the Java programming language. Java is an object-oriented language that is platform independent. The document discusses what Java is, the tools needed like the JDK and text editor, how to set the path and compile/run a "Hello World" program. It also covers Java concepts like classes, objects, inheritance, interfaces, and the basics of creating objects and using constructors.
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
Kotlin is a programming language that can be used for Android development. It is interoperable with Java and compiles to JVM bytecode. Some key features of Kotlin discussed in the document include null safety, properties, functions, classes, inheritance, and Android integration. Kotlin code can inherit from and call Java code, and most Android APIs are written in Java so they can be called from Kotlin as well. The document provides examples of Kotlin syntax for variables, control flow, collections, and comparing Kotlin and Java implementations of common patterns like fragments. References are also included for further Kotlin learning resources.
Dart is an open-source programming language developed by Google that is used to build web, server, and mobile applications. It is designed to be familiar to developers from languages like JavaScript, Java, and C# but also supports strong typing. Dart aims to help developers build complex, high-fidelity client apps for the modern web. It compiles to JavaScript to run in the browser or to native code to run mobile apps. Dart supports key features like classes, mixins, asynchronous programming, and isolates for concurrency.
Groovy is a dynamic language for the Java Virtual Machine that aims to bring dynamic capabilities like Python and Ruby to Java developers. It has many features inspired by dynamic languages like closures, duck typing and metaprogramming, but also maintains compatibility with Java by having a Java-like syntax and the ability to interoperate with Java code. Groovy code can either be run directly from scripts or compiled into Java bytecode to be used within Java applications.
This document provides an overview of Groovy, including:
- Groovy is a dynamic language for the Java platform that adds features like closures and operator overloading.
- It started in 2003 and the latest version is 2.4.
- Groovy allows for dynamic typing, closure support, easier setup than Java, and integration with existing Java code and libraries.
- Key Groovy features covered include closures, operator overloading, GString, dynamic vs static typing, and working with files.
The document discusses the new features of Java 17, including a simpler free-to-use license valid for one year, long-term customer support to make migrations easier, support for cloud adoption through new management services, and expanded platform support for Arm 64-based computers. It concludes by introducing Ksolves as offering Java development services.
Java is an object-oriented programming language initially developed by Sun Microsystems. It was released in 1995. Key points:
- Java can be used to develop client-side standalone applications, applets for webpages, and server-side applications.
- It introduced the Java Virtual Machine (JVM) which allows Java programs to run on any platform that supports the JVM.
- Java's use of bytecode makes it portable and able to run on any device with a JVM, earning it the label of "Write Once, Run Anywhere".
Here I discuss about Java programming language and easiest way to solve programming problem. Java basic syntax and their uses are described briefly so that anyone can easily understand within very short time. If anyone follow the slide with proper way,I assure that he or she will find java programming interesting.
There are several JavaScript libraries available in the world of web programming. And, as the usage and complexity is increasing day by day, sometimes it becomes very difficult and confusing to understand and create modules using those libraries, especially for those having strong background of Object Oriented Languages.
So this one hour session will make an effort to go into the very basics of JavaScript and put a base for writing modular JavaScript code.
This document provides an overview of Spring Boot and some of its key features. It discusses the origins and modules of Spring, how Spring Boot simplifies configuration and dependency management. It then covers examples of building Spring Boot applications that connect to a SQL database, use RabbitMQ for messaging, and schedule and run asynchronous tasks.
OCP Java (OCPJP) 8 Exam Quick Reference CardHari kiran G
If you are preparing to appear for Oracle Certified Professional Java SE 8 Programmer (OCPJP 8) certification exam, this a reference card (sort of long cheat sheet) meant to help you. You may want to print this reference card for your easy and quick reference when you prepare for your exam.
The document summarizes some of the key new features in Java 17 including:
1. Long-term support for Java 17 which will be available in September 2021 and include features like records, text blocks, and enhanced null pointer exceptions.
2. Records, text blocks, helpful null pointer exceptions, pattern matching for switches, and sealed classes as some of the top new features in Java 17.
3. Enhancements to pseudo-random number generators with a new RandomGenerator interface and refactoring of legacy random classes.
Welcome to presentation on Spring boot which is really great and relatively a new project from Spring.io. Its aim is to simplify creating new spring framework based projects and unify their configurations by applying some conventions. This convention over configuration is already successfully applied in so called modern web based frameworks like Grails, Django, Play framework, Rails etc.
This document provides an overview of C# programming basics, including:
- C# is an object-oriented language where the basic unit is a class containing methods and variables.
- A C# program consists of at least one class that must contain a Main method, which acts as the program entry point.
- The document discusses basic C# concepts like variables, data types, operators, conditional statements, loops, methods, and arrays.
- It also covers how to compile and run a simple "Hello World" C# program, and provides examples of different programming constructs.
I used these slides to present the benefits of using Kotlin to a group of people I work with. The presentation focuses on comparing Kotlin to Java, and in particular showing how Kotlin can help in writing safer, more concise and readable code. I used a few java gotchas/puzzles to demonstrate how Kotlin may prevent us from doing silly things.
This document provides an outline for teaching Java programming concepts. It begins with introductions to object-oriented programming, Java's working process, and programming language hierarchy. Subsequent sections cover Java topics like variables, data types, statements, arrays, loops, methods, threads, classes, inheritance, polymorphism, abstract classes, interfaces, and GUI programming using Swing. The document aims to guide students through Java concepts with examples and projects at each stage.
Introduction to Spring's Dependency InjectionRichard Paul
This document provides an overview of dependency injection in Spring. It defines dependency injection as a form of inversion of control where objects are provided to classes rather than having classes create their own dependencies. It discusses the benefits of dependency injection such as loose coupling, easy switching of implementations, and enhanced testability. It also compares constructor injection and setter injection and describes how to configure dependency injection using XML, annotations, and Java configuration in Spring.
The document provides information about Core Java concepts including:
1. James Gosling initiated the Java language project in 1991 and Sun released the first public implementation as Java 1.0 in 1995 with the promise of "Write Once, Run Anywhere".
2. Oracle acquired Sun Microsystems in 2010 and has worked to build fully integrated systems optimized for performance.
3. The document discusses the differences between C++ and Java and covers Java concepts like objects, classes, methods, variables, data types, identifiers, arrays and the Java Virtual Machine (JVM).
The document discusses the Open/Closed Principle (OCP), which states that software entities should be open for extension but closed for modification. It provides an example of an OCP kata using a bowling scoring problem. Programmers are instructed to write tests, then refactor the code by changing the object composite returned by a factory to make each new test pass without modifying existing code. The document also provides credits to people involved in developing and promoting OCP and related katas.
The document is a presentation on lambda expressions in Java 8 given by Isaac Carter. It introduces lambda expressions and functional programming concepts in Java 8 such as functional interfaces, streams, and method references. It provides examples of using lambda expressions with common Java 8 APIs like forEach(), Predicate, and stream(). The presentation emphasizes thinking declaratively rather than imperatively in Java 8 and leveraging lambda expressions to let Java do more of the work.
Priyanka Pradhan presents an introduction to the Java programming language. Java is an object-oriented language that is platform independent. The document discusses what Java is, the tools needed like the JDK and text editor, how to set the path and compile/run a "Hello World" program. It also covers Java concepts like classes, objects, inheritance, interfaces, and the basics of creating objects and using constructors.
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
This is First Lecture of java Programming which cover all basic points (ie. History and feature of java, Introduction to java, about variables data type and compilation....
Kotlin is a programming language that can be used for Android development. It is interoperable with Java and compiles to JVM bytecode. Some key features of Kotlin discussed in the document include null safety, properties, functions, classes, inheritance, and Android integration. Kotlin code can inherit from and call Java code, and most Android APIs are written in Java so they can be called from Kotlin as well. The document provides examples of Kotlin syntax for variables, control flow, collections, and comparing Kotlin and Java implementations of common patterns like fragments. References are also included for further Kotlin learning resources.
Dart is an open-source programming language developed by Google that is used to build web, server, and mobile applications. It is designed to be familiar to developers from languages like JavaScript, Java, and C# but also supports strong typing. Dart aims to help developers build complex, high-fidelity client apps for the modern web. It compiles to JavaScript to run in the browser or to native code to run mobile apps. Dart supports key features like classes, mixins, asynchronous programming, and isolates for concurrency.
Go is a general purpose programming language created by Google. It is statically typed, compiled, garbage collected, and memory safe. Go has good support for concurrency with goroutines and channels. It has a large standard library and integrates well with C. Some key differences compared to other languages are its performance, explicit concurrency model, and lack of classes. Common data types in Go include arrays, slices, maps, structs and interfaces.
Dart 1 In Dart, a programming language developed by Google, data types are us...ssuserdb9909
In Dart, a programming language developed by Google, data types are used to define the type of data a variable can hold. Dart is a statically typed language, meaning the type of a variable is known at compile-time, but it also supports type inference, so you don't always have to explicitly declare the type.
Introduction to Groovy (Serbian Developer Conference 2013)Joachim Baumann
The document provides an overview of the Groovy programming language. It discusses key features of Groovy including that everything in Groovy is an object, its support for closures as first-class functions, and dynamic typing. Examples are given demonstrating how Groovy code is more concise than Java for common tasks like XML parsing, building a simple web server, and creating domain specific languages.
Primitive data types in Objective-C include int, float, double, and char. Loops like for, while, and do-while are used to repeatedly execute code. Decision making statements include if-else, if-else if-else, switch, and the conditional operator. The document discusses these programming concepts and provides examples of defining and using variables of different data types, loops, and conditional statements in Objective-C code.
This document discusses Kotlin coroutines and how they can be used with the Spring Framework. It provides an overview of coroutines, explaining concepts like fibers, green threads, and suspendable computations. It also covers using coroutines with Spring features like the @Async annotation and asynchronous MVC return types. The document provides code examples of coroutines concepts like channels, jobs, and yielding in sequences.
Introduction to Kotlin Language and its application to Android platformEastBanc Tachnologies
Author: Oleg Godovykh, eastbanctech.com
Kotlin is a new programming language built by Jetbrains and is a new member of JVM family. As opposed to typical reason to introduce some new language, Kotlin main goal isn't to create new paradigm or fill a new niche, but to make routine tasks much easier and safer. Kotlin gains popularity across Android developer community, and in this presentation it is shown how Kotlin usage can dramatically simplify typical mobile app development.
This document provides an overview of the JavaScript programming language, including its history, key concepts, values, objects, and functions. It summarizes JavaScript as a dynamic language that unifies objects and functions, uses prototype-based inheritance, and loosely typed values. Everything in JavaScript is an object, which can be used to represent records, trees, and other data structures using dynamic object literals.
This document provides an introduction to the Java programming language concepts covered in the CAP615: Programming in Java course. It discusses computer programs and the Java language features like being easy to develop, platform independent, portable, multithreaded, distributed and object oriented. It also covers Java development environment, running and testing programs, classes and objects, defining fields and methods, variables, strings, numbers, operators, if/else statements and loops.
Full CSE 310 Unit 1 PPT.pptx for java languagessuser2963071
This document discusses Java programming fundamentals including naming conventions, data types, literals, and writing a basic Java program. It covers lowercase and uppercase naming rules for variables, methods, and classes. It also describes numeric, boolean, character, and string literals. Key data types like int, float, char, and their ranges are explained. The document provides examples of type conversion, casting, and type promotion in expressions. It concludes with steps for compiling and running a Java program.
This document discusses Java variables, data types, and operators. It covers the basics of declaring variables in Java, including primitive and non-primitive data types. It also describes different types of variables, literals, casting, and operators such as arithmetic, assignment, comparison, and logical operators. Examples are provided to demonstrate variable declaration and usage of various operators.
This document provides an introduction and overview of PHP and MySQL. PHP is a programming language used for building dynamic web sites. It allows embedding code within HTML pages to quickly create dynamic content. PHP is processed on the server side to produce HTML results. The document outlines PHP basics like syntax, variables, strings, operators, and conditional statements. It also discusses MySQL, the most popular database used with PHP. The document concludes with exercises for users to practice basic PHP concepts.
Software Engineering Thailand: Programming with ScalaBrian Topping
Meet-up, May 28, 2015, Launchpad, Bangkok. http://www.meetup.com/Software-Engineering-Thailand/events/222548484/.
Apologies for the rendering quality not matching the presentation, I did these with Apple Keynote and Slideshare does not support this format. I will try to edit them when there is more time.
Thanks to Bangkok LaunchPad (https://www.facebook.com/launchpadhq) for generously hosting this event!
The document discusses Mphasis Limited's annual report for 2018, which outlines their refreshed brand identity focused on being a global customer-centric technology company. It describes their Front2Back transformation approach using cloud and cognitive technologies to provide personalized digital experiences for clients. The report also highlights some of Mphasis' key service offerings that apply technologies like artificial intelligence to help clients stay ahead in a changing world.
Natural Language Processing using JavaScript "Natural" Library. This deck covers Natural Language Understanding using JavaScript "Natural" library in detail
Turing Machine automated manual processes like tabulating data to reduce effort and time. Systems like IBM's Mainframes were computing powerhouses but needed explicit programming using rules. Personal computers and the internet automated more business processes using structured data. Modern systems use machine learning to analyze unstructured data and make predictions without being explicitly programmed. Cognitive services now offer predictive analytics capabilities through APIs. While still narrow AI, systems are blurring the physical and virtual through robotics, IoT, and conversational interfaces. The third era of computing involves cognitive systems and AI that can learn from data to perform tasks without being explicitly programmed.
Go is a statically typed, compiled programming language designed for building simple, reliable, and efficient software. Some key points:
- Go is natively compiled and uses static typing with type inference. It is targeted for system programming and server-side applications.
- It was created at Google in 2007 to address issues with other languages like dependency management, garbage collection, and support for concurrency.
- Popular users include Google, Docker, Dropbox, SoundCloud, and MongoDB. Domains it is used include distributed systems, cloud, web development, and systems programming.
- Key features include built-in concurrency and networking support, a rich standard library, and fast compilation. It aims to be
Discussed in detail about how to design and develop custom skills (think custom apps) for Amazon Alexa Voice service.
Discusses how to design voice based experiences in detail.
Workflows are a key component of server side of IoT solution along with Analytics, Rule Engine and IoT device management. IoT focused Workflow tools draw their inspiration of classical workflow tools that exist in market, but focus more on IoT use cases. For example they are able to connect with IoT devices using IoT specific protocols like CoAP or MQTT. Node-RED is a visual tool for wiring together hardware devices, APIs and online services in new and interesting ways. It’s build by IBM Emerging Technology team from group for IoT, though it’s not limited only to IoT.
Mphasis Digital - Use Go (gloang) for system programming, distributed systems...Aniruddha Chakrabarti
Go is presented as an alternative to C and C++ for system programming, distributed systems, and cloud workloads. It has performance characteristics of C/C++ but also flexibility of modern languages. Go is well-suited for web development with various frameworks and is supported on cloud platforms like Google Cloud and AWS. The document argues that Go will emerge as a strong alternative to C/C++ in these areas.
Using Swift for all Apple platforms (iOS, watchOS, tvOS and OS X)Aniruddha Chakrabarti
Swift has gained widespread popularity in just an year. So much so that Swift have emerged as the de-facto standard programming language for all Apple platforms including iOS, watchOS, tvOS and OS X. Apple also open sources Swift and soon after IBM ported Swift to Linux. Swift incorporates the language innovations that have happened in the last two decades. Swift is a compiled programming language and belongs to the ‘C’ family of languages similar to C++, Java, C#, Objective-C and D. Swift is influenced by dynamic programming languages like Python, Ruby and functional programming languages like Haskell.
Future of .NET - .NET on Non Windows Platforms. .NET has been so far targeted towards Windows only. Now Microsoft created a subset of .NET called .NET Core that would run on Linux and OS X apart from Windows.
High level overview of CoAP or Constrained Application Protocol. CoAP is a HTTP like protocol suitable for constrained environment like IoT. CoAP uses HTTP like request response model, status code etc.
Mphasis Digital POV - Emerging Open Standard Protocol stack for IoTAniruddha Chakrabarti
1) The document discusses emerging open and standardized protocols for the Internet of Things (IoT), as IoT projects currently face challenges selecting technology stacks due to a lack of standardization.
2) It describes several standardized protocols for different layers of the TCP/IP model that are being used for IoT, including IEEE 802.15.4 for the network/link layer, 6LoWPAN for adapting IPv6 packets to IEEE 802.15.4 links, UDP and DTLS for the transport layer, and CoAP and MQTT for the application layer.
3) CoAP is presented as a specialized web transfer protocol for constrained environments like IoT, serving a similar purpose to HTTP with features tailored
LevelDB is an embedded key-value store developed by Google that is optimized for fast read and write operations. It can be used as an embedded database or with networking protocols. LevelDB stores data on disk and supports keys and values in arbitrary byte arrays. The LevelUp Node.js wrapper provides an interface to perform common operations like put, get, delete, batch operations, and iterating over data streams. LevelDB can store JSON objects by setting the valueEncoding option to 'json'.
This document provides an overview of the Lisp programming language. It begins with some notable quotes about Lisp praising its power and importance. It then covers the basic syntax of Lisp including its use of prefix notation, basic data types like integers and booleans, and variables. It demonstrates how to print, use conditional statements like IF and COND, and describes lists as the core data structure in Lisp.
CoffeeScript is a programming language that transcompiles to JavaScript. It adds syntactic sugar like Ruby, Python and Haskell to enhance JavaScript's brevity and readability. Some key features include list comprehension, pattern matching, lambda functions, class statements, and optional braces and parentheses. CoffeeScript is used by companies like Dropbox, GitHub and Microsoft TypeScript. It influenced the development of ECMAScript 6.
memcached Distributed Cache. memcached is the most popular cache solution for low latency high throughput websites. improves the read timings drastically.
Provides an overview of Redis which is a Key Value NoSQL database and the different data types it supports. Also shows how to use Redis Client API from node.
- Pebble was founded in 2011 and launched its first smartwatch in 2013 through a record breaking Kickstarter campaign. It has since launched additional models.
- There are two types of Pebble apps: PebbleFace apps developed using C SDK and PebbleApp apps developed using JavaScript. CloudPebble is an online IDE for developing PebbleFace apps without installing any software.
- Pebble apps utilize services like Bluetooth, battery, and time to respond to device events and update their UI. Common elements include windows, layers, and text layers. Buttons can be configured to handle click events.
TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. It adds static typing and structuring mechanisms like classes, interfaces, and modules to JavaScript to help catch errors and provide better documentation for large scale JavaScript application development. Some key features of TypeScript include optional static types for functions and variables, classes with inheritance and static methods, interfaces, modules, generics, and type inference.
Adobe Lightroom Classic Crack FREE Latest link 2025kashifyounis067
🌍📱👉COPY LINK & PASTE ON GOOGLE http://drfiles.net/ 👈🌍
Adobe Lightroom Classic is a desktop-based software application for editing and managing digital photos. It focuses on providing users with a powerful and comprehensive set of tools for organizing, editing, and processing their images on their computer. Unlike the newer Lightroom, which is cloud-based, Lightroom Classic stores photos locally on your computer and offers a more traditional workflow for professional photographers.
Here's a more detailed breakdown:
Key Features and Functions:
Organization:
Lightroom Classic provides robust tools for organizing your photos, including creating collections, using keywords, flags, and color labels.
Editing:
It offers a wide range of editing tools for making adjustments to color, tone, and more.
Processing:
Lightroom Classic can process RAW files, allowing for significant adjustments and fine-tuning of images.
Desktop-Focused:
The application is designed to be used on a computer, with the original photos stored locally on the hard drive.
Non-Destructive Editing:
Edits are applied to the original photos in a non-destructive way, meaning the original files remain untouched.
Key Differences from Lightroom (Cloud-Based):
Storage Location:
Lightroom Classic stores photos locally on your computer, while Lightroom stores them in the cloud.
Workflow:
Lightroom Classic is designed for a desktop workflow, while Lightroom is designed for a cloud-based workflow.
Connectivity:
Lightroom Classic can be used offline, while Lightroom requires an internet connection to sync and access photos.
Organization:
Lightroom Classic offers more advanced organization features like Collections and Keywords.
Who is it for?
Professional Photographers:
PCMag notes that Lightroom Classic is a popular choice among professional photographers who need the flexibility and control of a desktop-based application.
Users with Large Collections:
Those with extensive photo collections may prefer Lightroom Classic's local storage and robust organization features.
Users who prefer a traditional workflow:
Users who prefer a more traditional desktop workflow, with their original photos stored on their computer, will find Lightroom Classic a good fit.
PDF Reader Pro Crack Latest Version FREE Download 2025mu394968
🌍📱👉COPY LINK & PASTE ON GOOGLE https://dr-kain-geera.info/👈🌍
PDF Reader Pro is a software application, often referred to as an AI-powered PDF editor and converter, designed for viewing, editing, annotating, and managing PDF files. It supports various PDF functionalities like merging, splitting, converting, and protecting PDFs. Additionally, it can handle tasks such as creating fillable forms, adding digital signatures, and performing optical character recognition (OCR).
Solidworks Crack 2025 latest new + license codeaneelaramzan63
Copy & Paste On Google >>> https://dr-up-community.info/
The two main methods for installing standalone licenses of SOLIDWORKS are clean installation and parallel installation (the process is different ...
Disable your internet connection to prevent the software from performing online checks during installation
AgentExchange is Salesforce’s latest innovation, expanding upon the foundation of AppExchange by offering a centralized marketplace for AI-powered digital labor. Designed for Agentblazers, developers, and Salesforce admins, this platform enables the rapid development and deployment of AI agents across industries.
Email: [email protected]
Phone: +1(630) 349 2411
Website: https://www.fexle.com/blogs/agentexchange-an-ultimate-guide-for-salesforce-consultants-businesses/?utm_source=slideshare&utm_medium=pptNg
Get & Download Wondershare Filmora Crack Latest [2025]saniaaftab72555
Copy & Past Link 👉👉
https://dr-up-community.info/
Wondershare Filmora is a video editing software and app designed for both beginners and experienced users. It's known for its user-friendly interface, drag-and-drop functionality, and a wide range of tools and features for creating and editing videos. Filmora is available on Windows, macOS, iOS (iPhone/iPad), and Android platforms.
How can one start with crypto wallet development.pptxlaravinson24
This presentation is a beginner-friendly guide to developing a crypto wallet from scratch. It covers essential concepts such as wallet types, blockchain integration, key management, and security best practices. Ideal for developers and tech enthusiasts looking to enter the world of Web3 and decentralized finance.
Download YouTube By Click 2025 Free Full Activatedsaniamalik72555
Copy & Past Link 👉👉
https://dr-up-community.info/
"YouTube by Click" likely refers to the ByClick Downloader software, a video downloading and conversion tool, specifically designed to download content from YouTube and other video platforms. It allows users to download YouTube videos for offline viewing and to convert them to different formats.
Scaling GraphRAG: Efficient Knowledge Retrieval for Enterprise AIdanshalev
If we were building a GenAI stack today, we'd start with one question: Can your retrieval system handle multi-hop logic?
Trick question, b/c most can’t. They treat retrieval as nearest-neighbor search.
Today, we discussed scaling #GraphRAG at AWS DevOps Day, and the takeaway is clear: VectorRAG is naive, lacks domain awareness, and can’t handle full dataset retrieval.
GraphRAG builds a knowledge graph from source documents, allowing for a deeper understanding of the data + higher accuracy.
How Valletta helped healthcare SaaS to transform QA and compliance to grow wi...Egor Kaleynik
This case study explores how we partnered with a mid-sized U.S. healthcare SaaS provider to help them scale from a successful pilot phase to supporting over 10,000 users—while meeting strict HIPAA compliance requirements.
Faced with slow, manual testing cycles, frequent regression bugs, and looming audit risks, their growth was at risk. Their existing QA processes couldn’t keep up with the complexity of real-time biometric data handling, and earlier automation attempts had failed due to unreliable tools and fragmented workflows.
We stepped in to deliver a full QA and DevOps transformation. Our team replaced their fragile legacy tests with Testim’s self-healing automation, integrated Postman and OWASP ZAP into Jenkins pipelines for continuous API and security validation, and leveraged AWS Device Farm for real-device, region-specific compliance testing. Custom deployment scripts gave them control over rollouts without relying on heavy CI/CD infrastructure.
The result? Test cycle times were reduced from 3 days to just 8 hours, regression bugs dropped by 40%, and they passed their first HIPAA audit without issue—unlocking faster contract signings and enabling them to expand confidently. More than just a technical upgrade, this project embedded compliance into every phase of development, proving that SaaS providers in regulated industries can scale fast and stay secure.
Designing AI-Powered APIs on Azure: Best Practices& ConsiderationsDinusha Kumarasiri
AI is transforming APIs, enabling smarter automation, enhanced decision-making, and seamless integrations. This presentation explores key design principles for AI-infused APIs on Azure, covering performance optimization, security best practices, scalability strategies, and responsible AI governance. Learn how to leverage Azure API Management, machine learning models, and cloud-native architectures to build robust, efficient, and intelligent API solutions
Interactive Odoo Dashboard for various business needs can provide users with dynamic, visually appealing dashboards tailored to their specific requirements. such a module that could support multiple dashboards for different aspects of a business
✅Visit And Buy Now : https://bit.ly/3VojWza
✅This Interactive Odoo dashboard module allow user to create their own odoo interactive dashboards for various purpose.
App download now :
Odoo 18 : https://bit.ly/3VojWza
Odoo 17 : https://bit.ly/4h9Z47G
Odoo 16 : https://bit.ly/3FJTEA4
Odoo 15 : https://bit.ly/3W7tsEB
Odoo 14 : https://bit.ly/3BqZDHg
Odoo 13 : https://bit.ly/3uNMF2t
Try Our website appointment booking odoo app : https://bit.ly/3SvNvgU
👉Want a Demo ?📧 [email protected]
➡️Contact us for Odoo ERP Set up : 091066 49361
👉Explore more apps: https://bit.ly/3oFIOCF
👉Want to know more : 🌐 https://www.axistechnolabs.com/
#odoo #odoo18 #odoo17 #odoo16 #odoo15 #odooapps #dashboards #dashboardsoftware #odooerp #odooimplementation #odoodashboardapp #bestodoodashboard #dashboardapp #odoodashboard #dashboardmodule #interactivedashboard #bestdashboard #dashboard #odootag #odooservices #odoonewfeatures #newappfeatures #odoodashboardapp #dynamicdashboard #odooapp #odooappstore #TopOdooApps #odooapp #odooexperience #odoodevelopment #businessdashboard #allinonedashboard #odooproducts
Meet the Agents: How AI Is Learning to Think, Plan, and CollaborateMaxim Salnikov
Imagine if apps could think, plan, and team up like humans. Welcome to the world of AI agents and agentic user interfaces (UI)! In this session, we'll explore how AI agents make decisions, collaborate with each other, and create more natural and powerful experiences for users.
Societal challenges of AI: biases, multilinguism and sustainabilityJordi Cabot
Towards a fairer, inclusive and sustainable AI that works for everybody.
Reviewing the state of the art on these challenges and what we're doing at LIST to test current LLMs and help you select the one that works best for you
Proactive Vulnerability Detection in Source Code Using Graph Neural Networks:...Ranjan Baisak
As software complexity grows, traditional static analysis tools struggle to detect vulnerabilities with both precision and context—often triggering high false positive rates and developer fatigue. This article explores how Graph Neural Networks (GNNs), when applied to source code representations like Abstract Syntax Trees (ASTs), Control Flow Graphs (CFGs), and Data Flow Graphs (DFGs), can revolutionize vulnerability detection. We break down how GNNs model code semantics more effectively than flat token sequences, and how techniques like attention mechanisms, hybrid graph construction, and feedback loops significantly reduce false positives. With insights from real-world datasets and recent research, this guide shows how to build more reliable, proactive, and interpretable vulnerability detection systems using GNNs.
Exceptional Behaviors: How Frequently Are They Tested? (AST 2025)Andre Hora
Exceptions allow developers to handle error cases expected to occur infrequently. Ideally, good test suites should test both normal and exceptional behaviors to catch more bugs and avoid regressions. While current research analyzes exceptions that propagate to tests, it does not explore other exceptions that do not reach the tests. In this paper, we provide an empirical study to explore how frequently exceptional behaviors are tested in real-world systems. We consider both exceptions that propagate to tests and the ones that do not reach the tests. For this purpose, we run an instrumented version of test suites, monitor their execution, and collect information about the exceptions raised at runtime. We analyze the test suites of 25 Python systems, covering 5,372 executed methods, 17.9M calls, and 1.4M raised exceptions. We find that 21.4% of the executed methods do raise exceptions at runtime. In methods that raise exceptions, on the median, 1 in 10 calls exercise exceptional behaviors. Close to 80% of the methods that raise exceptions do so infrequently, but about 20% raise exceptions more frequently. Finally, we provide implications for researchers and practitioners. We suggest developing novel tools to support exercising exceptional behaviors and refactoring expensive try/except blocks. We also call attention to the fact that exception-raising behaviors are not necessarily “abnormal” or rare.
⭕️➡️ FOR DOWNLOAD LINK : http://drfiles.net/ ⬅️⭕️
Maxon Cinema 4D 2025 is the latest version of the Maxon's 3D software, released in September 2024, and it builds upon previous versions with new tools for procedural modeling and animation, as well as enhancements to particle, Pyro, and rigid body simulations. CG Channel also mentions that Cinema 4D 2025.2, released in April 2025, focuses on spline tools and unified simulation enhancements.
Key improvements and features of Cinema 4D 2025 include:
Procedural Modeling: New tools and workflows for creating models procedurally, including fabric weave and constellation generators.
Procedural Animation: Field Driver tag for procedural animation.
Simulation Enhancements: Improved particle, Pyro, and rigid body simulations.
Spline Tools: Enhanced spline tools for motion graphics and animation, including spline modifiers from Rocket Lasso now included for all subscribers.
Unified Simulation & Particles: Refined physics-based effects and improved particle systems.
Boolean System: Modernized boolean system for precise 3D modeling.
Particle Node Modifier: New particle node modifier for creating particle scenes.
Learning Panel: Intuitive learning panel for new users.
Redshift Integration: Maxon now includes access to the full power of Redshift rendering for all new subscriptions.
In essence, Cinema 4D 2025 is a major update that provides artists with more powerful tools and workflows for creating 3D content, particularly in the fields of motion graphics, VFX, and visualization.
2. What is Groovy
• Powerful, object oriented, and dynamic language (has features similar to other
popular dynamic languages like Python, Ruby and Smalltalk)
• Groovy is optionally typed
• Has static-typing and static compilation capabilities, for the Java platform aimed at
improving developer productivity
• Targeted for JVM – gets compiled to Java bytecode at runtime.
• Integrates smoothly with any Java program and libraries
• Very suitable for scripting though not limited to scripting.
A multi-faceted language for the Java platform
JVM
Java Scala Groovy Clojure Jython
CLR (.NET)
VB F# IronPythonC# IronRuby
Popular Language Virtual Machines
3. A bit of history
• August 2003 - James Strachan first talked about the development of Groovy
• b/w 2004 and 2006 - Several versions were released
• January 2007 - After the JCP standardization process began, the version
numbering changed and a version called "1.0" was released on.
… various betas and release candidates numbered
• December 2007 - Groovy 1.1 Final was released and immediately rebranded as
Groovy 1.5 as a reflection of the many changes made.
• November 2008 - SpringSource acquired the Groovy and Grails company (G2One).
In August 2009 VMWare acquired SpringSource
• July 2012 - Groovy 2.0 was released. Added static compilation and a static type
checker to Groovy.
• April 2013 - Groovy and Grails formed part of Pivotal (JV b/w EMC and VMware)
product portfolio.
• April 2015 - Pivotal ceased sponsoring Groovy and Grails from April 2015. Groovy
submitted to become a project at The Apache Software Foundation
6. • Groovy has gained quite a
lot of popularity in recent
times and have raised to
17th spot from 36th spot in
an year
• Most popular alternate to
Java on JVM platform
http://www.tiobe.com/tiobe_index
7. First program
• Groovy programs do not need a main entry point, as required in Java
• No need to explicitly specify System.out.println – only println is sufficient
println("Hello Groovy")
• Method calls can omit the parentheses if there is at least one parameter and there
is no ambiguity – so the program could be further simplified to
println "Hello Groovy"
9. Comments
• Single line comment
// this would print Hello Groovy to console
println("Hello Groovy")
• Multi line comment
/* This is
an example of
multiline comment */
println("Hello Groovy")
• Shebang line - understood by UNIX systems which allows scripts to be run directly
from the command-line.
#! single line comment in the format of shebang line
println "Hello from the shebang line"
# must be the first character of the file. Any indentation would yield a compilation error.
10. Variables and Type Inference
• Declared with explicit type declaration
int no = 1
bool isTodayHoliday = true
float salary = 1234.567
String message = "Hello World"
• Declared without any type declaration using def (type is inferred)
def no = 1 // implicitly typed to Integer
def isTodayHoliday = true // implicitly typed to Boolean
def salary = 1234.567 // implicitly typed to BigDecimal
def message = "Hello World“ // implicitly typed to String
11. Constants
• Declared with explicit type declaration
const PI = 3.14
println PI
PI = 3.17 // does not compile and throws a compile time error
12. Types
• Groovy supports the same primitive types as those defined by the Java Language
Specification
• Integral types - byte (8 bit), short (16 bit), int (32 bit) and long (64 bit)
• Floating point types - float (32 bit) and double (64 bit)
• boolean (true, false)
• char - 16 bit, usable as a numeric type, representing an UTF-16 code
• Primitive types are represented as wrapper classes (java.lang)
Primitive type Wrapper class
boolean Boolean
char Character
short Short
int Integer
long Long
float Float
double Double
def x = 10
println x
println x.getClass()
// class java.lang.Integer
13. Dynamic typing
• In contrast to statically typed languages like Java, C#, Groovy is a dynamically
typed language (like JavaScript) that supports dynamic typing
def x = 10 // integer
println x
x = "Hello World" // string
println x
x = true // boolean
println x
x = 123.4567 // double
println x
14. Strings
• Single quoted string – represents java.lang.String objects, does not support
interpolation
• Double quoted string – represents java.lang.String objects or
groovy.lang.Gstring (which supports interpolation). If interpolation is not used
then java.lang.String is used, otherwise groovy.lang.Gstring is used.
• Triple quoted string – allows multiline strings
def (name, org) = ["RK", "Mphasis"]
// same as def name = "RK"; def org = "Mphasis"
println("My name is ${name} and I work for ${org}")
println("My name is ${name} and I work for ${org}")
println('My name is ${name} and I work for ${org}')
My name is RK and I work for Mphasis
My name is RK and I work for Mphasis
My name is ${name} and I work for ${org}
15. String Interpolation
• Any Groovy expression can be interpolated in all string literals, apart from single
and triple single quoted strings.
• Interpolation is the act of replacing a placeholder in the string with its value upon
evaluation of the string.
• The placeholder expressions are surrounded by ${} or prefixed with $ for dotted
expressions.
def name = "Bill"
def age = 25
println("Name - $name , Age - $age")
println("2 + 3 = ${2 + 3}") // prints 2 + 3 = 5
def person = [name:"Bill",age:25]
println("Name - $person.name, Age - ${person.age + 1}")
// prints Name - Bill, Age - 26
16. Array
• Any Groovy expression can be interpolated in all string literals, apart from single
and triple single quoted strings.
• Interpolation is the act of replacing a placeholder in the string with its value upon
evaluation of the string.
• The placeholder expressions are surrounded by ${} or prefixed with $ for dotted
expressions.
String[] cities = ['Kolkata','Bangalore','Amsterdam']
println(cities)
println(cities.getAt(1)) // prints Bangalore
println(cities[1]) // prints Bangalore
println(cities instanceof String[]) // prints true
println(cities.length) // prints 3
println(cities.size()) // prints 3
17. if else
• Similar to Java
def age = 10
if (age >= 18 && age <= 60) {
println "You can vote, you have to stand in a queue"
}
else if (age > 60) {
println "You can vote but no need to stand in a queue"
}
else {
println "You cannot vote"
}
• Braces could be removed for single statement
if (age >= 18 && age <= 60)
println "You can vote, you have to stand in a queue"
else if (age > 60)
println "You can vote but no need to stand in a queue"
else
println "You cannot vote"
18. if else
• It’s possible to specify it in a single line –
def age = 20
if (age >= 18 && age <= 60) println "Can vote, come in queue"
else if (age > 60) println "Can vote right away"
else println "Cannot vote"
19. Turnery operator (elvis)
• Supports Turnery operator similar to Java –
def isFTE = false
def salary = isFTE == true ? 100 : 75
println salary // prints 75
• For value assignment checking null elvis operator ?: could be used
def defaultSalary
def salary = defaultSalary ?: 75
println salary // prints 75
defaultSalary = 150
salary = defaultSalary ?: 75
println salary // prints 150
20. switch
// Employee Type
// 1 = FTE,
// 2 = Contractor,
// 3 = Retired
def employeeType = 2
switch (employeeType) {
case 1:
println "You are FTE"
break
case 2:
println "You are Contractor"
break
case 3:
println "You are Retired"
break
}
// Employee Type - FTE, Contractor,
// Retired
def employeeType = "Retired"
switch (employeeType) {
case "FTE":
println "You are FTE"
break
case "Contractor":
println "You are Contractor"
break
case "Retired":
println "You are Retired"
break
}
• Java switch statements could be used for int only (or for byte , char and short that
gets converted to int when used for switch), Java 7 allows switching strings
• Groovy switch statements are more flexible than Java
21. switch (cont’d)
• Not only String, Int other types like enum also could be used in switch
enum Employees {
FTE, Contractor, Retired
}
def emp = Employees.FTE
switch (emp) {
case Employees.FTE:
println "You are a FTE"
break
case Employees.Contractor:
println "You are a Contractor"
break
case Employees.Retired:
println "You are Retired"
break
default:
println "Can not decide employee type"
}
22. while
• Groovy supports the usual while {…} loops like Java
• Groovy does not support do while
def ctr = 0
while (ctr < 5) {
println ctr
ctr++
}
23. for in loop
• Similar to Java for each
// primeNos is a list of single digit prime numbers
// List are similar to Arrays, but more powerful
def primeNos = [1,3,5,7]
for (no in primeNos){
println no
}
• Braces could be removed for single statement
def cities = ['Bangalore','Kolkata','London','Paris']
for (city in cities)
println city
24. Classical for loop
• Similar to Java for
for(int ctr=0;ctr<5;ctr++) {
println ctr
}
• Braces could be removed for single statement
for(int ctr=0;ctr<5;ctr++)
println ctr
25. Methods (Functions)
• A method is defined with a return type or with the def keyword, to make the return
type untyped.
• A method can also receive any number of arguments, which may not have their
types explicitly declared.
• Java modifiers can be used (public, private, protected) normally, and if no visibility
modifier is provided, the method is public.
// method declaration
def sayHello() {
println "Hello"
}
// method invokation
sayHello()
// Removing parenthesis for parameterless methods are not allowed
sayHello // this would not compile
// Java way ...
void sayHello(){
println "Hello"
}
26. Methods (cont’d)
// method declaration
def sayHello() {
println "Hello"
}
// method invokation
sayHello()
// Removing parenthesis for parameterless methods are not allowed
sayHello // this would not compile
27. Methods
// smilimar to Java, C
int add(int num1, int num2) {
return num1 + num2
}
// similar to dynamic languages
def sub(num1, num2) {
num1 - num2
}
// could be further shortended to
def mul(num1, num2) { num1 * num2 }
println(add(20, 10)) // 30
println(sub(20, 10)) // 10
println(mul(20, 10)) // 200
28. Methods – Named & Default Arguments
• Default arguments make parameters optional. If the argument is not supplied, the
method assumes a default value.
def add(i = 10, j = 20){
i+j
}
println(add()) // 30
println(add(200, 100)) // 300
println(add(100)) // 120
println(add(j=300, i = 200)) // 500
println(add(i=300)) // 320
29. Methods – varargs
• Groovy supports methods with a variable number of arguments.
• Denoted by … parameter name
def printMessage(message, ... props){
println message
println props
println props.length
}
printMessage("Hello")
printMessage("Hello","Arg1","Arg2")
printMessage("Hello",["Arg1","Arg2","Arg3","Arg4"])
30. Optionality (Low ceremony, Less friction)
• Optional parentheses - Method calls can omit the parentheses if there is at least
one parameter and there is no ambiguity
println 'Hello World'
println(Math.max(5, 10)) // parentheses are required here
• Optional Semicolon - Semicolons at the end of the line can be omitted, if the line
contains only a single statement.
String msg = "Hello"; def ctr = 10
• Optional return - the last expression evaluated in the body of a method or a closure
is returned. This means that the return keyword is optional.
• Optional public keyword - By default, Groovy classes and methods are public,
compared to private in Java
31. return statement is optional
• Single line comment
def add(num1, num2){
num1 + num2 // same as return num1 + num2
}
println(add(20,10)) // prints 30
33. Range
• Allows creating a sequence of values - influenced by Range type in Python which
behaves almost identical to Groovy Range. Not supported in Java.
• These can be used as List since Range extends java.util.List.
• Are specified using the double dot .. range operator between the left and the right
bound.
def nos = 1 .. 10 // 1 is left bound, 10 is right bound
println(nos) // [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
• The ..< range operator specifies a half-exclusive range--that is, the value on the
right is not part of the range
def nos = 1 .. <10 // 1 is left bound, 9 is right bound
println(nos) // [1, 2, 3, 4, 5, 6, 7, 8, 9]
• The range operator along with for in loop could be used for quick traversal
for (x in 1..5)
println(x)
34. Range (cont’d)
• Could be used for other types also, not only numeric types
def chars = 'a'..'g'
println(chars) // [a, b, c, d, e, f, g]
• Supports methods like size(), get(index), contains(value) etc
def nos = 1..10
println(nos.size()) // 10
println(nos.getAt(2)) // 3
println(nos[2]) // 3
println(nos.contains(2)) // true
println(nos.contains(12)) // false
35. List
• Lists are similar to Array, but is more flexible. List is an ordered collection of objects.
• Each list expression creates an implementation of java.util.List.
nos = [1,3,5,7]
println(nos) // prints [1,3,5,7]
• List elements could be accessed and updated using index
println(0) // prints 1 – index is 0 based
println(1) // prints 3
println(-1) // prints 3
println(-2) // prints 5
nos[0] = 11 // updates first or 0th element to 11
println(nos) // prints [11,3,5,7]
nos[1..3] = [13,15,17] // updates first or 0th element to 11
println(nos) // prints [11,13,15,17]
36. List
• Lists can contain elements of different types
nos = [1,3,5,7,'Kolkata','Bangalore']
• Elements could be added using +=
nos += [50,true,100,"Minneapolis"]
println(nos) // [1, 3, 5, 7, Kolkata, Bangalore, 50, true, 100, Minneapolis]
• Elements could be added using -=
nos -= ['Kolkata','Minneapolis','Bangalore',true]
println(nos) // [1, 3, 5, 7, 50, 100]
• Even * operator works with Lists
alph = ['a','c']
println(alph * 2) // [a,c,c,a]
println(alph * 3) // [a,c,c,a,a,c]
37. List
• Lists can contain elements of different types
def primes = []
primes.add(1)
primes.add(3)
primes.add(5)
println primes[1] // prints 3
println(primes.get(2)) // prints 5
println(primes.getAt(2)) // prints 5
primes[2] = 7
println primes[2] // prints 7
38. Map
• Collection that stores the key value pairs
• Maps store and retrieve values by key, whereas lists retrieve them by numeric
index.
• Called Dictionaries in some other languages.
def designations = [
11 : 'SVP',
10 : 'VP',
9 : 'AVP',
8 : 'Sr. Manager',
7 : 'Manager'
]
println designations[10] // prints VP
designations[10] = 'Vice President'
println designations[10] // prints Vice President
39. Map
• Keys can be strings also, need not only be int
def capitals = [
'IN' : 'New Delhi',
'USA' : 'Washington',
'UK' : 'London'
]
println capitals['IN'] // prints New Delhi
capitals['USA'] = 'Washington DC'
println capitals['USA'] // prints Washington DC
println capitals.size() // prints 3
40. Map
• Has methods to write and read key, value pairs.
def statusCodes = [:]
statusCodes.put(200,'OK')
statusCodes.put(400,'Bad Request')
println statusCodes.get(200)
41. Collection methods
• Has methods to write and read key, value pairs.
def languages = ['Java','Python','C#','Groovy']
println(languages.reverse()) // [Groovy, C#, Python, Java]
println(languages.sort(false)) // [C#, Groovy, Java, Python]
println(languages.contains('Ruby')) // false
println(languages.containsAll('Java','Groovy')) // true
42. Class
• Groovy classes are very similar to Java classes, compatible at JVM level.
• They may have methods and fields/properties, which can have the same modifiers
(public, protected, private, static, etc) as Java classes.
• Groovy classes are bit different from their Java counterparts -
• Public fields are turned into properties automatically, which results in less verbose code,
without so many getter and setter methods.
• Their declarations and any property or method without an access modifier are public.
• Classes do not need to have the same name of the files where they are defined.
• One file may contain one or more classes (if a file contains no classes, it is considered a
script)
class Employee{
def Name = ""
def Age = 0
}
def emp = new Employee()
emp.Name = "Bill"
emp.Age = 25
println("Name - $emp.Name , Age - $emp.Age")
43. Class constructor
• With Constructor
class Employee{
def Name; def Age
Employee(name, age){
this.Name = name
this.Age = age
}
}
def emp = new Employee("Bill", 25)
println("Name - $emp.Name , Age - $emp.Age")
44. Class (cont’d)
• With Method
class Employee{
def Name; def Age
Employee(name, age){
this.Name = name
this.Age = age
}
def increaseAgeBy(byAge){
this.Age += byAge
}
def displayInfo(){
println("Name - ${this.Name} , Age - ${this.Age}")
}
}
def emp = new Employee("Bill", 25)
emp.increaseAgeBy(5)
emp.displayInfo()
45. Class (cont’d)
• Class can have Static methods, properties and fields
class Employee{
def Name; def Age
def static RetirementAge = 60
Employee(name, age){ }
}
println(Employee.RetirementAge)
class Employee{
private static _minJoiningAgeMale = 21
private static _minJoiningAgeFemale = 18
def static getMinJoiningAge(isMale = true) {
if (isMale){
return _minJoiningAgeMale
}
else{
return _minJoiningAgeFemale
}
}
}
println(Employee.getMinJoiningAge())
println(Employee.getMinJoiningAge(isMale = false))
46. Inner Class
• Inner classes are defined within another classes.
• The enclosing class can use the inner class as usual. On the other side, a inner class can
access members of its enclosing class, even if they are private.
• Classes other than the enclosing class are not allowed to access inner classes.
class Employee {
def name = ""; boolean isFTE = true
def GetSalary(){
def calc = new EmployeeSalaryCalculator()
calc.CalculateSalary()
}
class EmployeeSalaryCalculator{ // EmployeeSalaryCalculator is inner class
def CalculateSalary(){
if (isFTE) // can access field/properties of declaring class
100
else
75
}
}
}
def emp = new Employee()
emp.name = "Bill"
println(emp.GetSalary())
47. Inheritance
• Similar to Java inheritance, single inheritance tree - Inheritance from multiple
parent classes now allowed.
class Human {
def Talk(){
println "Human.Talk"
}
}
class Employee extends Human {
def Work(){
println "Employee.Work"
}
}
def e = new Employee()
e.Talk()
e.Work()
48. Inheritance (cont’d)
• Single inheritance tree - Inheritance from multiple parent classes now allowed.
class Living {
def name = ""
def walk() {
println "Living Walk"
}
}
class Human{
def think() {
println "Human Think"
}
}
class Employee extends Living, Human{ // Does not compile
def work() {
println "Employee Work"
}
}
def emp = new Employee()
emp.name = "AC"
emp.walk()
emp.think()
emp.work()
49. Abstract Class
• Abstract classes represent generic concepts, thus, they cannot be instantiated.
• Their members include fields/properties and abstract or concrete methods.
• Abstract methods do not have implementation, and must be implemented by concrete
subclasses.
• Abstract classes can have concrete methods, but should have atleast one abstract method
abstract class Living {
def name = ""
def walk()
println "Living Walk"
abstract def think()
}
class Human extends Living {
def think()
println "Human Think"
}
def human = new Human()
human.name = "AC"
human.walk() // Living Walk
human.think() // Human Think
50. Interface
• Defines a contract that a class needs to conform to - only defines a list of methods
that need to be implemented, but does not define the methods implementation.
interface Walkable{
def walk()
}
interface Runnable{
def run()
}
class Human implements Walkable,Runnable{
def walk(){
println "I can walk"
}
def run(){
println "I can run"
}
}
def human = new Human()
human.walk() // print “I can walk”
human.run() // print “I can run”
51. enum
enum Employees {
FTE, Contractor
}
def emp = Employees.FTE
switch (emp) {
case Employees.FTE:
println "You are a FTE"
break
case Employees.Contractor:
println "You are a Contractor"
break
}
52. Exception handling
• Same as Java – supports try, catch, finally. Supports multi catch similar to Java
def main(){
def errorType = 1
try {
switch(errorType) {
case 0:
throw new ArithmeticException("Can not divide by zero")
break
case 1:
throw new IOException("IO exception ocurred")
break
case 2:
throw new Exception("Looks like something went wrong")
break
}
}
catch(ArithmeticException | IOException ex) {
println ex
}
catch(Exception ex) {
println ex
}
finally {
println "finallly block called"
}
}
main()
53. GDK – Groovy Development Kit
• Similar to JDK, Groovy has a GDK (Groovy Development Kit) that has extra
functionality (additional API) on top of Java JDK.
• Example – Additional functionality for string and number type, File handling, I/O,
additional Date & Calendar classes etc.
def str = "Groovy"
println str
println(str.count("o"))
println(str.contains("g"))
println(str.center(20))
println(str.multiply(4))
println(str.reverse())
println(str.minus("vy"))
str = "notepad"
str.execute()
55. Closure
• In Groovy, Closure is anonymous block of code that can take arguments, return a
value and be assigned to a variable
• Closures could be passed as parameter to functions and could be returned from
functions
• A closure may reference variables declared in its surrounding scope.
• Closure syntax -
{ [closureParameters -> ] statements }
def var_name = { [closureParameters -> ] statements }
56. Closure
• Without a parameter
def work = { println "Work Called" }
work()
• With a parameter
def sayHello = { name -> println("Hello $name") }
sayHello("Shreya")
def add = { a,b -> a+b }
// this is same as declaring a regular method/function
// def add2(a,b) { return a+b }
println(add(20,10))
57. Closure Parameters
• Parameters of closures follow same principle as parameters of regular methods:
• an optional type
• a name
• an optional default value
• parameters are separated by comma
def add = { a, b=100 -> a+b } // b has a default value of 100
println(add(20))
def sub = { a=20, b=10 -> a-b } // both a & b has default values
println(add(b:120, a:90))
def sub = { a=20, b=10 -> a-b } // both a & b has default values
println(sub(b=120, a=90))
• With a parameter
58. Currying
• In Groovy, currying refers to the concept of partial application.
• Currying in Groovy will let you set the value of one parameter of a closure, and it
will return a new closure accepting one less argument.
• It does not correspond to the real concept of currying in functional programming
because of the different scoping rules that Groovy applies on closures.
Left Currying: Sets the left most parameter of a closure
def displayMsg = {noOfTimes, message -> println(message * noOfTimes) }
displayMsg(5, "Hello") // prints HelloHelloHelloHelloHello
// First Level of Currying – sets the first most parameter of the
// closure noOfTimes to 2
def displayMessageTwice = displayMsg.curry(2)
displayMessageTwice("Groovy") // prints GroovyGroovy
// Second Level of Currying
def displayHelloTwice = displayMessageTwice.curry("Hello")
displayHelloTwice() // prints HelloHello
59. Currying
Right Currying: Sets the right most parameter of a closure
def displayMsg = {noOfTimes, message -> println(message * noOfTimes) }
displayMsg(5, "Hello") // prints HelloHelloHelloHelloHello
// First Level of Currying – sets the right most parameter of the
// closure message to Groovy
def displayGroovy = displayMsg.rcurry("Groovy")
displayGroovy(3) // prints GroovyGroovyGroovy
// Second Level of Currying
def displayGroovyFourTimes = displayGroovy.rcurry(4)
displayGroovyFourTimes() // prints GroovyGroovyGroovyGroovy
60. Trait (aka Mixins)
• Single line comment
GrandParent
Parent
Child
Single Inheritance
Parent1
Child
Parent2
Multiple Inheritance using
Inheritance hierarchy
GrandParent1 GrandParent2 Vehicle
Car HasAC
Mixin
Base class
Inheritance hierarchy
61. Trait
• Single line comment
trait Flyable{
def fly(){
println "I can fly"
}
}
trait Runnable{
def run(){
println "I can run"
}
}
class Bird implements Flyable, Runnable{
}
def bird = new Bird()
bird.run() // prints "I can run"
bird.fly() // prints "I can fly"
62. Groovy style guide
• Do not use semicolon for terminating statement / end of line
• Not using return statement
• Do not use both def and type while declaring variables (def String city = “Blore”) –
use either def or type
• For scripting def is more suitable for most cases
• Do not use explicitly public for classes and methods as Groovy makes them public
by default
• Use Groovy properties instead of private backing field and java style getter, setter
• User string interpolation instead of manually formatting the string
• Try to use Groovy Collection classes (range, list, map) before Java collection
classes
http://www.groovy-lang.org/style-guide.html