The document discusses the Java Compiler API, which was standardized in Java 6. It provides two ways to programmatically compile Java source code: simple and advanced. The simple approach demonstrates how to retrieve the Java compiler, run it to compile a source file, and then access the compiled class. The advanced approach provides access to error messages and more options. The document also covers using printf formatting with custom formattable classes by implementing the Formattable interface.
Código Saudável => Programador Feliz - Rs on Rails 2010Plataformatec
Palestra do Rs On Rails, na qual demos algumas dicas de boas práticas para manter seu código mais limpo e ter absoluto controle da sua aplicação em produção.
With PHP5.3.3 recently released I really feel it is time that php developers are taking namespaces seriously. If you don’t I guarantee you will be out of a job within five years. Namespaces are a fundamental part of the future of PHP. The talk explains the usage on importing third party libraries, using it in your own code and aliasing. The full works.
Código Saudável => Programador Feliz - Rs on Rails 2010Plataformatec
Palestra do Rs On Rails, na qual demos algumas dicas de boas práticas para manter seu código mais limpo e ter absoluto controle da sua aplicação em produção.
With PHP5.3.3 recently released I really feel it is time that php developers are taking namespaces seriously. If you don’t I guarantee you will be out of a job within five years. Namespaces are a fundamental part of the future of PHP. The talk explains the usage on importing third party libraries, using it in your own code and aliasing. The full works.
Everyone must migrate to PHP 7! Take advantage of exceptional performance improvements, cut your hardware use in half and enjoy the best of PHP. This workshop is for everyone that is still eyeing PHP 7 while still using PHP 5, and wants to review their 1 million LOC project before jumping to PHP 7. When migrating, we need to check old code and target only the interesting issues. This session will connect the backward incompatibilities and new features to their actual location in the code, relying on static analysis to quickly process a large code base. Based on our accumulated experience and tools, we'll review the issues, diagnose criticality, select the best fixes and prioritize the tasks. All tools are Open Source, and ready to be integrated into your project lifecycle.
Presentation on major features of PHP 5.3 for the July 2009 Baltimore/Washington DC PHP Meetup. It touches on major features and changes that were made in the PHP 5.3 series
Aiming at complete code coverage by unit tests tends to be cumbersome, especially for cases where external API calls a part of the code base. For these reasons, Python comes with the unittest.mock library, appearing to be a powerful companion in replacing parts of the system under test.
Unlock The Mystery Of PHPUnit (Wave PHP 2018)ENDelt260
You know you're supposed to write unit tests, but you're not quite sure where to start. This session is for you. We will start from ground zero and go from zero unit test writing experience to functional test-driven developed code.
Using the current version of PHPUnit we will cover:
* writing basic test cases
* simple assertions and constraints
* mocking and data providers
* testing exceptions and errors
* and more!
You will leave this session fully ready to write tests for your own code.
Everyone must migrate to PHP 7! Take advantage of exceptional performance improvements, cut your hardware use in half and enjoy the best of PHP. This workshop is for everyone that is still eyeing PHP 7 while still using PHP 5, and wants to review their 1 million LOC project before jumping to PHP 7. When migrating, we need to check old code and target only the interesting issues. This session will connect the backward incompatibilities and new features to their actual location in the code, relying on static analysis to quickly process a large code base. Based on our accumulated experience and tools, we'll review the issues, diagnose criticality, select the best fixes and prioritize the tasks. All tools are Open Source, and ready to be integrated into your project lifecycle.
Presentation on major features of PHP 5.3 for the July 2009 Baltimore/Washington DC PHP Meetup. It touches on major features and changes that were made in the PHP 5.3 series
Aiming at complete code coverage by unit tests tends to be cumbersome, especially for cases where external API calls a part of the code base. For these reasons, Python comes with the unittest.mock library, appearing to be a powerful companion in replacing parts of the system under test.
Unlock The Mystery Of PHPUnit (Wave PHP 2018)ENDelt260
You know you're supposed to write unit tests, but you're not quite sure where to start. This session is for you. We will start from ground zero and go from zero unit test writing experience to functional test-driven developed code.
Using the current version of PHPUnit we will cover:
* writing basic test cases
* simple assertions and constraints
* mocking and data providers
* testing exceptions and errors
* and more!
You will leave this session fully ready to write tests for your own code.
Taking Jenkins Pipeline to the Extremeyinonavraham
Slide deck from Jenkins User Conference Tel Aviv 2018.
Talking about suggested (best?) practices, tips and tricks, using Jenkins pipeline scripts with shared libraries, managing shared libraries, using docker compose, and more.
This presentation is on advanced debugging using Java bytecodes (presented in Core Java meetup on 1st October in Accion Labs). If you are a Java developer and are interested in knowing advanced debugging techniques or understanding bytecodes, this presentation is for you.
Starting unit testing on a project can seem like a daunting task, and earning team and leadership buy-in can be challenging. We'll walk-through setup with composer, creating the first test, restructuring existing classes with dependency injection to allow unit testing, and releasing code confidently with test coverage. We'll also discuss overcoming common biases, unit testing challenges, and shortcomings of unit testing.
Watch the presentation at https://www.youtube.com/watch?v=6v4_bEajDUk
Here's a presentation I did for the Japanese Perl Association on April 21st, 2009.
It covers 10 aspects of Catalyst that may not be documented or discussed as much as they could be, that are very useful.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
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.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
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
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
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.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
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.
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.
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
3. Compiler API
“Compiling with the Java Compiler API”
http://java.sun.com/mailers/techtips/corejava/2007/tt0307.html
Standardized with Java6 (JSR-199)
before com.sun.tools.javac.Main
not standard, public programming interface
Also compiles dependent classes
Two possibilities: simple and advanced
both will be covered in next slides
4. Compiler API - Simple - Roadmap
Create sourcecode
(programatically created)
Retrieve JavaCompiler
via ToolProvider
Invoke run method
Check return code
0 == successfull
Get class via reflection
create instance, invoke
methods, get/set fields, ...
5. Compiler API - Simple - The Source
First of all: Create desired sourcecode
Could be created dynamically
Save it in right location
Be aware of Eclipse’ standard src folder
package at.sitsolutions.techtips.s4666;
public class Hello {
public static void sayHello() {
System.out.println(“Hello TechTips!”);
}
}
6. Compiler API - Simple - Compile it
package at.sitsolutions.techtips.s4666;
import javax.tools.JavaCompiler;
import javax.tools.ToolProvider;
public class CompilerApi {
public static void main(String[] args) {
String path = “src/at/sitsolutions/techtips”
+ “/s4666/Hello.java”;
JavaCompiler compiler =
ToolProvider.getSystemJavaCompiler();
if(compiler.run(null, null, null, path) == 0) {
// do something with fresh compiled class
} else {
System.err.println(“Ups, something went wrong!”);
}
}
}
7. Compiler API - Simple - Use it
After compiling sourcecode...
... access class reflectively
... invoke static method
// assume we have compiled our sourcecode successfully
String className = “at.sitsolutions.techtips.s4666.Hello”;
try {
Class<?> c = Class.forName(className);
Method m = c.getDeclaredMethod(“sayHello”, new Class[] {});
m.invoke(null, new Object[] {}); // prints “Hello TechTips”
} catch(Exception e) {
e.printStackTrace();
}
8. Compiler API - Simple - Core Method
The JavaCompiler.run method in detail:
(actually inherited from javax.tools.Tool)
int run(
... use null for System.in
InputSream in,
... use null for System.out
OutputStream out,
... use null for System.err
OutputStream err,
... files to compile
String... args
);
9. Compiler API - Advanced
Benefit of advanced version:
Access to error messages
More options (usefull if developing an IDE)
Additionally involved classes:
DiagnosticCollector, JavaFileObject,
StandardJavaFileManager, CompilationTask
package at.sitsolutions.techtips.s4666;
public class Hello2 {
public static void sayHello() {
System.out.printnl(“Hello TechTips!”);
}
}
10. Compiler API - Advanced - Compile it
JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
DiagnosticCollector<JavaFileObject> diagnostics =
new DiagnosticCollector<JavaFileObject>();
StandardJavaFileManager manager =
compiler.getStandardFileManager(diagnostics,
Locale.ENGLISH, new ISO_8859_11());
String file=“src/at/sitsolutions/techtips/s4666/Hello2.java”;
Iterable<? extends JavaFileObject> compilationUnits =
manager.getJavaFileObjects(new String[] {file});
CompilationTask task = compiler.getTask(null, manager,
diagnostics, null, null, compilationUnits);
if(task.call() == false) {
// put error handling in here
}
manager.close();
12. Compiler API - Advanced - Core Method
JavaCompiler.getTask method in detail:
CompilationTask getTask(
... use null for System.err
Writer out,
JavaFileManager mgr, ... use null for compiler’s standard mgr
DiagnosticListener lst, ... somehow mandatory
Iterable<String> options, ... options to compiler
Iterable<String> classes, ... used for annotation processing
Iterable<? extends JavaFileObject>
... files to compile
compilationUnits
);
13. Compiler API - What for?
Be more dynamic
Create classes on-the-fly
Let application gain
“experience”
Build your own IDE
Provide meaningfull error
messages
Highlight specific error in
sourcecode
It’s fun
15. Using printf
“Using printf with Customized Formattable Classes”
http://blogs.sun.com/CoreJavaTechTips/entry/using_printf_with_customized_formattable
Format output available since Java5
well known from C language (%5.2f%n)
Formattable interface
formatTo(Formatter, int, int, int):void
use locales, flags, width, precision
Flags available:
ALTERNATE (#), LEFT_JUSTIFY (-), UPPERCASE (^)
Usage just as known from C language
16. Using printf - The Formattable Object
public class Alfa implements Formattable {
private final String stamp12 =
“ABCDEF123456”; // alternate
private final String stamp24 =
“ABCDEF123456GHIJKL123456”; // default
public void formatTo(
Formatter formatter, int flags, int width, int precision) {
StringBuilder sb = new StringBuilder();
// 1. check flags (alternate)
// 2. set precision (cut off length)
// 3. check locale
// 4. setup output justification
formatter.format(sb.toString());
}
}
20. Using printf - What for?
Much more powerfull
than simple toString
Unified use of printf
(even on own objects)
Usefull in CLI apps
Again: It’s fun