Poche chiacchiere e tanto codice per cercare rendere la nostra vita di
sviluppatori più divertente.
Parleremo di JAX-RS, le annotazioni, l'MVC che mette a disposizione e
l'integrazione di Jersey con Guice.
Useremo AOP per gestire log, transazioni e con l'aiuto di Infinispan
limiteremo le chamate concorrenti sul nostro cluster.
Poche chiacchiere e tanto codice per cercare rendere la nostra vita di
sviluppatori più divertente.
Parleremo di JAX-RS, le annotazioni, l'MVC che mette a disposizione e
l'integrazione di Jersey con Guice.
Useremo AOP per gestire log, transazioni e con l'aiuto di Infinispan
limiteremo le chamate concorrenti sul nostro cluster.
Connect python application with postgreSQL database using psycopg2.
Perform DDL & DML operations
Create table , Insert/update/delete and select records
Understand connection & cursor class
Gabriele Petronella - FP for front-end development: should you care? - Codemo...Codemotion
Functional programming is becoming pervasive in every branch of development, but why should you care? Can we reap the benefits of FP, if our job is to write web UIs? In this presentation, we'll see how FP fits into the front-end development picture and how we can leverage TypeScript to progressively migrate our codebases and start getting the most out of it.
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
Developing Applications with MySQL and Java for beginnersSaeid Zebardast
A presentation about Developing Applications with MySQL and Java for beginners. It includes the following topics:
- Requirements
- MySQL Data Definitions
- Java Classes
- MySQL Connector (JDBC)
- Define Methods
- Compile and Run
Connect python application with postgreSQL database using psycopg2.
Perform DDL & DML operations
Create table , Insert/update/delete and select records
Understand connection & cursor class
Gabriele Petronella - FP for front-end development: should you care? - Codemo...Codemotion
Functional programming is becoming pervasive in every branch of development, but why should you care? Can we reap the benefits of FP, if our job is to write web UIs? In this presentation, we'll see how FP fits into the front-end development picture and how we can leverage TypeScript to progressively migrate our codebases and start getting the most out of it.
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
Developing Applications with MySQL and Java for beginnersSaeid Zebardast
A presentation about Developing Applications with MySQL and Java for beginners. It includes the following topics:
- Requirements
- MySQL Data Definitions
- Java Classes
- MySQL Connector (JDBC)
- Define Methods
- Compile and Run
import java-util--- public class MyLinkedList{ public static void.pdfasarudheen07
import java.util.*; public class MyLinkedList{ public static void main(String[] args){ } } //copy
MyList to here interface MyList extends Collection { /* MyList will inherite all methods from
Collection public boolean add(E e); public boolean addAll(Collection extends E> c); public void
clear(); public boolean contains(Object o); public boolean containsAll(Collection> c); public
boolean isEmpty(); public boolean remove(Object o); public boolean removeAll(Collection> c);
public boolean retainAll(Collection> c); public int size(); public Object[] toArray(); public T[]
toArray(T[] arr); */ //abstract method public void add(int index, E e); public E get(int index);
public int indexOf(Object e); public int lastIndexOf(E e); public E remove(int index); public E
set(int index, E e); //default method @Override public default boolean add(E e){ add(size(), e);
return true; } @Override public default boolean isEmpty(){ return size()==0; } @Override
public default boolean remove(Object e){ if(indexOf(e) >= 0){ remove(indexOf(e)); return true;
} else{ return false; } } @Override public default boolean containsAll(Collection> c){
for(Object e : c){ if(!contains(e)){ return false; } } return true; } @Override public default
boolean addAll( Collection extends E> c){ for(E e : c){ add(e); } return true; } /* removeAll:
this[1,1,2,3] c[1,2,4] this.removeAll(c) [3] */ @Override public default boolean removeAll(
Collection> c){ for(Object e : c){ while(contains(e)){ this.remove(e); } } return true; } /*
retainAll this[1,1,2,3] c[1,2,4] this.retainAll(c) [1,1,2] */ @Override public default boolean
retainAll( Collection> c){ for(E e : this){ if(!c.contains(e)){ this.remove(e); } } return true; }
@Override public default Object[] toArray(){ Object[] results = new Object[size()]; int i = 0;
for(E e : this){ results[i++] = e; } return results; } /* T[] array */ @Override public default T[]
toArray(T[] array){ int i = 0; for(E e : this){ array[i++] = (T)e; } return array; } } class
TwoWayLinkedList implements MyList { //inner static class Node public class Node { E
element; Node next; Node previous; public Node(E e){ element = e; } } private Node head, tail;
private int size = 0; public TwoWayLinkedList(){ /* head = null; tail = null; size = 0; */ } public
TwoWayLinkedList(E[] objects){ } public E getFirst(){ return null; } public E getLast(){ return
null; } public void addFirst(E e){ } public void addLast(E e){ } public E removeFirst(){ return
null; } public E removeLast(){ return null; } @Override public void add(int index, E e){ }
@Override public E remove(int index){ return null; } @Override public void clear(){ }
@Override public boolean contains(Object e){ return false; } @Override public E get(int index){
return null; } @Override public int indexOf(Object e){ return -1; } @Override public int
lastIndexOf(Object e){ return -1; } @Override public E set(int index, E e){ return null; }
@Override public int size(){ return size; } //toString() @Override public String.
At first glance, Java byte code can appear to be some low level magic that is both hard to understand and effectively irrelevant to application developers. However, neither is true. With only little practice, Java byte code becomes easy to read and can give true insights into the functioning of a Java program. In this talk, we will cast light on compiled Java code and its interplay with the Java virtual machine. In the process, we will look into the evolution of byte code over the recent major releases with features such as dynamic method invocation which is the basis to Java 8 lambda expressions. Finally, we will learn about tools for the run time generation of Java classes and how these tools are used to build modern frameworks and libraries. Among those tools, I present Byte Buddy, an open source tool of my own efforts and an attempt to considerably simplify run time code generation in Java.
C# is here to stay, it is time to embrace one of the most popular languages of the future and learn what is coming. In this talk we will look at how C# has evolved over time, and why it is definitely here to stay!
The easy way to develop Java applications has always been the standard stack (Spring, JEE, SQL) that confirms the LAMP equivalent in Java-speak. This presentation compares this model with a real use case based on Guice, Jersey and AppEngine.
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Лекция 5. MapReduce в Hadoop (алгоритмы)Technopark
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Лекция 3. Распределённая файловая система HDFSTechnopark
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
Лекция 1. Введение в Big Data и MapReduceTechnopark
Техносфера Mail.ru Group, МГУ им. М.В. Ломоносова.
Курс "Методы распределенной обработки больших объемов данных в Hadoop"
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9rPxMIgPri9YnOpvyDAL9HD
СУБД 2013 Лекция №10 "Нереляционное решение в области баз данных — NoSQL"Technopark
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №10 "Нереляционное решение в области баз данных — NoSQL". Лектор - Станислав Ступников.
Вводная часть посвящена определению и истории развития концепции NoSQL. Даются характеристики, рассказывается о способах использования. Рассматриваются виды NoSQL БД, теоретические основы NoSQL, а в конце лекции обсуждаются недостатки NoSQL-решений, а также проводится сравнение разных NoSQL-решений.
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
СУБД 2013 Лекция №10 "Нереляционное решение в области баз данных — NoSQL" Час...Technopark
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №10 "Нереляционное решение в области баз данных — NoSQL". Лектор - Станислав Ступников.
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №9 "Безопасность баз данных". Лектор - Павел Щербинин.
Открывается лекция рассказом о резервном копировании (о логических и физических резервных копиях, о выборе данных для копирования). Затем определяется терминология для обсуждения дальнейших вопросов. После этого рассматриваются основы учётных записей: таблицы доступа, привилегии, виды записей. Обсуждаются SQL-injection, список смежных вершин (Adjacency Set), вложенное множество (Nested Set), материализованный путь (Materialized Path) и комбинированный подход.
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
СУБД 2013 Лекция №8 "Конфигурирование базы данных"Technopark
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №8 "Конфигурирование базы данных". Лектор - Павел Щербинин.
Сначала объясняются основы конфигурирования и общие принципы настройки. Далее рассказывается об области видимости, о настройке использования памяти, обсуждается размер блока ключей key_cache_block_size. Рассматривается устройство и использование кэша InnoDB, а также кэшей потоков и таблиц. Затем говорится об особенностях ввода/вывода в InnoDB. Далее рассказывается о табличном пространстве, оптимизации файловой сортировки, переменных состояния. Финальная часть лекции посвящена репликации: настройка, синхронизация, топология, планирование пропускной способности, администрирование и обслуживание, проблемы и их решения.
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
СУБД 2013 Лекция №7 "Оптимизация запросов и индексирование"Technopark
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №7 "Оптимизация запросов и индексирование". Лектор - Павел Щербинин.
Вначале рассказывается об оптимизации доступа к данным, о декомпозиции соединения и состоянии запроса. Далее идёт большой блок, посвящённый оптимизатору запросов (изменение порядка соединения, применение алгебраических правил эквивалентности, оптимизации COUNT(), MIN(), MAX(), вычисление и свертка константных выражений, покрывающие индексы, оптимизация подзапросов, раннее завершение, сравнение по списку IN() и распространение равенства). Затем последовательно рассматриваются такие вещи, как соединение (JOIN) в MySQL, оптимизатор сортировки, коррелированные подзапросы, слияние и непоследовательный просмотр индексов, функции SELECT & UPDATE, COUNT(). После этого рассказывается об оптимизации запросов с помощью JOIN, GROUP BY, DISTINCT и LIMIT со смещением. В конце лекции даётся информация о кэшировании запросов, объединённых таблицах и секционировании.
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №5 "Определение узких мест". Лектор - Павел Щербинин.
Вначале рассказывается о подсистемах хранения: MyISAM, InnoDB, Memory, о критериях выбора подсистем хранения, приводятся практические примеры. Затем обсуждается тема индексирования (B-tree, хеш-индексы) и EXPLAIN (столбцы id, table, possible_keys, key, key_len).
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
Технопарк Mail.ru Group, МГТУ им. Н.Э. Баумана. Курс "Базы данных".
Лекция №6 "Профилирование запросов. Сложноструктурированные SQL-запросы". Лектор - Павел Щербинин.
Лекция открывается рассказом о том, что такое профилирование запроса, каковы его этапы выполнения в MySQL. Рассказывается о том, как планировать запрос, как осуществляется протоколирование запросов, как собирается статистика. Объясняются основы индексирования, подробно обсуждаются стратегии индексирования для достижения высокой производительности: изоляция столбца, кластерные индексы (преимущества и недостатки), размещение данных в MyISAM и InnoDB, покрывающие индексы. Далее затрагивается тема нормализации и денормализации, а также таблиц счётчиков. В завершении рассказывается о версионировании схемы БД: о методах инкрементных изменений, идемпотентных изменений, уподобления структуры БД исходному коду.
Видео лекции курса https://www.youtube.com/playlist?list=PLrCZzMib1e9obOz5K695ugYuiOOCBciEi
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
Generating a custom Ruby SDK for your web service or Rails API using Smithyg2nightmarescribd
Have you ever wanted a Ruby client API to communicate with your web service? Smithy is a protocol-agnostic language for defining services and SDKs. Smithy Ruby is an implementation of Smithy that generates a Ruby SDK using a Smithy model. In this talk, we will explore Smithy and Smithy Ruby to learn how to generate custom feature-rich SDKs that can communicate with any web service, such as a Rails JSON API.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
3. public abstract class MyAbstractClass {
private int a = 0;
public int getSum(){
return a + getB();
}
protected int getA(){
return a;
}
abstract int getB();
}
public interface MyInterface {
int getDif();
}
4. public class MyClass extends MyAbstractClass implements MyInterface {
private int b = 1;
public int getB(){
return b;
}
public int getDif(){
return getA() - b;
}
}
public class MyClassChild extends MyClass implements Interface1, Interface2{
…
}
5. public static void main(String[] args) {
//MyAbstractClass aObject = new MyAbstractClass(); - ошибка
MyClass object1 = new MyClass();
int result1 = object1.getSum();
int result2 = object1.getDif();
doSomething(object1);
MyInterface object2 = new MyClass();
//int result3 = object2.getSum(); - ошибка
int result4 = object2.getDif();
doSomething(object2);
}
public static void doSomething(MyInterface object){
//MyClass object3 = object; - ошибка
//int result5 = object.getSum(); - ошибка
int result6 = object.getDif();
}
13. public class GenericExample<T> {
private T value;
public GenericExample(T value){
this.value = value;
}
public T getT(){
return value;
}
public static void main(String[] args) {
GenericExample<Integer> intObject = new GenericExample<Integer>(1);
Integer valueInteger = intObject.getT();
GenericExample<String> stringObject = new GenericExample<String>("word");
String valueString = stringObject.getT();
}
}
14. public class LongId<T> {
private long id;
public LongId(long id){
this.id = id;
}
public long getLong(){
return id;
}
}
public void manyIdsInParams(long userId, long serverId, long adress){…}
public void manyIdsInParams(LongId<User> userId,
LongId<Server> serverId,
LongId<Adress> adress){…}
15.
16.
17.
18.
19.
20.
21.
22.
23.
24. public class HelloRunnable implements Runnable {
public void run() {
System.out.println("Hello from a thread!");
}
public static void main(String args[]) {
(new Thread(new HelloRunnable())).start();
}
}
25. public class HelloThread extends Thread {
public void run() {
System.out.println("Hello from a thread!");
}
public static void main(String args[]) {
(new HelloThread()).start();
}
}
26.
27. try {
Thread.sleep(5000);
} catch (InterruptedException e) { // We've been interrupted.
return;
}
for (int i = 0; i < inputs.length; i++) {
heavyTask(inputs[i]);
if (Thread.interrupted()) { // We've been interrupted.
return;
}
}
28. public class HelloThread extends Thread {
public void run() {
System.out.println("Hello from a thread!");
}
public static void main(String args[]) {
Thread thread = new HelloThread();
thread.start();
thread.join();
System.out.println("Hello from the main!");
}
}
29. public class HelloThread extends Thread {
private StringBuilder builder;
public HelloThread(StringBuilder builder){
this.builder = builder;
}
public void run() {
builder.append("Hello from a thread!");
}
public static void main(String args[]) {
StringBuilder builder = new StringBuilder();
Thread thread = new HelloThread();
thread.start();
builder.append("Hello from the main!");
}
}