XML (Extensible Markup Language) is a flexible way to create common information formats and share both the format and the data on the World Wide Web, intranets, wikis, configuration and elsewhere in a cloud.
This paper defines different components of Ur/Web programming language. Web programming has gradually evolved from a document delivery platform to architecture for distributed programming. Ur/Web, a domain-specific, statically typed functional programming language with a much simpler model for programming modern Web applications. Ur/Web’s model is unified, where programs in a single programming language are compiled to other “Web standards” languages as needed; supports novel kinds of encapsulation of Web-specific state; and exposes simple concurrency, where programmers can reason about distributed, multithreaded applications.
Naming Entities and Locating Mobile EntitiesRajat Kumar
What is a name in Distributed Systems?
A name in a distributed system is a string of bits or characters that is used to refer to an entity.
What is an Entity?
An entity in a distributed system can be practically anything.
Examples include resources such as hosts, printers, disks, and files, processes, users, mailboxes, newsgroups, Web pages, graphical windows, messages, network connections
Introduction to latex. Write your first document in latex
To Download latex for windows (163 MB)
http://miktex.org/download
To Download texmaker editor (53 MB)
http://www.xm1math.net/texmaker/download.html#windows
Here you can find a good latex templates
http://www.latextemplates.com/
https://www.sharelatex.com/templates/
https://www.writelatex.com/templates
Try sharelatex or writelatex for online editing
https://www.sharelatex.com/
https://www.writelatex.com/
A single email platform might not fit all of your business needs. That's why NetGains offers a hybrid email platform that allows you to design an email plan with the exact number of hosted Microsoft® Exchange accounts and NetGains OfficeConnect POP email accounts as you need.
maXbox Starter 42 Multiprocessing Programming Max Kleiner
If the system running your program has multiple processors, you can improve performance by dividing the work into
several threads and letting them run simultaneously on separate processors or cores.
We show the function and examples to work with it!
This paper defines different components of Ur/Web programming language. Web programming has gradually evolved from a document delivery platform to architecture for distributed programming. Ur/Web, a domain-specific, statically typed functional programming language with a much simpler model for programming modern Web applications. Ur/Web’s model is unified, where programs in a single programming language are compiled to other “Web standards” languages as needed; supports novel kinds of encapsulation of Web-specific state; and exposes simple concurrency, where programmers can reason about distributed, multithreaded applications.
Naming Entities and Locating Mobile EntitiesRajat Kumar
What is a name in Distributed Systems?
A name in a distributed system is a string of bits or characters that is used to refer to an entity.
What is an Entity?
An entity in a distributed system can be practically anything.
Examples include resources such as hosts, printers, disks, and files, processes, users, mailboxes, newsgroups, Web pages, graphical windows, messages, network connections
Introduction to latex. Write your first document in latex
To Download latex for windows (163 MB)
http://miktex.org/download
To Download texmaker editor (53 MB)
http://www.xm1math.net/texmaker/download.html#windows
Here you can find a good latex templates
http://www.latextemplates.com/
https://www.sharelatex.com/templates/
https://www.writelatex.com/templates
Try sharelatex or writelatex for online editing
https://www.sharelatex.com/
https://www.writelatex.com/
A single email platform might not fit all of your business needs. That's why NetGains offers a hybrid email platform that allows you to design an email plan with the exact number of hosted Microsoft® Exchange accounts and NetGains OfficeConnect POP email accounts as you need.
maXbox Starter 42 Multiprocessing Programming Max Kleiner
If the system running your program has multiple processors, you can improve performance by dividing the work into
several threads and letting them run simultaneously on separate processors or cores.
We show the function and examples to work with it!
maXbox Starter 43 Work with Code Metrics ISO StandardMax Kleiner
Today we step through optimize your code with metrics and some style guide conventions. You cannot improve what you don’t measure and what you don’t measure, you cannot prove. A tool can be great for code quality but also provides a mechanism for extending your functions and quality with checks and tests.
Dice and the Law of Probability (maXbox)Max Kleiner
Dice and the Law of Probability
Probability theory is required to describe nature and life. A revolutionary discovery of early 20th century physics was the random character of all physical processes that occur at sub-atomic scales and are governed by the laws of quantum mechanics.
Imagine you are playing a game which uses dice.
Web engineering UNIT IV as per RGPV syllabusNANDINI SHARMA
Technologies for Web Applications: Introduction of XML, Validation of XML documents, DTD, Ways to use XML, XML for data files, HTML Vs XML, Embedding XML into HTML documents, Converting XML to HTML for Display, Displaying XML using CSS and XSL, Rewriting HTML as XML, Relationship between HTML, SGML and XML, web personalization , Semantic web,
Semantic Web Services, Ontology.
Web based application of Live Scoreboard using XML.Uttam Kumar
The method of using XML documents for current storing and displaying and then updating later in the database can be used in web pages where frequently changing data has to be displayed like live score card, stock exchange report, weather details as wind direction, wind speed, temperature etc. and many more areas. In our project, we are making a web based application that will display the live scores of any live cricket game.
By now, you have heard how important structured content is. But, maybe you poked around with something like DITA and were baffled by the complexity. Or, maybe you still aren’t sure what XSLT stands for. This workshop will take participants back to the basics, to provide a foundation for higher-level concepts that have taken hold of our industry. Topics will include:
- What XML looks like, what it does, and how to create it.
- How to define a structure model, including whether to use a - DTD, Schema, etc.
- What XSLT looks like, what it does, and how to make it work.
- What DITA and DocBook really are and whether one is right for you.
Russell Ward is an experienced technical writer and structured technologies developer. He has spent many years working with structured content to maximize efficiency in the techcomm environment, both as an employee and as an independent consultant. He is also an experienced trainer and speaks periodically at conferences and other peer events.
Investigating Soap and Xml Technologies in Web Service ijsc
In this paper, Investigating SOAP and XML technologies in web service is studied. The reason for using XML technology to transmit data and also the need for application of existing communicative structure in SOAP technology in web pages with WSDL technology are investigated uniquely. And also the need for searchable address giving for web service which is available in UDDI technology and the advantages of using it are explained for programmers.
INVESTIGATING SOAP AND XML TECHNOLOGIES IN WEB SERVICEijsc
In this paper, Investigating SOAP and XML technologies in web service is studied. The reason for using
XML technology to transmit data and also the need for application of existing communicative structure in
SOAP technology in web pages with WSDL technology are investigated uniquely. And also the need for
searchable address giving for web service which is available in UDDI technology and the advantages of
using it are explained for programmers.
This workshop is intended for Connecticut Digital Archive participants to introduce them to xml and how MODS or metadata object description schema is implemented in the CTDA.
In the last sessions we have seen that P4D (Python 4 Delphi) is powerful enough to offer components, Python packages or libraries in Delphi or Lazarus (FPC). This time we go the other way of usage and integration; how does the Python or web world in the shell benefit from the VCL components as GUI controls. We create a Python extension module from Delphi classes, packages or functions. Building Delphi’s VCL library as a specific Python module in a console or editor and launching a complete Windows GUI from a script can be the start of a long journey.
The flood of Open APIs is now so blatant that we take a closer look at some basics and principles. Of course, the best way to understand how APIs work is to try them. While most APIs require access via API keys or have complicated authentication and authorization methods, there are also open APIs with no requirements or licenses whatsoever. This is especially useful for beginners as we can start exploring different APIs right away. It’s also useful for web developers who want easy access to a sample dataset for their app; e.g. most weather apps get their weather forecast data from a weather API instead of building weather stations themselves.
Faker is a Python library that generates fake data. Fake data is often used for testing or filling databases with some dummy data. Faker is heavily inspired by PHP's Faker, Perl's Data::Faker, and by Ruby's Faker.
Many of the applications and organizations provide avatar features. Finally, synthetic datasets can minimize privacy concerns. Attempts to anonymize data can be ineffective, as even if sensitive/identifying variables are removed from the dataset
Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as DLLs and much more like scripting. P4D provides different levels of functionality: Low-level access to the python API High-level bi-directional interaction with Python Access to Python objects using Delphi custom variants (VarPyth.pas).
Python for Delphi (P4D) is a set of free components that wrap up the Python DLL into Delphi and Lazarus (FPC). They let you easily execute Python scripts, create new Python modules and new Python types. You can create Python extensions as DLLs and much more like scripting. P4D provides different levels of functionality:
Low-level access to the python API
High-level bi-directional interaction with Python
Access to Python objects using Delphi custom variants (VarPyth.pas)
Wrapping of Delphi objects for use in python scripts using RTTI (WrapDelphi.pas)
Creating python extension modules with Delphi classes and functions
Generate Scripts in maXbox from Python Installation
With the following report I show how to host and execute a deep learning project on a cloud. The cloud is hosted by google Colab and enables working and testing in teams. Lazarus and FreePascal is also being built in colab and the deep learning network is compiled and trained too in a Jupyter notebook with Python scripts.
The portable pixmap format(PPM), the portable graymap format(PGM) and portable bitmap format(PBM) are image file formats designed to be easily exchanged between platforms. They are also sometimes referred collectively as the portable anymap format(PNM). These formats are a convenient (simple) method of saving image data. And the format is not even limited to graphics, its definition allowing it to be used for arbitrary three-dimensional matrices or cubes of unsigned integers.
This tutor puts a trip to the kingdom of object recognition with computer vision knowledge and an image classifier.
Object detection has been witnessing a rapid revolutionary change in some fields of computer vision. Its involvement in the combination of object classification
as well as object recognition makes it one of the most challenging topics in the domain of machine learning & vision.
How can we visualize data in machine learning with VS Code? This is a C# wrapper for the GraphViz graph generator for dotnet core. Further bindings for Python GraphViz are shown and exports to MS Power BI all in MS Visual Code, Jupyter and dotnet core.
K-CAI NEURAL API is a Keras based neural network API for machine learning that will allow you to prototype with a lots of possibilities of Tensorflow! Python, Free Pascal and Delphi together in Google Colab, Git or the Community Edition.
Software is changing the world. CGC is a Common Gateway Coding as the name says, it is a "common" language approach for almost everything. I want to show how a multi-language approach to infrastructure as code using general purpose programming languages lets cloud engineers and code producers unlocking the same software engineering techniques commonly used for applications.
Code Review Checklist: How far is a code review going? "Metrics measure the design of code after it has been written, a Review proofs it and Refactoring improves code."
In this paper a document structure is shown and tips for a code review.
Some checks fits with your existing tools and simply raises a hand when the quality or security of your codebase is impaired.
Open LDAP as A directory serviceis a system for storing and retrieving information in a tree-like structure with the following key properties:
Optimized for reading Distributed storage model Extensible data storage types Advanced search capabilities Consistent replication possibilities
They are a block of code plus the bindings to the environment they came from (RagusaIdiom).
Closures are reusable blocks of code that capture the environment and can be passed around as method arguments for immediate or deferred execution.
This tutor explains a solution to attach a console to your app. Basically we want an app to have two modes, a GUI mode and a non-GUI mode for any humans and robots. A NoGUI app provides a mechanism for storage and retrieval of data and functions in means other than the normal GUI used in operating systems.
Introduction to use machine learning in python and pascal to do such a thing like train prime numbers when there are algorithms in place to determine prime numbers. See a dataframe, feature extracting and a few plots to re-search for another hot experiment to predict prime numbers.
This tutor shows the train and test set split with binary classifying, clustering and 3D plots and discuss a probability density function in scikit-learn on synthetic datasets. The dataset is very simple as a reference of understanding.
This tutor shows the train and test set split with histogram and a probability density function in scikit-learn on synthetic datasets. The dataset is very simple as a reference of understanding.
In this article you will learn hot to use tensorflow Softmax Classifier estimator to classify MNIST dataset in one script.
This paper introduces also the basic idea of a artificial neural network.
The term “machine learning” is used to describe one kind of “artificial intelligence” (AI) where a machine is able to learn and adapt through its own experience. We crawled and collected 30 top overview diagrams which shows the topic of methods, algorithms and concepts.
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.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
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.
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.
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
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.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
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
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
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.
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
1. maXbox Starter 27
Start with XML
1.1 From ASCII to XML
XML is not a replacement for HTML!
This provocation starts the Tutorial 27 with XML.
XML (Extensible Markup Language) is a flexible way to create common information formats and
share both the format and the data on the World Wide Web, intranets, wikis, configuration and
elsewhere in a cloud. For example, computer assemblers might agree on a standard or common
way to describe the information about a computer product (processor speed, case mode, memory
size, and so on) and then describe the product information format with XML.
Or suppose you are the engineer of a new TGV train type with 3 possible type settings:
- <SOAP-ENC:Array id="ref-35" SOAP-ENC:arrayType="xsd:anyType[16]">
<item id="ref-46" xsi:type="SOAP-ENC:string">proto</item>
<item id="ref-47" xsi:type="SOAP-ENC:string">TGV A2</item>
<item xsi:type="xsd:int">304</item>
<item xsi:type="xsd:int">230</item>
<item xsi:type="xsd:int">490</item>
</SOAP-ENC:Array>
That’s how XML look likes and you imagine it’s stored in a file.
I mentioned first XML it’s not a replacement for HTML. The acronym HTML stands for Hyper Text
Markup Language - the primary programming language used to write content or visual controls on
the web. I’ll explain that now:
XML and HTML were designed with different goals:
•
•
XML was designed to transport and store data, with focus on what data is
HTML was designed to display data, with focus on how data appears
HTML is about displaying information, while XML is about carrying information. This tutorial is
based on the idea of carrying and transport information.
Next you see a so called interface description with message information:
- <binding name="IVCLScannerbinding" type="tns:IVCLScanner">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="PostData">
<soap:operation soapAction="urn:VCLScanIntf-IVCLScanner#PostData" style="rpc" />
- <input message="tns:PostData0Request">
A SOAP or interface message is an ordinary XML document containing the following elements:
•
An Envelope element that identifies XML documents as a SOAP message
2. •
•
•
A Header element that contains header information
A Body element that contains call and response data
A Fault element containing errors and status data
SOAP provides a way to communicate between applications running on different operating
systems, with different technologies and programming languages.
XML data is stored in plain text format. This provides also a software- and hardwareindependent way of storing data.
You see XML is a large topic but we won’t go that far. Just one structured example and then we
dive into 2 code examples to generate and measure some XML data.
This file you can get over the internet and it has the purpose of an ini-file:
http://max.kleiner.com/myconfig.xml
The ini-file format is still popular; many configuration files (such as desktop or persistence
settings file) are in this format. This format is especially useful in cross-platform applications and
mobile devices where you can't always count on a system registry for storing configuration data
or save the user options.
It shows the implementation of 2 databases (Interbase and mySQL) which communicate with a
client over TCP and sockets. I made it scriptable to demonstrate the fascination of 2 database
boxes communicate with each other at the same time.
<?xml version="1.0" ?>
- <databases>
- <database db="InterBase">
- <connection>
<name>TrueSoft</name>
<path>D:SuperPath</path>
<user>MaxMin</user>
</connection>
</database>
- <database db="mySQL">
- <connection>
<name>maXml</name>
<server>/.//kylix02</server>
<user>carpeDiem</user>
</connection>
</database>
</databases>
The note of the ini-file as XML above is quite self descriptive. It has database and connection
information, it also has a name and a user body.
But wait a second where’s the function? Yeah you got it; this XML document (or most others)
does not DO anything. It is just information wrapped in tags and structure. Someone must write a
box of software to send, receive or display it.
When you read data, or write data, a function will not return until the operation of the software is
complete. And once again:
XML is used to transport and store data, while HTML is used to format and display the
data. (XML became a W3C recommendation on February 10, 1998)
By the way: XML is the most common standard for data transmissions between all sorts of
applications. For example, to connect simply to the above database call the connect path or
server description from the XML file and wait for it to return. If it succeeds, it will return when it
does. If it fails, it will raise an exception.
2
3. So far so dude, let’s start scripting. If a maXbox script or app is programmed to assume to get a
file, it is always started relative to the path where the maXbox3.exe as the host itself is:
So for example you want to store or load a file, all your external files (we need one file below
mentioned) or resources in a script will be found relative to ExePath():
E:Program Filesmaxboxmaxbox3samplegen3.xml
In this case ExePath is > E:Program Filesmaxboxmaxbox3.
ExePath is a useful function where you always get the path of maXbox.
If someone tries to start (install) the script or the app to or from a different drive for space or
organizational reasons, it may fail to (install) or to run the script after installation1.
You find all info concerning run environment of the app and script in menu
../Program/Information/……
Next you see the XML App:
You need the following script file ready to download and start with compile:
http://www.softwareschule.ch/examples/440_XML_Tutor2.txt
Now we want to produce some huge data. In reality, an XML file can be large enough so the
structure generates some overhead you don’t have with a binary file. That’s the price for
transparency and common readability standard.
Such a standard way of describing data would enable a user to send an intelligent agent (a
program) to each computer maker's web site, gather data, and then make a valid comparison.
XML can be used by any person or group of individuals or companies that wants to share
information in a consistent way.
1
You don’t have to install maXbox or a script anyway, just unzip and drop the script
3
4. So the app 440_XML_Tutor2.txt has the following functions:
•
•
•
[Perform XML] Generate 100000 XML nodes to a file called samplegen.xml
[Load XML Doc] Load and save the file as samplegen_loadandsave.xml and
measure its performance
[] Load the data for a database transaction.
And forget the [Split Picture] it’s a function for forthcoming store picture in an XML database; but
not topic of this tutorial. The third point needs further explanation.
XML describes the content in terms of what data is being described. For example, the word
"phonenum" placed within markup tags (like <server>) could indicate that the data that followed
was a phone number.
This means that an XML file can be processed purely as data by a program or it can be stored
with similar data on another machine or, like an HTML file, that it can be displayed. For example,
depending on how the application in the receiving computer wanted to handle the phone number,
it could be stored, displayed, or dialled!
Another example of the above showed ini-file concerning databases. The word <connection>
and <server> within tags could be stored, configured or connected.
So I think its time for practice. Load the script and press the button [Perform XML] then you press
[Load XML Doc] and chose the just produced file samplegen.xml. It will take some time running
through the nodes and store the result as samplegen_loadandsave.xml but in the end you will
get two new files on your store with the same size as proof of concept:
23.05.2013
17.03.2013
21.01.2014
30.01.2014
30.01.2014
30.01.2014
19:54
<DIR>
examples
13:14
<DIR>
web
20:37
1'094 sample33.xml
19:58
4'695'013 samplegen.xml
19:43
4'695'013 samplegen3.xml
19:59
4'695'013 samplegen_loadandsave.xml
9 Datei(en)
14'238'681 Bytes
0 Verzeichnis(se), 5'065'957'376 Bytes frei
This first project 440_XML_Tutor2 has been designed to be as simple as possible. But what
does it mean running through the nodes?
The XML DOM defines a standard way for accessing and manipulating XML documents.
A DOM (Document Object Model) defines a standard way for accessing, navigating and
manipulating documents.
Therefore the XML DOM defines a standard way for accessing and manipulating XML
documents. And the XML DOM views an XML document as a tree-structure.
All elements can be accessed through the DOM tree. Their content (element, text and attributes2)
can be modified or deleted, and new elements can be created. The elements, their text, and their
attributes are all known as nodes.
The first step in building a XML file is to understand the DOM. For standard files this is done by
reading the appropriate tutorial RFC. I’m just kidding ;-).
Most standards are conversational and plain text. Conversational means that a command or
node is given, a status response follows, and possibly data. Protocols that are very limited are
often not conversational, but are still plain text.
Plain text makes protocols much easier to debug and also using different programming
languages and operating systems.
2
Text, Attribute, Element, Comment, Document, CData Nodes
4
5. The syntax rules of XML are very simple and logical. The well defined rules are easy to learn,
and easy to use. Each opener should have a closure in a well formed way:
<connection><path> attributes /./ elements </path></connection>
(They are said to be "Well Formed" XML documents).
1.2 Get the Node
How about the code of our 100000 nodes function? The procedure will accept multiple
commands, until a Quit or Count command is received; means the 2 for loops reach 100000
nodes.
First we create and configure some 3 objects of the classes TALXmlDocument and TAlXmlNode:
procedure TForm1_BtnGenerate100000NodeWithALXmlDocumentClick(Sender:
TObject);
begin
Try
ProgBar.Position:= 0;
aXMLDocument:= TALXmlDocument.Create;
try
//aXMLDocument:= CreateEmptyXMLDocument('root');
aStartDate:= GetTickCount;
aXMLDocument.Active:= true;
aXMLDocument.AddChild('root');
ProgBar.StepBy(4);
For k:= 1 to 1000 do begin
aNewRec:= aXMLDocument.DocumentElement.AddChild(alRandomStrU(8),0);
aNewrec.Attributes[alRandomStrU(8)]:=alRandomStrU(25);
aNewrec.Attributes[alRandomStrU(8)]:=alRandomStrU(25);
For i:= 1 to 100 do begin
aValueRec:= aNewRec.AddChild(alRandomStrU(8),0);
aValueRec.Text:= alRandomStrU(25);
end;
end;
ShowmessageBig('Close OK to shutdown TCP Server listen on:
'+intToStr(Bindings[0].Port));
end;
Writeln('Server Stopped at '+DateTimeToInternetStr(Now, true))
end;
The only important parts that are XML specific are the aXMLDocument.AddChild('root')
method, aNewrec.Attributes method, and the aValueRec method.
The AddChild() list represents a data Container as a key – value dictionary in a compound
collection.
The following properties as the root node are our point of interest as an important rule:
5
6. •
•
•
XML documents must contain one element that is the parent of all other elements.
This element is called the root element.
In XML, all elements must be properly nested within each other
XML elements can have attributes in name/value pairs just like in HTML
We can say that an XML document forms a iterated tree structure that starts at ”the root” and
branches to “the leaves”.
The elements in an XML document form a document well formed tree. The tree starts at the root
and branches to the lowest level of the tree. And what about the children of the revolution?
All elements can have sub elements called child elements.
As you will see in the following list, more classes in a DOM are needed for a full working with
XML: This is the list for coding client requests.
•
•
•
•
•
•
procedure SIRegister_TALXMLDocument;
procedure SIRegister_TALXmlNotationNode;
procedure SIRegister_TALXmlDocFragmentNode;
procedure SIRegister_TALXmlDocTypeNode;
procedure SIRegister_TALXmlEntityNode;
procedure SIRegister_TALXmlEntityRefNode;
•
•
•
•
•
•
•
procedure SIRegister_TALXmlCDataNode;
procedure SIRegister_TALXmlProcessingInstrNode;
procedure SIRegister_TALXmlCommentNode;
procedure SIRegister_TALXmlDocumentNode;
procedure SIRegister_TALXmlTextNode;
procedure SIRegister_TALXmlAttributeNode;
procedure SIRegister_TALXmlElementNode;
•
•
•
•
procedure SIRegister_TALXMLNode;
procedure SIRegister_TALXMLNodeList;
procedure SIRegister_EALXMLDocError;
procedure SIRegister_ALXmlDoc;
XML is also "extensible" because, unlike HTML, the markup symbols are unlimited and selfdefining. XML is actually a simpler and easier-to-use subset of the Standard Generalized Markup
Language (SGML), the standard for how to create a document structure.
It is expected that HTML and XML will be used together in many Web applications. XML markup,
for example, may appear within an HTML page.
Early applications of XML include Microsoft's Channel Definition Format (CDF), which
describes a channel, a portion of a web site that has been downloaded to your hard disk and is
then is updated periodically as information changes.
A specific CDF file contains data that specifies an initial Web page and how frequently it is
updated.
Also Indy server components create a listener thread that is separate from the main thread of the
program to use such XML agents. The listener thread listens for incoming client requests. For
each client that it answers, it then spawns a new thread to service that client. The appropriate
events are then fired within the context of that thread.
We should note that beside DOM also SAX exists. Wiki says:
SAX (Simple API for XML) is an event-based sequential access parser API developed by the
XML-DEV mailing list for XML documents. SAX provides a mechanism for reading data from an
6
7. XML document that is an alternative to that provided by the Document Object Model (DOM).
Where the DOM operates on the document as a whole, SAX parsers operate on each piece of
the XML document sequentially.
SAX parsers have some benefits over DOM-style parsers.
1. Many Lines to push XML
At least take a look about measuring the nodes performance.
The below lines read the nodes with 3 specific optimisations of a stack (see appendix) and puts
the input into the local push method and get it back with a pop method variable i: integer.
Function TForm1_scrollAllNode(aNode: TalXmlNode): Integer;
Var aStack: TStack;
i: integer;
begin
Result:= 0;
aStack:= TStack.Create;
try
{with TStVMatrix.Create(1,2,3,4,'',6) do begin
flushcache; free; end;}
For i:= 0 to aNode.ChildNodes.Count - 1 do
aStack.Push((ANode.ChildNodes[i]));
While astack.Count > 0 do begin
inc(result);
aNode:= TalxmlNode(astack.Pop);
If assigned(ANode.ChildNodes) then
For i:= 0 to ANode.ChildNodes.Count - 1 do
aStack.Push((ANode.ChildNodes[i]));
If assigned(ANode.AttributeNodes) then
For i:= 0 to ANode.attributeNodes.Count - 1 do
7
8. aStack.Push((ANode.AttributeNodes[i]));
end;
finally
aStack.Free;
end;
end;
Next the call of TForm1_scrollAllNode() which is stack parsed to see which memory and
time consumption the client issued.
aStartDate:= GetTickCount;
aALXMLDocument.LoadFromFile(mOpenDialog.FileName, false);
aNodeCount:= TForm1_scrollAllNode(aALXMLDocument.Node);
MemoLoadXmlDocu.Lines.Add('Memory used: ' +
FormatFloat('0,',(ProcessMemoryUsage(GetCurrentProcessID) memUsage)) + ' bytes');
MemoLoadXmlDocu.Lines.Add('Number of nodes created: ' +
IntToStr(aNodeCount));
If the command index top is "Count" the loop stops at the end of the list. No more reading or
writing of the node is permitted after that call. The result is the overall node count.
At the very end a topic to remember to exchange XML data:
2: TCP Client/Server Script with an XML exchange
Client is a TIdTCPClient and is a component in the app. The following properties were
altered from the default:
8
9. •
•
Host = 127.0.0.1 - Host was set to contact a server on the same machine as the
client (or set by 192.168.1.53).
Port = 6000 - An arbitrary number for this demo. This is the port that the client will
contact the server with.
procedure TCPMain_Connect1Click(Sender: TObject);
begin
//butnLookup.Enabled:= true;
client:= TIdTCPClient.create(self);
client.host:= TCPHOST; //'127.0.0.1';
client.port:= TCPPORT;
try
with Client do begin
Connect(2000); try
//lboxResults.Items.Add(ReadLn());
memo2.lines.add(ReadLn('',1000,80));
//hello from TCP
//for i:= 0 to memoInput.Lines.Count-1 do begin
for i:= 01001 to 01013 do begin
WriteLn('ZipCode ' + '0'+inttoStr(i));
//
ip_port:= ReadInteger('Web','IPPORT',0);
finally
writeln('inifile sysdata2: '+boot_conf+':'+intToStr(ip_port));
Free;
end;
end;
This process is handled directly, through an object so each time it changes ReadLn of the
connection also and not on demand.
In other words within the operating system and the application that created a socket, a socket
is referred to by a unique integer number called socket identifier or socket number.
The operating system forwards the payload of incoming IP packets to the corresponding
application by extracting the socket address information from the IP and transport protocol
headers and stripping the headers from the application data.
Related glossary terms:
•
Web Services Description Language (WSDL),
•
Java Message Service (JMS), appliance computing,
•
JNDI (Java Naming and Directory Interface), table, redirection,
•
WS-AtomicTransaction (WS-AT), Portal Markup Language (PML),
•
URI (Uniform Resource Identifier), Internet map
9
10. 3: XML Time in Action
Telnet is a client-server protocol, based on a reliable connection-oriented transport. Typically this
protocol is used to establish a connection to Transmission Control Protocol (TCP) port number
23, where a Telnet server application (telnetd) is listening. Telnet, however, predates TCP/IP
and was originally run over Network Control Program (NCP) protocols.
Links of maXbox and XML Programming:
http://www.softwareschule.ch/maxbox.htm
http://sourceforge.net/projects/maxbox
http://sourceforge.net/apps/mediawiki/maxbox/
http://www.w3schools.com/xml/default.asp
http://en.wikipedia.org/wiki/Simple_API_for_XML
10
11. 1.3 Appendix
EXAMPLE: List Objects
Working with Lists
The VCL/RTL includes many classes that represents lists or collections of items. They vary depending
on the types
of items they contain, what operations they support, and whether they are persistent.
The following table lists various list classes, and indicates the types of items they contain:
Object Maintains
TList A list of pointers
TThreadList A thread-safe list of pointers
TBucketList A hashed list of pointers
TObjectBucketList A hashed list of object instances
TObjectList A memory-managed list of object instances
TComponentList A memory-managed list of components (that is, instances of classes descended from
TComponent)
TClassList A list of class references
TInterfaceList A list of interface pointers.
TQueue A first-in first-out list of pointers
TStack A last-in first-out list of pointers or objects
TObjectQueue A first-in first-out list of objects
TObjectStack A last-in first-out list of objects
TCollection Base class for many specialized classes of typed items.
TStringList A list of strings
THashedStringList A list of strings with the form Name=Value, hashed for performance.
The ProgID for each of the Shell objects is shown in the following table.
Object
TList
TThreadList
TBucketList
TObjectBucketList
TObjectList
TComponentList
TClassList
TInterfaceList
TQueue
TStack
TObjectQueue
TObjectStack
TCollection
TStringList
THashedStringList
Function
A list of pointers
A thread-safe list of pointers
A hashed list of pointers
A hashed list of object instances
A memory-managed list of object instances
A memory-managed list of components
A list of class references
A list of interface pointers
A first-in first-out list of pointers
A last-in first-out list of pointers/objects
A first-in first-out list of objects
A last-in first-out list of objects
Base class for many specialized classes of typed items
A list of strings
A list of strings with the form Name=Value, hashed for performance.
11