This document discusses building web service clients with ActiveModel. It notes that ActiveModel is used for building forms and interacting with data internally within requests. It then discusses how to abstract complexity when working with web services and external APIs. It provides examples of using ActiveModel features like callbacks, dirty tracking, errors, serialization, and validations to build client-side models. It also discusses techniques for making parallel API requests using libraries like EventMachine and Typhoeus to improve performance. The goal is to build readable and maintainable client-side code that can scale with both complexity and team size.
This presentation emphasis on How to connect a Play Application with Mysql as database in Scala.Play includes a simple data access layer called Anorm that uses plain SQL to interact with the database and provides an API to parse and transform the resulting datasets.
This lecture includes:
1. JavaScript DOM basics
2. Document object (frequently used properties and methods)
3. Element Object (frequently used properties and methods)
4. Node Object (frequently used properties and methods)
5. Location Object (frequently used properties and methods)
6. Window object (frequently used properties and methods)
Forms are inevitable. Forms are hard. Forms with React sometimes even harder. In this talk, we’ll start by exploring best practices to efficiently work with react/redux forms and proceed with building a custom abstraction layer for easier form management.
This presentation emphasis on How to connect a Play Application with Mysql as database in Scala.Play includes a simple data access layer called Anorm that uses plain SQL to interact with the database and provides an API to parse and transform the resulting datasets.
This lecture includes:
1. JavaScript DOM basics
2. Document object (frequently used properties and methods)
3. Element Object (frequently used properties and methods)
4. Node Object (frequently used properties and methods)
5. Location Object (frequently used properties and methods)
6. Window object (frequently used properties and methods)
Forms are inevitable. Forms are hard. Forms with React sometimes even harder. In this talk, we’ll start by exploring best practices to efficiently work with react/redux forms and proceed with building a custom abstraction layer for easier form management.
How we are writing user perspective tests using tools rspec, capybara, kameleon. To get more readable & maintaiable integration and acceptance tests .
https://github.com/cs3b/kameleon
Python Code Camp (Professionals) is a whole day workshop that aims to enable professionals to learn Python Basics and Django.
Visit: http://devcon.ph/events/python-code-camp-professionals-2016
Python Code Camp (Professionals) is a whole day workshop that aims to enable professionals to learn Python Basics and Django.
Visit: http://devcon.ph/events/python-code-camp-professionals-2016
This presentation covers some jQuery basics, as well as some general concepts you should understand about jQuery. You will find other tips and tricks sprinkled throughout before the live coding session starts.
The code from the live coding session is available here: https://github.com/dcneiner/jQuery-Bling and covers far more advanced topics than the slide portion of this presentation.
How we are writing user perspective tests using tools rspec, capybara, kameleon. To get more readable & maintaiable integration and acceptance tests .
https://github.com/cs3b/kameleon
Python Code Camp (Professionals) is a whole day workshop that aims to enable professionals to learn Python Basics and Django.
Visit: http://devcon.ph/events/python-code-camp-professionals-2016
Python Code Camp (Professionals) is a whole day workshop that aims to enable professionals to learn Python Basics and Django.
Visit: http://devcon.ph/events/python-code-camp-professionals-2016
This presentation covers some jQuery basics, as well as some general concepts you should understand about jQuery. You will find other tips and tricks sprinkled throughout before the live coding session starts.
The code from the live coding session is available here: https://github.com/dcneiner/jQuery-Bling and covers far more advanced topics than the slide portion of this presentation.
Rails provides a set of conventions that allow you to rapidly develop new features, but what happens when things do not fit quite so nicely? Let’s discuss some alternative patterns that compliment Rails.
SummaryHW6 Account ManagementIn HW4, you kept track of multiple.pdfARORACOCKERY2111
Summary
HW6: Account Management
In HW4, you kept track of multiple usernames and its associated password using arrays.
However, usernames and passwords are typically part of a “User” object which in turn may be
part of an “Account” object. Accounts also typically require a certain level of security beyond
the typical encryption mechanisms. This assignment goes deeper into the concept of OOP as you
create objects that requires proper rules and scope for correct usage.
Aside: As with Item objects from HW5, Account and User data is typically stored in databases.
Skills Expected
? All the skills from previous Assignment(s)
? Accessors/Mutators
? Overriding methods: equals and toString
Assignment Description
You will write three Class objects and a Driver for each class (i.e. submit six .java files):
? User
? Account
? AccountList
Note: All properties MUST be private
Submission Requirement: The Driver Class
? Each Class designed MUST be submitted with a corresponding “Driver” Class
? The Driver Class should have a main() that demonstrates, at minimum
o Calling the appropriate constructor to create the appropriate instance
o Everyproperty(instancevariables)canbesetandgetcorrectly(whereallowed) ? Every public
method can be called successfully (and return the correct result)
Class Design: User
The User class is intended to be an abstract and simplified representation of a user
Class Properties
? First Name (String)
? Last Name (String)
? Username (String)
? Password (String)
Class Invariant
? First and Last Name must not be empty
? Username must be at least four characters long
? Password must be at least four characters long (is this a good invariant?)
Class Components
? A constructor that sets the initial user data (first name, last name, username, password)
? A getter/setter for each properties set out above
? A toString() method
? An equals() method
Class Design: Account
The Account class is intended to be an abstract and simplified representation of an account
Class Properties
? User (User)
? Balance (double) – represents how much money the user has in the account
Class Invariant
? Must be a valid account
? Balance must not be negative
Class Components
? A constructor that sets the initial User instance and balance amount
? A Getter but not a Setter for the each properties set out above (why?)
? A public method to add to the balance
? A public method to withdraw from the balance
? A toString() method
? An equals() method
Class Design: AccountList
The AccountList class is intended to be an abstract and simplified representation of a list of
accounts.
Class Properties
? Accounts (an array of Account objects – or ArrayList) o No getters or setters* (do you know
why?)
Class Invariant
? Can’t have multiple accounts with the same username
Class Components
? A public method that adds new accounts
? A public (boolean) method that determines whether an account with a given username exists in
the list
Grading Criteria
? User class object
o [2 points] Impl.
Where's My SQL? Designing Databases with ActiveRecord MigrationsEleanor McHugh
A presentation given at RoReXchange in February 2007. Covers some abuses of the ActiveRecord Migrations mechanism along with examples of simple Rails plug-in design.
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.
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.
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
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
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
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.
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.
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.
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/
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/
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
51. class Collect < Base
end
class ShippingAddress < Base
end
class BillingAddress < Base
end
class LineItem < Base
end
class ShippingLine < Base
end
class NoteAttribute < Base
end
53. class Collect < Base
end
class ShippingAddress < Base
end
class BillingAddress < Base
end
class LineItem < Base
end
class ShippingLine < Base
end
class NoteAttribute < Base
end
62. class Person
include ActiveModel::Dirty
define_attribute_methods [:name]
def name
@name
end
def name=(val)
name_will_change!
@name = val
end
def save
@previously_changed = changes
end
end
63. # A newly instantiated object is unchanged:
person = Person.find_by_name('Uncle Bob')
person.changed? # => false
70. class User
def errors
@errors ||= ActiveModel::Errors.new(self)
end
def validate!
errors.add(:name, "can not be nil")
end
end
user.errors[:name] #=> ["can not be nil"]
74. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_acceptance_of :terms_of_service
end
user = User.new
puts user.valid?
75. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_confirmation_of :password
end
user = User.new
puts user.valid?
76. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_presence_of :name
end
user = User.new
puts user.valid?
77. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_exclusion_of :name,
:in => ["admin"]
end
user = User.new
puts user.valid?
78. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_inclusion_of :role,
:in => ["user", "admin"]
end
user = User.new
puts user.valid?
79. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_format_of :email,
:with => /A([^@s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})Z/i
end
user = User.new
puts user.valid?
80. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_length_of :password, :minimum => 6
end
user = User.new
puts user.valid?
81. class User
include ActiveModel::Validations
attr_reader :name, :email, :age,
:terms_of_service, :password,
:password_confirmation, :role
validates_numericality_of :age
end
user = User.new
puts user.valid?
85. require 'rubygems'
require 'active_model'
require 'test/unit'
require 'user'
class LintTest < ActiveModel::TestCase
include ActiveModel::Lint::Tests
def setup
@model = User.new
end
end
86. class User
include ActiveModel::Conversion
extend ActiveModel::Naming
def valid?() true end
def errors
@errors ||= ActiveModel::Errors.new(self)
end
def persisted?
true
end
end
93. PauldixReadingList::ReadingList.for_user(
"paul",
:include => [:entry, :rating_total]) do |list|
reading_list = list
end
HYDRA.run
# now we can access the reading list
reading_list.entries.each do |entry|
puts entry.id
puts entry.title
puts entry.body
puts "up: #{entry.rating_total.up_count} |
down: #{entry.rating_total.down_count}nn"
end
94. def self.for_user(user_id, options = {}, &block)
includes = options[:include] || []
request =
Typhoeus::Request.new(get_by_id_uri(user_id))
request.on_complete do |response|
list = new(response.body, options)
list.request_entries if includes.include?(:entry)
list.request_rating_totals if
includes.include?(:rating_total)
block.call(list)
end
PauldixReadingList::Config.hydra.queue(request)
end
95. def self.get_ids(ids, &block)
request = Typhoeus::Request.new(get_ids_uri(ids))
request.on_complete do |response|
json = Yajl::Parser.parse(response.body)
entries = ids.map do |id|
new(json[id].merge("id" => id))
end
block.call(entries)
end
PauldixEntries::Config.hydra.queue(request)
end
96. def self.get_ids(ids, &block)
request = Typhoeus::Request.new(get_ids_uri(ids))
request.on_complete do |response|
json = Yajl::Parser.parse(response.body)
ratings = ids.map do |id|
new(json[id])
end
block.call(ratings)
end
PauldixRatings::Config.hydra.queue(request)
end
99. require 'net/http'
include Java
import 'java.util.concurrent.Executors'
class Request
include java.util.concurrent.Callable
def initialize(url)
@url = url
end
def call
Net::HTTP.get(URI.parse(@url))
end
end
100. thread_pool = Executors.new_fixed_thread_pool(50)
futures = []
100.times do |i|
request =
Request.new("http://localhost:3000/entries/#{i}")
futures << thread_pool.submit(request)
end
results = futures.map {|f| f.get}
# do something with results
thread_pool.shutdown