- Groovy is an agile and dynamic language for the Java Virtual Machine that builds on Java's strengths with additional features from languages like Python, Ruby and Smalltalk. It provides features to Java developers with almost no learning curve.
- Groovy supports dynamic and static typing, collections, magic methods, operators that simplify operations like finding and filtering, and processing XML and JSON easily.
- Examples demonstrate how Groovy can be used to process collections, define classes and methods, parse XML and JSON, and more.
This slide aims to describe the basic introduction about Java with the Eclipse platform. Many examples were applied in order to understand the main features of programing by using Java.
This slide aims to describe the basic introduction about Java with the Eclipse platform. Many examples were applied in order to understand the main features of programing by using Java
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
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.
This slide aims to describe the basic introduction about Java with the Eclipse platform. Many examples were applied in order to understand the main features of programing by using Java.
This slide aims to describe the basic introduction about Java with the Eclipse platform. Many examples were applied in order to understand the main features of programing by using Java
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
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.
What is automated tests? Why they are important? How about frontend (JS), it's possible to automate it?
If you have being asked yourself these questions, you probably need to take a deeper look into this presentation.
There are speaker notes here: https://docs.google.com/presentation/d/16gSYGmfNSANJh3F1PMBSsoEFRXNkjO-kk4R_0aKdY_s/pub?start=false&loop=true&delayms=3000
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
2. Agenda:
- A short history;
- Typing;
- Collections are friends of mine;
- Magic methods;
- Wonderful operators;
- XML isn’t a PITA anymore;
- JSON for the clever guys.
4. Groovy...
is an agile and dynamic language for the Java Virtual Machine
builds upon the strengths of Java but has additional power features inspired by languages like Python, Ruby and Smalltalk
makes modern programming features available to Java developers with almost-zero learning curve
provides the ability to statically type check and statically compile your code for robustness and performance
supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain
makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL
increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications
simplifies testing by supporting unit testing and mocking out-of-the-box
seamlessly integrates with all existing Java classes and libraries
compiles straight to Java bytecode so you can use it anywhere you can use Java
5. Try some Groovy scripts on
http://www.groovyconsole.appspot.com/
6. Integer x = 10
def y = 10
println x.class
println y.class
Typing
7. def x = []
x.add 10
x.add 5
x.add 3
x.add 0.5
x.add 11.3
println x.sort()
Collections are friends of mine
13. class Student {
String name
int mark
}
Student daniel = new Student(name: 'Daniel', mark: 100)
assert daniel as Student
println daniel.mark
println daniel.name
daniel.setName('Daniel Fernandes')
println daniel.name
Wonderful operators
14. class Student {
String name
int mark
def isApproved() {
mark >= 70 ?: false
}
}
Student daniel = new Student(name: 'Daniel', mark: 100)
daniel.isApproved()
Wonderful operators
15. class Student {
String name
int mark
def isApproved() {
mark >= 70 ?: false
}
}
List<Student> students = [
new Student(name : 'Daniel Fernandes', mark : 97),
new Student(name : 'Juliana Fernandes', mark : 100)
]
//Student daniel = students.find{ it.name == 'Daniel' }
def daniel = students.find{ it.name == 'Daniel' }
println daniel?.mark
def danielFernandes = students.find{ it.name == 'Daniel Fernandes' }
println danielFernandes?.mark
Wonderful operators
16. class Student {
String name
int mark
}
List<Student> students = [
new Student(name : 'Daniel Fernandes'),
new Student(name : 'Juliana Fernandes',
mark : 100)
]
assert 'Daniel Fernandes' in students.name
assert 'João Batista' in students.name
Wonderful operators
17. def brasil = new XmlParser().parseText(new
File('/home/daniel/Dropbox/Public/brasil.xml').text)
def estados = brasil.estados.estado
assert estados.size() == 27
def cidades = estados*.cidades*.cidade
assert cidades*.size().sum() == 5564
XML isn’t a PITA anymore
18. JSON for the clever guys
import groovy.json.JsonSlurper
def persons = new JsonSlurper().parseText('[{"name":
"Daniel"},{"name": "Juliana"}]')
println persons*.name
James Strachan and his wife were waiting for a late plane.
While she went shopping, he visited an Internet café and spontaneously decided to go to the Python web site and study the language. In the course of this activity, he became more and more intrigued. Being a seasoned Java programmer, he recognized that his home language lacked many of the interesting and useful features Python
had invented, such as native language support for common datatypes in an expressive syntax and, more important, dynamic behavior. The idea was born to bring such features to Java.
Don’t worry! You do not need to know everything about Groovy solutions because you’ll live Groovy after right now.
or
def x = [10, 5, 3, 0.5, 11.3]
println x.sort()
or
def x = [:]
x['name'] = 'Daniel'
x['age'] = 26
println x
or
def x = [:]
x['name'] = 'Daniel'
x['age'] = 26
println x
def members = ['Daniel', 'Juliana', 'Alice', 'Davi']
def familyPositions = [:]
members.each { member ->
switch(member) {
case 'Alice':
case 'Davi':
familyPositions[member] = 'child'
break
case 'Daniel':
case 'Juliana':
familyPositions[member] = 'parents'
break
}
}
int kidsCount = 0
familyPositions.findAll { member ->
//println member.class
if(member.value == 'child'){
kidsCount++
}
}
println kidsCount
Verifications
Arrays
Classes
Get the opportunity to talk about the data bind and “is”
class Student {
String name
int mark
}
def thinkThatIsAFormSubmition = [name : 'Juliana Fernandes', mark: 100]
Student juliana = new Student()
juliana.setName('Juliana Fernandes')
juliana.setMark(100)
Student julianaDataBind = new Student(thinkThatIsAFormSubmition)
//assert julianaDataBind.is(juliana)
//assert julianaDataBind.name.is(julianaDataBind.name)
//assert juliana != julianaDataBind
//assert juliana.name == julianaDataBind.name
Elvis operator
Safe navigator
in == contains
XML com estados e cidades do Brasil ⇒ https://www.dropbox.com/s/8mrvlsya7ur94kd/brasil.xml
SQL com os estados e cidades do Brasil usados para geração deste XML ⇒ http://samus.com.br/web/site/artigo-todas_as_cidades_do_brasil_atualizado_e_com_acentos
think out the box
import groovy.json.JsonSlurper
class Person {
String name
int age
}
def json = new JsonSlurper().parseText('{"name": "Daniel", "age":26}')
Person daniel = new Person(json)
println "My name is $daniel.name and I'm $daniel.age years old"