The document discusses Domain Specific Languages (DSLs) and how they can be implemented in Kotlin. It provides examples of using Kotlin features like infix notation, sealed classes, higher order functions, lambda receivers and parameters to build internal DSLs for SQL queries, HTML markup, and a cake recipe. The document also demonstrates how Kotlin can be used to build DSLs for unit testing by chaining functions together to represent the given-when-then structure in a readable way.
Starting with JSON Path Expressions in Oracle 12.1.0.2Marco Gralike
This document discusses new features in Oracle Database 12c that allow it to be used as a JSON document store. Key features include the ability to store and index JSON documents, access and query JSON data via SQL operators and functions, load JSON documents into the database using SQL*Loader, and index JSON columns to enable faster querying. The document provides details on the JSON operators, functions, indexing options, and how to validate and retrieve JSON content from the database.
UKOUG Tech14 - Getting Started With JSON in the DatabaseMarco Gralike
Presentation used during the UKOUG Tech14 conference in Liverpool (UK) discussing possibilities of the use of, and explaining, the new JSON database functionality in the Oracle 12.1.0.2 database
The Ring programming language version 1.5.1 book - Part 26 of 180Mahmoud Samir Fayed
This document provides documentation on ODBC functions in the Ring programming language. It describes functions for initializing an ODBC connection, getting lists of drivers and data sources, connecting and disconnecting from databases, executing queries, fetching and retrieving result data, and managing transactions with commit and rollback. Examples are provided demonstrating how to use many of these functions like getting driver lists, executing a query and printing results, and inserting data into a table within a transaction.
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...Marco Gralike
This document discusses using Oracle's in-memory column store capabilities to improve performance of XML data stored and queried using XMLType. Key points include selectively applying in-memory storage to columns and indexes for XML data, issues with optimization and costs not fully accounting for performance gains, and opportunities for further optimization of XML retrieval using DOM/XOM. In-memory storage can significantly boost XML performance but careful design is still required.
Learn to manipulate strings in R using the built in R functions. This tutorial is part of the Working With Data module of the R Programming Course offered by r-squared.
The Ring programming language version 1.10 book - Part 36 of 212Mahmoud Samir Fayed
This document provides documentation on ODBC functions in the Ring programming language. It describes functions for initializing an ODBC connection, getting driver and data source lists, connecting to and disconnecting from databases, executing queries, fetching results, and managing transactions. Examples are given showing how to use the functions to print ODBC information, execute queries, and commit or rollback transactions. The functions provided allow for full functionality in connecting Ring programs to databases using ODBC.
Starting with JSON Path Expressions in Oracle 12.1.0.2Marco Gralike
This document discusses new features in Oracle Database 12c that allow it to be used as a JSON document store. Key features include the ability to store and index JSON documents, access and query JSON data via SQL operators and functions, load JSON documents into the database using SQL*Loader, and index JSON columns to enable faster querying. The document provides details on the JSON operators, functions, indexing options, and how to validate and retrieve JSON content from the database.
UKOUG Tech14 - Getting Started With JSON in the DatabaseMarco Gralike
Presentation used during the UKOUG Tech14 conference in Liverpool (UK) discussing possibilities of the use of, and explaining, the new JSON database functionality in the Oracle 12.1.0.2 database
The Ring programming language version 1.5.1 book - Part 26 of 180Mahmoud Samir Fayed
This document provides documentation on ODBC functions in the Ring programming language. It describes functions for initializing an ODBC connection, getting lists of drivers and data sources, connecting and disconnecting from databases, executing queries, fetching and retrieving result data, and managing transactions with commit and rollback. Examples are provided demonstrating how to use many of these functions like getting driver lists, executing a query and printing results, and inserting data into a table within a transaction.
OakTable World 2015 - Using XMLType content with the Oracle In-Memory Column...Marco Gralike
This document discusses using Oracle's in-memory column store capabilities to improve performance of XML data stored and queried using XMLType. Key points include selectively applying in-memory storage to columns and indexes for XML data, issues with optimization and costs not fully accounting for performance gains, and opportunities for further optimization of XML retrieval using DOM/XOM. In-memory storage can significantly boost XML performance but careful design is still required.
Learn to manipulate strings in R using the built in R functions. This tutorial is part of the Working With Data module of the R Programming Course offered by r-squared.
The Ring programming language version 1.10 book - Part 36 of 212Mahmoud Samir Fayed
This document provides documentation on ODBC functions in the Ring programming language. It describes functions for initializing an ODBC connection, getting driver and data source lists, connecting to and disconnecting from databases, executing queries, fetching results, and managing transactions. Examples are given showing how to use the functions to print ODBC information, execute queries, and commit or rollback transactions. The functions provided allow for full functionality in connecting Ring programs to databases using ODBC.
JavaZone 2022 - Building Kotlin DSL.pdfAnton Arhipov
The document discusses Kotlin DSL and provides examples of using Kotlin as a domain specific language. It demonstrates how to build type-safe builders using Kotlin, including defining DSL blocks, extension functions and properties, infix notation, lambda receivers, and context receivers to define internal and external DSLs. Code samples are provided of building clients and dates using DSL syntax and context requirements.
Android Developer Group Poznań - Kotlin for Android developers
STXInsider example project in Kotlin:
https://github.com/kosiara/stx-insider
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, has clear benefits for developers on one hand and keeps short compile times on the other.
As a mobile team we got interested in Kotlin a few months before its final release which gave us time to test it thoroughly before production use. The language has some clear advantages for an Android programmer - it enables migration from Java projects that have been under development for some time already. Java&Kotlin coexistence simplifies Kotlin introduction as only new functionality is written in JetBrain’s new language leaving all the legacy code untouched.
Transitioning gives the developer an opportunity to use lambdas, new syntax for data objects, extension functions to easily expand Android SDK’s classes functionality and infix notation to write DSL-like structures. Almost all the libraries you use today will work with Kotlin thanks to 100% Java compatibility. The same is true for Android SDK classes - all of them will seamlessly work with the new programming language. Kotlin gives you more choice when it comes to reflection, creating documentation and being null-pointer safe. Android works great with it out of the box so you won’t need to change your development habits.
Our production project in Kotlin turned out to be a success after 4 months of development. We had 0 bugs related to Kotlin as a programming language. Our code footprint is almost 30% smaller thanks to JetBrain’s, we benefit from nullpointer safety, closures, translated enums, data objects and use infix notation for logging and displaying Snackbars.
===========
In this presentation you'll find basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
We look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
Ubiratan Soares - Software Engineer da Stone, fala sobre Kotlin : Advanced Tricks no Kotlin Community Summit 2018.
https://eventos.imasters.com.br/kotlinsummit/
Saiba mais em
DSLs are everywhere. Have you ever used SQL, Ant or maybe HTML? If so you were using a DSL, maybe without realizing it. Domain-Specific Languages, or DSLs, provide convenient syntactical means of expressing goals in a given problem domain. A well-crafted DSL communicates the essence and means of the domain it represents in a natural way, so that you don’t even think about its underlying technology.
Scala’s rich, flexible syntax combined with its OO and functional features makes writing DSLs a breeze. In this talk I'll introduce the concept of DSLs, where to best apply them, their pros and cons, and how to integrate DSLs into your core application. We will see a practical example of how to lever the tools Scala gives us and build our very own tax calculation DSL.
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
Dopo 20 anni Java inizia a sentire il peso degli anni e la sua sintassi non evolve come vorremmo, ma la JVM resta sempre un ambiente affidabile ed è già in produzione presso moltissime aziende. Negli ultimi anni sono usciti molti linguaggi basati sulla JVM, ma non tutti hanno avuto il successo sperato. Kotlin ha conquistato Android e, ora, grazie a una sintassi intuitiva e grandi aziende che lo supportano potrebbe essere molto utilizzato anche nelle applicazioni web. Durante il talk vedremo le basi del linguaggio e come sviluppare una applicazione web pronta ad andare in produzione.
Kotlin: forse è la volta buona (Trento)Davide Cerbo
Kotlin: perhaps this time is the right time
This document summarizes a presentation given at the Jug Day event in Trento, Italy on May 19, 2018. The presenter, Davide Cerbo, has over 10 years of experience in full-stack development. He discusses the history of Java and how Kotlin has evolved to address issues with Java, such as backward compatibility. Kotlin integrates seamlessly with Java at the source code level and reduces lines of code by about 40% compared to Java. It is considered a safer alternative to Java that is also easy to learn for Java developers.
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016STX Next
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
StxNext Lightning Talks - Feb 12, 2016
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice when it comes to Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and on the other - keeping short compile times.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up an Android-kotlin project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin usage is presented and the language is compared to SCALA and SWIFT.
"The joy of Scala" - Maxim Novak / Wix
Around eight years ago I started my journey as a developer. Since then, I've played around with many languages and thought that C# offers the best developer productivity. After joining Wix two years ago, I was exposed to the amazing world of Scala and Functional Programming and never looked back.
In Scala the code is much more concise, less ceremonious, immutable by default, combines functional with object oriented, seamlessly interoperates with Java, and many software engineering patterns are already baked into the language. Most importantly - Scala is FUN! By the end of the session you too will, hopefully, convert to Scala and never look back.
Recording of the lecture (Hebrew) - https://youtu.be/TcnYTwff2xU
After 20 years, Java seems to feel the weight of the years and his syntax it isn't evolved as we live. But the JVM it is always a stable environment and it is often in production everywhere. In the past years, there were many languages based on the JVM, but they don't have a lot of success. Kotlin conquered Android and, now, thanks to an easy syntax many and big companies behind it, may be used also in web development, also as full stack language. During this talk, we will give a look the language and how to use it to develop a production ready web application.
All code showed during presentation is here: https://github.com/jesty/kotlin-fossavotabona
Getting started with Elasticsearch and .NETTomas Jansson
This document provides an introduction to using Elasticsearch with .NET and the NEST client library. It demonstrates how to install and configure Elasticsearch on Windows, define mappings and index documents using NEST, perform various queries including fuzzy, highlighted, faceted queries, and add filters. NEST provides a strongly typed, fluent abstraction over Elasticsearch that allows querying and filtering Elasticsearch in a similar manner to Elasticsearch JSON queries. The document encourages attendees to view the demo code on GitHub for examples of indexing, querying, highlighting, faceting, and filtering documents using NEST.
Whilst LAMP continues to be a strong force in web-app development, there is also a new breed of technologies that are being used to build the next generation of hugely scalable applications. This presentation will share experiences using these new technologies to handle broadcast-sized audiences and the dynamics of TV viewing.
This session will cover how “The Cloud“ and HTML5 provide an excellent infrastructure for building large scale applications. It will look at some of the technologies that support rapid, scalable development including big data store Cassandra, cloud deployment platform Chef, and building best-of-breed single-page HTML5 applications running on multiple devices using Backbone.js.
The document discusses various Kotlin language features and how they are compiled down to bytecode. It explains concepts like lowering, de-sugaring, and decompiling Kotlin programs. Specific language features summarized include free functions, nested functions, extension methods, data classes, object declarations, companion objects, and lambdas with receivers. The document shows how each feature compiles by decompiling example Kotlin code.
Kotlin decoration - February Berlin Kotlin MeetupSinan KOZAK
Wouldnt it be nice to delegate repeating things and just focus on the parts that make the difference?
We all prefer composition over inheritance, but Java doesn’t help us with all the inheritance it has.
Kotlin has convenient solutions to create reusable code with delegation.
Besides the obvious benefit of delegation, there are ways to trick compiler and have better code separation.
The document discusses Kotlin DSL and provides examples of using Kotlin as a domain-specific language (DSL) to define validation rules. It shows how to build a validation DSL that allows defining validation logic for fields in a concise way using functions like "be" and "not". The validation rules can then be validated against objects to check for errors.
This document summarizes a presentation about why Scala is better than Java. Some key points:
- Scala is more expressive than Java with features like case classes, pattern matching, and for comprehensions that reduce boilerplate.
- Scala code is more concise and readable for common tasks like extracting data from objects.
- Scala has powerful abstractions like implicit conversions, traits, and functional programming concepts that allow building DSLs.
- While Scala has a steeper learning curve, you don't need to use advanced features to benefit from Scala over Java. The presenter encourages people to try Scala without fear of not being able to go back to Java.
The document describes an auction system domain model with orders and products. It defines sealed traits for orders and products, with case classes for different order and product types. It then shows tests to evaluate the total price of complex orders by recursively summing the prices of sub-orders and products. The tests initially fail because evaluate is not defined on orders, so the domain model is updated to add an Evaluatable trait with an evaluate method to define price calculation for each type.
«Продакшн в Kotlin DSL» Сергей РыбалкинMail.ru Group
- Как пришли к использованию и разработки своих DSL
- Посмотрим примеры используемых в экосистеме DSL - gradle, spek, spring
- Рассмотрим базис для конструирования DSL на примере kohttp
The document describes setting up a Grails application with domain classes, controllers, and MyBatis integration for database access. It includes:
1) Creating a Grails application, domain class, and scaffolding controller.
2) Configuring plugins and dependencies for Spring Boot and MyBatis.
3) Defining domain classes for Book and ISBN with constraints and mappings.
4) Implementing mappers and XML mapping files for MyBatis.
5) Creating repository interfaces and services to abstract data access.
This document provides an agenda and overview for a presentation on building RESTful web applications with Scala for Apache Sling. The presentation introduces Apache Sling, an OSGi-based web application framework and scripting layer for Java Content Repositories (JCR). It also introduces Scala, a multi-paradigm programming language for the Java Virtual Machine that is fully interoperable with Java. The presentation demonstrates how to build a sample forum application using Scala and Apache Sling by defining request handlers, rendering HTML, processing form submissions, and more.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
JavaZone 2022 - Building Kotlin DSL.pdfAnton Arhipov
The document discusses Kotlin DSL and provides examples of using Kotlin as a domain specific language. It demonstrates how to build type-safe builders using Kotlin, including defining DSL blocks, extension functions and properties, infix notation, lambda receivers, and context receivers to define internal and external DSLs. Code samples are provided of building clients and dates using DSL syntax and context requirements.
Android Developer Group Poznań - Kotlin for Android developers
STXInsider example project in Kotlin:
https://github.com/kosiara/stx-insider
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, has clear benefits for developers on one hand and keeps short compile times on the other.
As a mobile team we got interested in Kotlin a few months before its final release which gave us time to test it thoroughly before production use. The language has some clear advantages for an Android programmer - it enables migration from Java projects that have been under development for some time already. Java&Kotlin coexistence simplifies Kotlin introduction as only new functionality is written in JetBrain’s new language leaving all the legacy code untouched.
Transitioning gives the developer an opportunity to use lambdas, new syntax for data objects, extension functions to easily expand Android SDK’s classes functionality and infix notation to write DSL-like structures. Almost all the libraries you use today will work with Kotlin thanks to 100% Java compatibility. The same is true for Android SDK classes - all of them will seamlessly work with the new programming language. Kotlin gives you more choice when it comes to reflection, creating documentation and being null-pointer safe. Android works great with it out of the box so you won’t need to change your development habits.
Our production project in Kotlin turned out to be a success after 4 months of development. We had 0 bugs related to Kotlin as a programming language. Our code footprint is almost 30% smaller thanks to JetBrain’s, we benefit from nullpointer safety, closures, translated enums, data objects and use infix notation for logging and displaying Snackbars.
===========
In this presentation you'll find basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
We look at the positive impact new syntax can have on boilerplate removal and readability improvement.
Kotlin really shines in Android development when one looks at “Enum translation”, “Extension functions”, “SAM conversions”, “Infix notation”, “Closures” and “Fluent interfaces” applied to lists. The talk, however, compares language-specifics of Java & Kotlin in terms of “Type Variance”, “Generics” and “IDE tools” as well.
Ubiratan Soares - Software Engineer da Stone, fala sobre Kotlin : Advanced Tricks no Kotlin Community Summit 2018.
https://eventos.imasters.com.br/kotlinsummit/
Saiba mais em
DSLs are everywhere. Have you ever used SQL, Ant or maybe HTML? If so you were using a DSL, maybe without realizing it. Domain-Specific Languages, or DSLs, provide convenient syntactical means of expressing goals in a given problem domain. A well-crafted DSL communicates the essence and means of the domain it represents in a natural way, so that you don’t even think about its underlying technology.
Scala’s rich, flexible syntax combined with its OO and functional features makes writing DSLs a breeze. In this talk I'll introduce the concept of DSLs, where to best apply them, their pros and cons, and how to integrate DSLs into your core application. We will see a practical example of how to lever the tools Scala gives us and build our very own tax calculation DSL.
Davide Cerbo - Kotlin: forse è la volta buona - Codemotion Milan 2017 Codemotion
Dopo 20 anni Java inizia a sentire il peso degli anni e la sua sintassi non evolve come vorremmo, ma la JVM resta sempre un ambiente affidabile ed è già in produzione presso moltissime aziende. Negli ultimi anni sono usciti molti linguaggi basati sulla JVM, ma non tutti hanno avuto il successo sperato. Kotlin ha conquistato Android e, ora, grazie a una sintassi intuitiva e grandi aziende che lo supportano potrebbe essere molto utilizzato anche nelle applicazioni web. Durante il talk vedremo le basi del linguaggio e come sviluppare una applicazione web pronta ad andare in produzione.
Kotlin: forse è la volta buona (Trento)Davide Cerbo
Kotlin: perhaps this time is the right time
This document summarizes a presentation given at the Jug Day event in Trento, Italy on May 19, 2018. The presenter, Davide Cerbo, has over 10 years of experience in full-stack development. He discusses the history of Java and how Kotlin has evolved to address issues with Java, such as backward compatibility. Kotlin integrates seamlessly with Java at the source code level and reduces lines of code by about 40% compared to Java. It is considered a safer alternative to Java that is also easy to learn for Java developers.
Kotlin Developer Starter in Android - STX Next Lightning Talks - Feb 12, 2016STX Next
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice for Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and keeping short compile times on the other.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up a kotlin-based Android project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin compilation is presented and the language is compared to SCALA and SWIFT.
StxNext Lightning Talks - Feb 12, 2016
Kotlin - one of the popular programming languages built on top of Java that runs on JVM. Thanks to JetBrains support and excellent IDE integration, it’s an ideal choice when it comes to Android development. 100% Java compatibility, interoperability and no runtime overhead is just the beginning of a long list of strengths. Kotlin is supposed to be a subset of SCALA, on one hand covering major advantages for developers and on the other - keeping short compile times.
This presentation is a Developer Starter - a set of hand-picked information allowing a person with no knowledge of Kotlin to start writing basic Android activities and set up an Android-kotlin project. It starts with language background, reasons for its creation and advantages. Then presents basic use cases, syntax, structures and patterns. Later on Kotlin is presented in Android context. Simple project structure, imports and Kotlin usage with Android SDK is explained. In the end cost of Kotlin usage is presented and the language is compared to SCALA and SWIFT.
"The joy of Scala" - Maxim Novak / Wix
Around eight years ago I started my journey as a developer. Since then, I've played around with many languages and thought that C# offers the best developer productivity. After joining Wix two years ago, I was exposed to the amazing world of Scala and Functional Programming and never looked back.
In Scala the code is much more concise, less ceremonious, immutable by default, combines functional with object oriented, seamlessly interoperates with Java, and many software engineering patterns are already baked into the language. Most importantly - Scala is FUN! By the end of the session you too will, hopefully, convert to Scala and never look back.
Recording of the lecture (Hebrew) - https://youtu.be/TcnYTwff2xU
After 20 years, Java seems to feel the weight of the years and his syntax it isn't evolved as we live. But the JVM it is always a stable environment and it is often in production everywhere. In the past years, there were many languages based on the JVM, but they don't have a lot of success. Kotlin conquered Android and, now, thanks to an easy syntax many and big companies behind it, may be used also in web development, also as full stack language. During this talk, we will give a look the language and how to use it to develop a production ready web application.
All code showed during presentation is here: https://github.com/jesty/kotlin-fossavotabona
Getting started with Elasticsearch and .NETTomas Jansson
This document provides an introduction to using Elasticsearch with .NET and the NEST client library. It demonstrates how to install and configure Elasticsearch on Windows, define mappings and index documents using NEST, perform various queries including fuzzy, highlighted, faceted queries, and add filters. NEST provides a strongly typed, fluent abstraction over Elasticsearch that allows querying and filtering Elasticsearch in a similar manner to Elasticsearch JSON queries. The document encourages attendees to view the demo code on GitHub for examples of indexing, querying, highlighting, faceting, and filtering documents using NEST.
Whilst LAMP continues to be a strong force in web-app development, there is also a new breed of technologies that are being used to build the next generation of hugely scalable applications. This presentation will share experiences using these new technologies to handle broadcast-sized audiences and the dynamics of TV viewing.
This session will cover how “The Cloud“ and HTML5 provide an excellent infrastructure for building large scale applications. It will look at some of the technologies that support rapid, scalable development including big data store Cassandra, cloud deployment platform Chef, and building best-of-breed single-page HTML5 applications running on multiple devices using Backbone.js.
The document discusses various Kotlin language features and how they are compiled down to bytecode. It explains concepts like lowering, de-sugaring, and decompiling Kotlin programs. Specific language features summarized include free functions, nested functions, extension methods, data classes, object declarations, companion objects, and lambdas with receivers. The document shows how each feature compiles by decompiling example Kotlin code.
Kotlin decoration - February Berlin Kotlin MeetupSinan KOZAK
Wouldnt it be nice to delegate repeating things and just focus on the parts that make the difference?
We all prefer composition over inheritance, but Java doesn’t help us with all the inheritance it has.
Kotlin has convenient solutions to create reusable code with delegation.
Besides the obvious benefit of delegation, there are ways to trick compiler and have better code separation.
The document discusses Kotlin DSL and provides examples of using Kotlin as a domain-specific language (DSL) to define validation rules. It shows how to build a validation DSL that allows defining validation logic for fields in a concise way using functions like "be" and "not". The validation rules can then be validated against objects to check for errors.
This document summarizes a presentation about why Scala is better than Java. Some key points:
- Scala is more expressive than Java with features like case classes, pattern matching, and for comprehensions that reduce boilerplate.
- Scala code is more concise and readable for common tasks like extracting data from objects.
- Scala has powerful abstractions like implicit conversions, traits, and functional programming concepts that allow building DSLs.
- While Scala has a steeper learning curve, you don't need to use advanced features to benefit from Scala over Java. The presenter encourages people to try Scala without fear of not being able to go back to Java.
The document describes an auction system domain model with orders and products. It defines sealed traits for orders and products, with case classes for different order and product types. It then shows tests to evaluate the total price of complex orders by recursively summing the prices of sub-orders and products. The tests initially fail because evaluate is not defined on orders, so the domain model is updated to add an Evaluatable trait with an evaluate method to define price calculation for each type.
«Продакшн в Kotlin DSL» Сергей РыбалкинMail.ru Group
- Как пришли к использованию и разработки своих DSL
- Посмотрим примеры используемых в экосистеме DSL - gradle, spek, spring
- Рассмотрим базис для конструирования DSL на примере kohttp
The document describes setting up a Grails application with domain classes, controllers, and MyBatis integration for database access. It includes:
1) Creating a Grails application, domain class, and scaffolding controller.
2) Configuring plugins and dependencies for Spring Boot and MyBatis.
3) Defining domain classes for Book and ISBN with constraints and mappings.
4) Implementing mappers and XML mapping files for MyBatis.
5) Creating repository interfaces and services to abstract data access.
This document provides an agenda and overview for a presentation on building RESTful web applications with Scala for Apache Sling. The presentation introduces Apache Sling, an OSGi-based web application framework and scripting layer for Java Content Repositories (JCR). It also introduces Scala, a multi-paradigm programming language for the Java Virtual Machine that is fully interoperable with Java. The presentation demonstrates how to build a sample forum application using Scala and Apache Sling by defining request handlers, rendering HTML, processing form submissions, and more.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
Project Management Semester Long Project - Acuityjpupo2018
Acuity is an innovative learning app designed to transform the way you engage with knowledge. Powered by AI technology, Acuity takes complex topics and distills them into concise, interactive summaries that are easy to read & understand. Whether you're exploring the depths of quantum mechanics or seeking insight into historical events, Acuity provides the key information you need without the burden of lengthy texts.
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceIndexBug
Imagine a world where machines not only perform tasks but also learn, adapt, and make decisions. This is the promise of Artificial Intelligence (AI), a technology that's not just enhancing our lives but revolutionizing entire industries.
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxSitimaJohn
Ocean Lotus cyber threat actors represent a sophisticated, persistent, and politically motivated group that poses a significant risk to organizations and individuals in the Southeast Asian region. Their continuous evolution and adaptability underscore the need for robust cybersecurity measures and international cooperation to identify and mitigate the threats posed by such advanced persistent threat groups.
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Webinar: Designing a schema for a Data WarehouseFederico Razzoli
Are you new to data warehouses (DWH)? Do you need to check whether your data warehouse follows the best practices for a good design? In both cases, this webinar is for you.
A data warehouse is a central relational database that contains all measurements about a business or an organisation. This data comes from a variety of heterogeneous data sources, which includes databases of any type that back the applications used by the company, data files exported by some applications, or APIs provided by internal or external services.
But designing a data warehouse correctly is a hard task, which requires gathering information about the business processes that need to be analysed in the first place. These processes must be translated into so-called star schemas, which means, denormalised databases where each table represents a dimension or facts.
We will discuss these topics:
- How to gather information about a business;
- Understanding dictionaries and how to identify business entities;
- Dimensions and facts;
- Setting a table granularity;
- Types of facts;
- Types of dimensions;
- Snowflakes and how to avoid them;
- Expanding existing dimensions and facts.
5. A DOMAIN-SPECIFIC
LANGUAGE (DSL) IS A COMPUTER
LANGUAGE SPECIALIZED TO A
PARTICULAR
APPLICATION DOMAIN. THIS IS IN
CONTRAST TO A GENERAL-
PURPOSE LANGUAGE (GPL),
WHICH IS BROADLY APPLICABLE
ACROSS DOMAINS. From Wikipedia
KOTLIN - DSL
7. KOTLIN - DSL
val list = mutableListOf("A", "B", "C").toList()
val list = buildList {
add("A")
add("B")
add("C")
}
8. KOTLIN - DSL
HIGHER-ORDER FUNCTIONS AND
LAMBDAS
▸Store in variables and data structures
▸Pass as argument to and return from other function
A higher-order function is a function that takes functions as parameters, or returns a function.
9. KOTLIN - DSL
class Person {
lateinit var name: String
lateinit var email: String
}
10. KOTLIN - DSL
class Person {
lateinit var name: String
lateinit var email: String
}
val person = Person()
person.name = "Roque"
person.email = "roque@email.com"
32. KOTLIN - DSL
INFIX
▸Must be member function or extension function
▸Must have only a single parameter
▸The parameter must have no default value
▸The parameter must not accept varargs
▸Receiver and parameter must be specified
Functions marked with the infix keyword can also be called using the infix notation(omitting the dot and the
parentheses for the call)
33. KOTLIN - DSL
object User {
operator fun invoke(query: String): User {
this.query += query
return this
}
infix fun select(block: User.() -> Unit) {
User("SELECT * FROM users").block()
}
}
34. KOTLIN - DSL
object User {
private var query = ""
val age: User
get() = this.where("age")
val name: User
get() = this.where("name")
private fun where(field: String): User {
query+= " WHERE $field"
return this
}
infix fun eq(age: Int) {
println("$query = $age")
}
}
44. KOTLIN - DSL
SEALED CLASS
▸Is abstract by itself, cannot be instantiated
▸Not allowed to have non-private constructors (their
constructors are private by default).
Sealed classes are used for representing restricted class hierarchies, when a value can have one of the
types from limited set, but cannot have any other type.
48. KOTLIN - DSL
SEALED CLASSES
sealed class Ingredients{
object Chocolate : Ingredients()
object Coconut : Ingredients()
object Sugar : Ingredients()
}
private fun convertFlavorToString(ing: Ingridient): String {
return when (ing) {
is Ingredients.Chocolate -> "Chocolate"
is Ingredients.Coconut -> "Coconut"
}
}
49. KOTLIN - DSL
SEALED CLASSES
sealed class Ingredients{
object Chocolate : Ingredients()
object Coconut : Ingredients()
object Sugar : Ingredients()
}
* when expression must be exhaustive
private fun convertFlavorToString(ing: Ingridient): String {
return when (ing) {
is Ingredients.Chocolate -> "Chocolate"
is Ingredients.Coconut -> "Coconut"
}
}
50. KOTLIN - DSL
SEALED CLASSES
sealed class Ingredients{
object Chocolate : Ingredients()
object Coconut : Ingredients()
object Sugar : Ingredients()
}
private fun convertFlavorToString(ing: Ingridient): String {
return when (ing) {
is Ingredients.Chocolate -> "Chocolate"
is Ingredients.Coconut -> "Coconut"
is Ingredients.Sugar -> "Sugar"
}
}
51. KOTLIN - DSL
SEALED CLASSES
sealed class Ingredients
object Chocolate : Ingredients()
object Coconut : Ingredients()
object Sugar : Ingredients()
private fun convertFlavorToString(ing: Ingridient): String {
return when (ing) {
is Ingredients.Chocolate -> "Chocolate"
is Ingredients.Coconut -> "Coconut"
is Ingredients.Sugar -> "Sugar"
}
}
52. KOTLIN - DSL
SEALED CLASSES
sealed class Ingredients
object Chocolate : Ingredients()
object Coconut : Ingredients()
object Sugar : Ingredients()
private fun convertFlavorToString(ing: Ingridient): String {
return when (ing) {
is Chocolate -> "Chocolate"
is Coconut -> "Coconut"
is Sugar -> "Sugar"
}
}
53. KOTLIN - DSL
SEALED CLASSES - SMART CASTING
sealed class VehicleState
object Empty : VehicleState()
data class Success(val vehicles: List<Vehile>) : VehicleState()
data class Error(error: Throwable) : VehicleState()
data class Loading(isLoading: Boolean) : VehicleState()
54. KOTLIN - DSL
SEALED CLASSES - SMART CASTING
sealed class VehicleState
object Empty : VehicleState()
data class Success(val vehicles: List<Vehile>) : VehicleState()
data class Error(error: Throwable) : VehicleState()
data class Loading(isLoading: Boolean) : VehicleState()
private fun updateState(state: VehicleState) {
when (state) {
is Empty -> ...
is Success -> state.vehicles
is Error -> state.error
is Loading -> state.isLoading
}
}
You will see a lot of code, if you are not that familiar with kotlin it might be like What is this, but I’m pretty sure you will learn something in general about DSL and be able to apply in your language/project.
Content
2018 but there are still a lot of things to learn
DSL is not only one feature from kotlin
It’s actually not even a kotlin feature
DSLs are languages which belongs for specific domains
Bring to kotlin and the fancy way as possible
Why should I know about DSL if I’m not using SQL or HTML or any other domain specific language in my code?
Even kotlin is creating dsl from kotlin to kotlin
Introduced in kotlin 1.3
Composable code
Structure
Functional programming
Declarative
Build list return list directly
Huge reason to create DSL already
Could be a date class but for the example fit better being just a class
Java
Not very kotlin
What is the problem of this code?
No context
I can change the fields from anywhere
Scope function
Not when/where to use
But how it works
Dive deep into ti and see
What scope function can TEACH us about high order functions.
Lambda context
High order function
Omit my this
Same that omit this activity
If I print hellowWorld valuable, what will be the output of this?
Kudos for who said Hello
Do you know why do we have this output?
Not concating?
Not returning the last line?
Why I have this inside the block?
Lot of questions, right?Let’s dive deep to apply function and find more about it.
Generic
Extension function for any type
High order function, receiving other function
Adding my T as lambda receiver my context of my lambda
Return the same type
What will be the output of this?
High order function
High order function with lambda parameter
High order function with lambda receiver and lambda parameter
Extension function
High order function
With lambda receiver
Without return
15 min
Extension function
High order function
With lambda receiver
With return
Now the lib code seems not that weird for us
High order function and receivers
No structure, have type
Bringing sql to kotlin domain
Lib abstract
Create my own, very poor but just to show two kotlin features.
This will result in my sql string.
If you follow you can use it
Fake constructor initialising my query
Infix
Lambda receiver
Could be better, but it’s just to show the infix and the operator overloading features
User object
What is select?
Infix hight order function that contain lambda with receiver which is my user.
Operator overloading to create fake constructor User to start my query
Age concate my query and return my user
Eq infix function contain int parameter and print my query
25 minOutput
Favorite
Write in English
Is possible to have chocolate without sugar? Not sure
Is possible to write English with kotlin? YES
Not English yet
Not close yet
Almost there
If I make my cake object then it’s done
Dish parameter
You can’t extend in other file
Show the parent
Remove the braces
Not SN code
Access to the fields
Only two features helped me to create my cake DSL
32 min
And write in English inside kotlin domain
Cake was funny but yeah, not very useful
Readability
Test withDraw
The standard
Structure
Extension function
High order function
Return last line
Extension function
High order function
Return same type
Extension function
High order function
Without return
What about I could extract the truth lib?
If I want to change my assert library, I have only few places and not in all my unit tests
Verbose
Readability
Method call will return
40min
How create is done
When to create a DSL?
Easy
WillThrow or others
Be creative