(This is presentation slide for RubyKaigi 2009)
Erubis is very fast and extensible implementation of eRuby. In this slides, I show you features of Erubis, and issues related to eRuby and solution by Erubis. Also I show you some ideas about the future of template system.
Description of the API concept for engineering and how it can be useful. Particularly how it should be used with respect to genomics data. Finally, an analogy of the API concept in synthetic biology and how evolution allows encapsulation.
PHP 8.0 comes with many long-awaited features: A just-in-time compiler, attributes, union types, and named arguments are just a small part of the list. As a major version, it also includes some backward-incompatible changes, which are centered around stricter error handling and enhanced type safety. Let's have an overview of the important changes in PHP 8.0 and how they might affect you!
(This is presentation slide for RubyKaigi 2009)
Erubis is very fast and extensible implementation of eRuby. In this slides, I show you features of Erubis, and issues related to eRuby and solution by Erubis. Also I show you some ideas about the future of template system.
Description of the API concept for engineering and how it can be useful. Particularly how it should be used with respect to genomics data. Finally, an analogy of the API concept in synthetic biology and how evolution allows encapsulation.
PHP 8.0 comes with many long-awaited features: A just-in-time compiler, attributes, union types, and named arguments are just a small part of the list. As a major version, it also includes some backward-incompatible changes, which are centered around stricter error handling and enhanced type safety. Let's have an overview of the important changes in PHP 8.0 and how they might affect you!
An overview of the main questions/design issues when starting to work with databases in Perl
- choosing a database
- matching DB datatypes to Perl datatypes
- DBI architecture (handles, drivers, etc.)
- steps of DBI interaction : prepare/execute/fetch
- ORM principles and difficulties, ORMs on CPAN
- a few examples with DBIx::DataModel
- performance issues
First given at YAPC::EU::2009 in Lisbon. Updated version given at FPW2011 in Paris and YAPC::EU::2011 in Riga
lldb kann mehr als nur einfache Breakpoints oder po. In dem Vortrag zeigt Oliver Bayer, wie sich mit Hilfe von lldb Programmcode zur Ausführungszeit manipulieren lässt, ohne das hierfür der Sourcecode anzupassen ist. Sei es, damit Test- oder Debugcode nicht in die produktiv App gelangt, oder weil der Sourcecode für einen Teil der App nicht vorliegt.
Event: macoun, 04.10.2019
Speaker: Oliver Bayer, inovex
Mehr Tech-Vorträge: inovex.de/vortraege
Mehr Tech-Artikel: inovex.de/blog
Functional programming, though far from new, has gained much traction recently. Functional programming characteristics have started to appear in the PHP world, too. Microframeworks including Silex and Slim, middleware architectures (Stack) and even standards (PSR-7) rely on concepts such as lambdas, referential transparency and immutability, all of which come from functional programming.
I’ll give you a crash course in Erlang, a pragmatic functional language to make you feel familiar with the functional paradigm. By comparing code samples between Erlang and PHP, you’ll find out how and why you should employ functional programming in your PHP applications. You’ll see that functional programming is nothing to be scared of. On the contrary, understanding its concepts broadens your programming horizon and provides you with valuable solutions to your problems.
Slides from Advaned Python lectures I gave recently in Haifa Linux club
Advanced python, Part 2:
- Slots vs Dictionaries
- Basic and Advanced Generators
- Async programming
Conheça um pouco mais sobre Perl 6, uma linguagem de programação moderna, poderosa e robusta que permitirá que você escreva código de forma ágil e eficiente.
Being functional in PHP (PHPDay Italy 2016)David de Boer
Functional programming, though far from new, has gained much traction recently. Functional programming characteristics have started to appear in the PHP world, too. Microframeworks such as Silex and Slim, middleware architectures such as Stack and even standards such as PSR-7 rely on concepts such as lambdas, referential transparency and immutability, all of which come from functional programming. I’ll give you a crash course in Erlang, a pragmatic functional language to make you feel familiar with the functional paradigm. By comparing code samples between Erlang and PHP, you’ll find out how you can employ functional programming in your PHP applications where appropriate. You’ll see that functional programming is nothing to be scared of. On the contrary, understanding its concepts broadens your programming horizon and provides you with valuable solutions to your problems.
Presentation on BioMake, a GNU-Make-like utility for managing builds and complex workflows using declarative specifications. From GMOD/PAG meeting 2017
Gisting is an implementation of Google\'s MapReduce framework for processing and extracting useful information from very large data sets. At the time of this writing, the code is available for PREVIEW at http://github.com/mchung/gisting. I am currently working to release this framework for general usage.
An overview of the main questions/design issues when starting to work with databases in Perl
- choosing a database
- matching DB datatypes to Perl datatypes
- DBI architecture (handles, drivers, etc.)
- steps of DBI interaction : prepare/execute/fetch
- ORM principles and difficulties, ORMs on CPAN
- a few examples with DBIx::DataModel
- performance issues
First given at YAPC::EU::2009 in Lisbon. Updated version given at FPW2011 in Paris and YAPC::EU::2011 in Riga
lldb kann mehr als nur einfache Breakpoints oder po. In dem Vortrag zeigt Oliver Bayer, wie sich mit Hilfe von lldb Programmcode zur Ausführungszeit manipulieren lässt, ohne das hierfür der Sourcecode anzupassen ist. Sei es, damit Test- oder Debugcode nicht in die produktiv App gelangt, oder weil der Sourcecode für einen Teil der App nicht vorliegt.
Event: macoun, 04.10.2019
Speaker: Oliver Bayer, inovex
Mehr Tech-Vorträge: inovex.de/vortraege
Mehr Tech-Artikel: inovex.de/blog
Functional programming, though far from new, has gained much traction recently. Functional programming characteristics have started to appear in the PHP world, too. Microframeworks including Silex and Slim, middleware architectures (Stack) and even standards (PSR-7) rely on concepts such as lambdas, referential transparency and immutability, all of which come from functional programming.
I’ll give you a crash course in Erlang, a pragmatic functional language to make you feel familiar with the functional paradigm. By comparing code samples between Erlang and PHP, you’ll find out how and why you should employ functional programming in your PHP applications. You’ll see that functional programming is nothing to be scared of. On the contrary, understanding its concepts broadens your programming horizon and provides you with valuable solutions to your problems.
Slides from Advaned Python lectures I gave recently in Haifa Linux club
Advanced python, Part 2:
- Slots vs Dictionaries
- Basic and Advanced Generators
- Async programming
Conheça um pouco mais sobre Perl 6, uma linguagem de programação moderna, poderosa e robusta que permitirá que você escreva código de forma ágil e eficiente.
Being functional in PHP (PHPDay Italy 2016)David de Boer
Functional programming, though far from new, has gained much traction recently. Functional programming characteristics have started to appear in the PHP world, too. Microframeworks such as Silex and Slim, middleware architectures such as Stack and even standards such as PSR-7 rely on concepts such as lambdas, referential transparency and immutability, all of which come from functional programming. I’ll give you a crash course in Erlang, a pragmatic functional language to make you feel familiar with the functional paradigm. By comparing code samples between Erlang and PHP, you’ll find out how you can employ functional programming in your PHP applications where appropriate. You’ll see that functional programming is nothing to be scared of. On the contrary, understanding its concepts broadens your programming horizon and provides you with valuable solutions to your problems.
Presentation on BioMake, a GNU-Make-like utility for managing builds and complex workflows using declarative specifications. From GMOD/PAG meeting 2017
Gisting is an implementation of Google\'s MapReduce framework for processing and extracting useful information from very large data sets. At the time of this writing, the code is available for PREVIEW at http://github.com/mchung/gisting. I am currently working to release this framework for general usage.
Slides from a presentation that David Lopez (@lopezator) and me made for the students of the University of the Basque Country (UPV/EHU) where we talk about current technologies and methodologies used in professional web development.
CSS3, jQuery, Composer, MVC, Clean Code, Git, etc. are different items we talked about.
Some examples shown in the presentation available at:
http://ojoven.es/labs/ehu2014/
A talk on debugging of Python applications given at a local KharkivPy event.
A brief introduction into a set of tools that allow Python developers to debug common issues in their applications.
Hiveminder - Everything but the Secret SauceJesse Vincent
Ten tools and techniques to help you:
Find bugs faster バグの検出をもっと素早く
Build web apps ウェブアプリの構築
Ship software ソフトのリリース
Get input from users ユーザからの入力を受けつける
Own the Inbox 受信箱を用意する
今日の話
Distributed, Incremental Dataflow Processing on AWS with GRAIL's Reflow (CMP3...Amazon Web Services
GRAIL is a life sciences company that analyzes large data sets from high-throughput DNA sequencers to develop methods for early cancer detection. In this session, hear how GRAIL's open-source, cloud-based batch processing system, Reflow, leverages Amazon EC2, Amazon S3, and Amazon DynamoDB to support the large-scale, high-throughput, and cost-efficient data analysis that enables GRAIL's research and development efforts. Reflow takes a modern, “cloud-native” approach to batch data processing, and is architected to run directly on the facilities offered by cloud providers like AWS. This approach allows Reflow to maintain a simple design and implementation while maximally utilizing the underlying AWS services and minimizing operational overhead and computing costs.
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
Presented at Railsconf 2015 by Daniel Spector, @danielspecs.
Crossing the Bridge explores tools, patterns and best practices to connect your Javascript MVC framework to Rails in the most seamless way possible. The talk progresses from demonstrating the standard API request cycle to preloading data to your client-side framework to rendering your javascript on the server. It explores Isomorphic Javascript and ways of implementing it with Rails.
Router is one of the most important feature or component in Web application framework,
ant it is also one of the performance bottlenecks of framework.
In this session, I'll show you how to make router much faster than ever.
Oktest - a new style testing library for Python -kwatch
Oktest is a new-style testing library for Python. It helps you to read & write tests very much. Oktest is available with (or without) standard 'unittest' module.
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.
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.
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.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
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
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.
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.
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.
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/
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
17. ‣ PHP, Java, JS, C, Perl,Scheme ( )
<% for (i=0; i<n; i++) { %> (C )
<li><%= "%d", i %> printf()
<% } %>
#line 1 "file.ec" (erubis -xl c file.ec )
for (i=0; i<n; i++) {
fputs("<li>", stdout); fprintf(stdout, "%d", i);
fputs("n", stdout); }
copyright(c) 2009 kuwata-lab.com all rights reserved.
17
18. ‣ Erubis
• HTML
•
• Enhancer
• /
•
• PHP, Java, JS, C, Perl, Scheme
copyright(c) 2009 kuwata-lab.com all rights reserved.
18
19. Part 2. eRuby
copyright(c) 2009 kuwata-lab.com all rights reserved.
19
20. ‣ binding()
•
i=0 ### file.erb
str = File.read('file.erb') <% for i in 1..3 %>
ERB.new(str).result(binding) <li><%= i %></li>
p i #=> 3 <% end %>
!
copyright(c) 2009 kuwata-lab.com all rights reserved.
20
21. ‣ binding()
•
•
b = Bingind.new
b[:title] = "Example" …
b[:items] = [1, 2, 3]
copyright(c) 2009 kuwata-lab.com all rights reserved.
21
22. ERB
‣( )
‣ Struct
• http://d.hatena.ne.jp/m_seki/20080528/1211909590
Foo = Struct.new(:title, :items)
class Foo
def env; binding(); end
end
ctx = Foo.new("Example", [1,2,3])
ERB.new(str).result(ctx.env)
copyright(c) 2009 kuwata-lab.com all rights reserved.
22
23. Erubis
‣ Binding Hash
erubis.result(:items=>[1, 2, 3])
def result(b=TOPLEVEL_BINDING)
if b.is_a?(Hash)
s = b.collect{|k,v| "#{k}=b[#{k.inspect}];"}.join
b = binding()
eval s, b Binding
end
return eval(@src, b)
end
copyright(c) 2009 kuwata-lab.com all rights reserved.
23
24. Erubis
‣ Binding Object
@items = [1, 2, 3]; <% for x in @items %>
erubis.evaluate(self) <% end %>
def evaluate(ctx) Hash
if ctx.is_a?(Hash)
hash = ctx; ctx = Object.new
hash.each {|k,v|
ctx.instance_variable_set("@#{k}", v) }
end
return ctx.instance_eval(@src)
end copyright(c) 2009 kuwata-lab.com all rights reserved.
24
28. Erubis
‣ Proc
•
•
instance_eval
def evaluate(ctx) Proc
@proc ||= eval(@src)
ctx.instance_eval(@proc)
end
copyright(c) 2009 kuwata-lab.com all rights reserved.
28
29. ‣
• HTML
<ul>
<ul>
<% for x in @list %> <li>AAA</li>
<li><%= x %></li>
<% end %> <li>BBB</li>
</ul>
</ul>
copyright(c) 2009 kuwata-lab.com all rights reserved.
29
31. Erubis
‣
• <% %>
• <%= %>
<ul> <ul>
<% for x in @list %> AAA
<%= x %> BBB
<% end %> CCC
</ul> </ul>
copyright(c) 2009 kuwata-lab.com all rights reserved.
31
40. $ cat foo.eruby
<% unless @items.blank? %>
<table>
<% @items.each_with_index do|x, i| %>
<tr class="record">
<td><%= i +1 %></td>
<td><%=h x %></td>
</tr>
<% end %>
</table>
<% end %>
copyright(c) 2009 kuwata-lab.com all rights reserved.
40
41. -x Ruby
$ erubis -x foo.eruby
_buf = ''; unless @items.blank?
_buf << '<table>
'; @items.each_with_index do|x, i|
_buf << ' <tr class="record">
<td>'; _buf << ( i +1 ).to_s; _buf << '</td>
<td>'; _buf << (h x ).to_s; _buf << '</td>
</tr>
'; end
_buf << '</table>
'; end
_buf.to_s
copyright(c) 2009 kuwata-lab.com all rights reserved.
41
42. -X
$ erubis -X foo.eruby
_buf = ''; unless @items.blank?
@items.each_with_index do|x, i|
_buf << ( i +1 ).to_s;
_buf << (h x ).to_s;
end
end
_buf.to_s
copyright(c) 2009 kuwata-lab.com all rights reserved.
42
43. -N (number)
$ erubis -XN foo.eruby
1: _buf = ''; unless @items.blank?
2:
3: @items.each_with_index do|x, i|
4:
5: _buf << ( i +1 ).to_s;
6: _buf << (h x ).to_s;
7:
8: end
9:
10: end
11: _buf.to_s
copyright(c) 2009 kuwata-lab.com all rights reserved.
43
44. -U (uniq)
$ erubis -XNU foo.eruby
1: _buf = ''; unless @items.blank?
3: @items.each_with_index do|x, i|
5: _buf << ( i +1 ).to_s;
6: _buf << (h x ).to_s;
8: end
10: end
11: _buf.to_s
copyright(c) 2009 kuwata-lab.com all rights reserved.
44
45. -C (compact)
$ erubis -XNC foo.eruby
1: _buf = ''; unless @items.blank?
3: @items.each_with_index do|x, i|
5: _buf << ( i +1 ).to_s;
6: _buf << (h x ).to_s;
8: end
10: end
11: _buf.to_s
copyright(c) 2009 kuwata-lab.com all rights reserved.
45
46. <%= %>
<%= form_for :user do %>
<div>
<%= text_field :name %>
</div>
<% end %> eRuby
copyright(c) 2009 kuwata-lab.com all rights reserved.
46
47. <%= %>
<%= 10.times do %>
Hello
<% end %>
!
_buf = "";
_buf << ( 10.times do ).to_s;
_buf << " Hellon";
end
copyright(c) 2009 kuwata-lab.com all rights reserved.
47
48. ERB+Rails
‣ (_erbout)
!
form_for()
… _erbout
<% form_for do %> _erbout = ""
Hello form_for do
<% end %> _erbout.concat("Hello")
end
copyright(c) 2009 kuwata-lab.com all rights reserved.
48
49. Erubis+Merb
‣ Erubis
<%= form_for do %> @_buf << (form_for do;
Hello @_buf << "Hellon"
<% end =%> end);
copyright(c) 2009 kuwata-lab.com all rights reserved.
49
50. ‣ eRuby
‣ (kool!)
‣
• @_buf
‣
copyright(c) 2009 kuwata-lab.com all rights reserved.
50
51. ‣ eRuby
eRuby
•
•
•
•
• HTML
•
•
copyright(c) 2009 kuwata-lab.com all rights reserved.
51
52. Part 3.
copyright(c) 2009 kuwata-lab.com all rights reserved.
52
53. ‣
<ul> print "<ul>n"
<% for x in @a %> for x in @a
<li><%=x%></li> print "<li>#{x}</li>n"
<% end %> end
</ul> print "</u>n"
copyright(c) 2009 kuwata-lab.com all rights reserved.
53
54. <ul> s = File.read('foo.eruby')
<li><%=x%></li> e = Erubis::Eruby.new(s)
</ul> puts e.evaluate(:x=>1)
copyright(c) 2009 kuwata-lab.com all rights reserved.
54
55. ‣ ?
<%#ARGS: items, name='guest' %>
Hello <%= name %>!
<% for x in items %>
<li><%=x%></li>
<% end %>
copyright(c) 2009 kuwata-lab.com all rights reserved.
55
56. ‣ HTML
•
<html> <html>
<body>
<body> !( )
</body>
<h1><%=@title%></h1> </html>
<ul id="menulist">
<% for x in @items %> <h1><%=@title%></h1>
<li><%=x%></li> <ul id="menulist">
</ul>
<% end %>
</ul> <% for x in @items %>
</body> <li><%= x %></li>
</html> <% end %>
copyright(c) 2009 kuwata-lab.com all rights reserved.
56