O Rails 3 foi finalmente anunciado e nele uma série de mudanças arquiteturais foram feitas.
A princípio, para que programa, as mudanças podem parecer simples, penas novos comandos ou novas API’s. Mas se olharmos nos detalhes internos do framework podemos ver que as mudanças impactam diretamente na forma de usar o framework.
This document provides a summary of the JSTL (JSP Standard Tag Library) quick reference. It includes tags for control flow, core functionality, formatting, internationalization, and more. Some key tags include:
- <c:forEach> - Loops over a collection or array
- <c:if> - Conditional processing based on an expression
- <fmt:message> - Retrieves localized messages from a resource bundle
- <fmt:formatDate> - Formats dates based on the locale
- <fmt:setBundle> - Sets the localization context
STC 2016 Programming Language StorytimeSarah Kiniry
This document provides an overview of how to interpret code to understand what a program is doing without running it. It discusses using code comments, function names, variable names, file locations, print functions, file names and other variables to understand the program's purpose. Specific programming languages are also discussed including examples of "Hello World" programs in Java, JavaScript, C, C#, PHP, Perl, Ruby and Python.
This document provides a summary of basic Java concepts including data types, operators, flow control statements, comments, and some key Java packages. It lists common Java operators like arithmetic, relational, logical, and bitwise operators. It also summarizes common statements for flow control including if/else, while, do-while, and for loops. Additionally, it shows how to declare variables, arrays, and classes in Java.
This document lists the names of 5 individuals and mentions Google Phone Number, Google Voicemail, Problems with Google Voice, and Google Improvements but provides no other context or information about these topics.
Pensando ao contrário - Por que você deveria considerar Rails no seu próximo ...andersonleite
Ruby on Rails é uma boa opção para o próximo projeto porque é uma estrutura para desenvolvimento web rápido que torna as coisas simples e complexas possíveis através de recursos como metaprogramação e método missing. Além disso, Rails oferece ferramentas como Cucumber e TDD que melhoram a produtividade e qualidade do código.
Active Record é um ORM que mapeia objetos da aplicação para registros em uma base de dados relacional usando metaprogramação. Ele provê funcionalidades como dynamic attributes, validations e dynamic finders através de métodos como method_missing e open classes. Isso permite definir comportamentos de forma declarativa ao invés de imperativa.
O documento discute Behavior Driven Development (BDD) e como usar Cucumber para implementar testes de aceitação. Ele fornece detalhes sobre como estruturar cenários de teste usando Gherkin e definir etapas de teste com Ruby. Além disso, discute como usar recursos como contextos, esquemas de cenários e tags para organizar e executar os testes.
The document discusses resumes, their purpose, and tips for writing an effective resume. It defines resumes as summaries of one's career that speak for them in their absence and focus on professional strengths. Resumes are used to support job applications and guide interviewers towards an applicant's strong areas. The document provides guidelines for resumes such as being concise, emphasizing accomplishments and quantifiable results, and avoiding mistakes like errors, inconsistent formatting, and irrelevant information. It also offers examples of objective statements that can be used on a resume.
This document provides a summary of the JSTL (JSP Standard Tag Library) quick reference. It includes tags for control flow, core functionality, formatting, internationalization, and more. Some key tags include:
- <c:forEach> - Loops over a collection or array
- <c:if> - Conditional processing based on an expression
- <fmt:message> - Retrieves localized messages from a resource bundle
- <fmt:formatDate> - Formats dates based on the locale
- <fmt:setBundle> - Sets the localization context
STC 2016 Programming Language StorytimeSarah Kiniry
This document provides an overview of how to interpret code to understand what a program is doing without running it. It discusses using code comments, function names, variable names, file locations, print functions, file names and other variables to understand the program's purpose. Specific programming languages are also discussed including examples of "Hello World" programs in Java, JavaScript, C, C#, PHP, Perl, Ruby and Python.
This document provides a summary of basic Java concepts including data types, operators, flow control statements, comments, and some key Java packages. It lists common Java operators like arithmetic, relational, logical, and bitwise operators. It also summarizes common statements for flow control including if/else, while, do-while, and for loops. Additionally, it shows how to declare variables, arrays, and classes in Java.
This document lists the names of 5 individuals and mentions Google Phone Number, Google Voicemail, Problems with Google Voice, and Google Improvements but provides no other context or information about these topics.
Pensando ao contrário - Por que você deveria considerar Rails no seu próximo ...andersonleite
Ruby on Rails é uma boa opção para o próximo projeto porque é uma estrutura para desenvolvimento web rápido que torna as coisas simples e complexas possíveis através de recursos como metaprogramação e método missing. Além disso, Rails oferece ferramentas como Cucumber e TDD que melhoram a produtividade e qualidade do código.
Active Record é um ORM que mapeia objetos da aplicação para registros em uma base de dados relacional usando metaprogramação. Ele provê funcionalidades como dynamic attributes, validations e dynamic finders através de métodos como method_missing e open classes. Isso permite definir comportamentos de forma declarativa ao invés de imperativa.
O documento discute Behavior Driven Development (BDD) e como usar Cucumber para implementar testes de aceitação. Ele fornece detalhes sobre como estruturar cenários de teste usando Gherkin e definir etapas de teste com Ruby. Além disso, discute como usar recursos como contextos, esquemas de cenários e tags para organizar e executar os testes.
The document discusses resumes, their purpose, and tips for writing an effective resume. It defines resumes as summaries of one's career that speak for them in their absence and focus on professional strengths. Resumes are used to support job applications and guide interviewers towards an applicant's strong areas. The document provides guidelines for resumes such as being concise, emphasizing accomplishments and quantifiable results, and avoiding mistakes like errors, inconsistent formatting, and irrelevant information. It also offers examples of objective statements that can be used on a resume.
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010Plataformatec
The document discusses the architecture and advantages of Rails 3. It describes how Rails 3 applications are organized as Rack applications and are more modular than previous versions. Key advantages mentioned include improved performance, being more framework-agnostic, and increased modularity.
The document discusses alternatives for running Ruby on Google App Engine that provide better performance than JRuby. It introduces Mirah, a Ruby-like language that compiles to Java bytecode, and Dubious, a web framework written in Mirah. Dubious aims to provide high performance, lightweight functionality similar to Rails. Examples show how to write a basic contacts management application in Dubious that compiles to Java for the App Engine environment.
This document provides an introduction to setting up and testing Rails 3 engines. It discusses how engines were revamped in Rails 3 based on influences from Merb, and explains that engines inherit from Railties. It also demonstrates how to configure an engine's paths, bundle an engine as a gem, and share assets between an engine and host application. Finally, it summarizes best practices for testing engines and provides contact information for discussions on engines.
The author has been using Rails since 2005 but has recently found it feels like a Java framework and is sluggish with a large memory footprint. They have been learning Monk and Ohm, which are modular Ruby frameworks that rely on tools like Rack, Sinatra, and Redis for speed. Monk is a glue framework for web development and Ohm stores objects in Redis. The author compares Rails components to equivalent Monk/Ohm libraries and suggests Monk as an alternative to Rails for new projects.
Symfony2 and MongoDB - MidwestPHP 2013 Pablo Godel
In this talk we will see how to use MongoDB in Symfony2 projects to speed up the development of web applications. We will give an introduction of MongoDB as a NoSQL database server and look at the options on how to work with it from Symfony2 and PHP applications.
The document provides an introduction and tutorial on Ruby on Rails. It discusses what Rails is, its philosophy of Don't Repeat Yourself (DRY), Convention over Configuration, MVC architecture, RESTful routes, and ActiveRecord. It then walks through creating a simple blog application in 5 minutes. The tutorial demonstrates how to generate models and migrations, perform CRUD actions using ActiveRecord, add validations and callbacks to models, and set up model associations. It provides tasks to scaffold a book library application with Books and Categories models along with a many-to-one relationship between them.
The document discusses changes to the file structure and configuration in Rails 3. Some key points:
- Rails 3 applications are now pure Rack applications defined in the config.ru file.
- The application object encapsulates configuration, routes, middleware, and initializers. It is defined in config/application.rb.
- Bundler is used to manage gem dependencies defined in the Gemfile. It ensures consistent dependencies across environments.
- Helper methods no longer output JavaScript, instead adding data attributes to tags to allow unobtrusive JavaScript behavior.
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011Nick Sieger
This document summarizes a presentation on using JRuby and Ruby on Rails for web application development. It discusses how JRuby allows Ruby code to drive Java, embed Ruby in Java applications, and compile Ruby to Java bytecode. Rails is presented as a dynamic web framework that uses conventions over configuration and opinionated defaults. The document provides examples of common Rails features like scaffolding, models, controllers and views. It also outlines how to deploy Rails applications as WAR files or to cloud platforms using JRuby.
This document provides an overview of the key changes and improvements in Rails 3 compared to Rails 2. It discusses updates to generators, models, migrations, routes, controllers, views, databases, and adopting unobtrusive JavaScript. New features like ActiveRelation and Turbolinks are also covered.
The document summarizes changes in Rails 3 including:
1. Bundler is introduced for managing gem dependencies through a Gemfile.
2. The ActiveRecord query interface is updated with method chaining and relations to unify finders, named scopes, and with_scope.
3. The ActiveRecord validation API is updated to use hashes instead of separate validator methods for validation options.
4. Views are updated with automatic XSS escaping, unobtrusive JavaScript, and consistent <%= %> usage for output.
5. Internationalization is updated with %{} instead of {{ }} for translations.
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
1. The document discusses integrating front-end frameworks like Angular, Ember, and React with Rails by constructing JSON APIs, preloading data to avoid loading screens, and server-side rendering for SEO and performance.
2. It provides code examples for building a TODO application with each framework, including using ngResource and factories in Angular, Ember conventions like Ember Data, and building isolated React components.
3. Server-side rendering is highlighted as the future for isomorphic JavaScript, providing benefits like prerendering on initial page load.
The document discusses the key changes and improvements in Rails 3 compared to previous versions. Some of the main points covered include: Rails 3 applications are now Rack-based which makes them modular and more flexible; the command line interface was improved with shortcuts; Bundler is now used to manage gem dependencies and resolve conflicts; and the overall architecture was refined.
Elasticsearch – mye mer enn søk! [JavaZone 2013]foundsearch
Søkemotorer kan løse langt fler utfordringer enn en søkeboks gir. Du har kanskje et søkeproblem uten å være klar over det?
Elasticsearch, en open source søkemotor bygd på Lucene, får stadig mer oppmerksomhet - ikke bare fordi den er glimrende til å løse typiske søkeproblemer, men også fordi den kan brukes til analyse- og "big data"-utfordringer.
Foredraget gir en oversikt over hva søkemotorer er gode på, relaterte problemer du kommer over, hvordan Elasticsearch kan bidra – samt hvordan den passer inn i teknologistacken din.
Det er ingen tutorial, men med et relativt høyt tempo og eksempler med realistisk kompleksitet gis en oversikt over hva som er mulig.
Vi runder av med hvordan Elasticsearch kan klassifiseres i mylderet av "NoSQL"-databaser.
Dandelion Hashtable: beyond billion requests per second on a commodity serverAntonios Katsarakis
This slide deck presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/how-axelera-ai-uses-digital-compute-in-memory-to-deliver-fast-and-energy-efficient-computer-vision-a-presentation-from-axelera-ai/
Bram Verhoef, Head of Machine Learning at Axelera AI, presents the “How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-efficient Computer Vision” tutorial at the May 2024 Embedded Vision Summit.
As artificial intelligence inference transitions from cloud environments to edge locations, computer vision applications achieve heightened responsiveness, reliability and privacy. This migration, however, introduces the challenge of operating within the stringent confines of resource constraints typical at the edge, including small form factors, low energy budgets and diminished memory and computational capacities. Axelera AI addresses these challenges through an innovative approach of performing digital computations within memory itself. This technique facilitates the realization of high-performance, energy-efficient and cost-effective computer vision capabilities at the thin and thick edge, extending the frontier of what is achievable with current technologies.
In this presentation, Verhoef unveils his company’s pioneering chip technology and demonstrates its capacity to deliver exceptional frames-per-second performance across a range of standard computer vision networks typical of applications in security, surveillance and the industrial sector. This shows that advanced computer vision can be accessible and efficient, even at the very edge of our technological ecosystem.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
O que há de novo no Rails 3 - Ruby on Rails no Mundo Real - 23may2010Plataformatec
The document discusses the architecture and advantages of Rails 3. It describes how Rails 3 applications are organized as Rack applications and are more modular than previous versions. Key advantages mentioned include improved performance, being more framework-agnostic, and increased modularity.
The document discusses alternatives for running Ruby on Google App Engine that provide better performance than JRuby. It introduces Mirah, a Ruby-like language that compiles to Java bytecode, and Dubious, a web framework written in Mirah. Dubious aims to provide high performance, lightweight functionality similar to Rails. Examples show how to write a basic contacts management application in Dubious that compiles to Java for the App Engine environment.
This document provides an introduction to setting up and testing Rails 3 engines. It discusses how engines were revamped in Rails 3 based on influences from Merb, and explains that engines inherit from Railties. It also demonstrates how to configure an engine's paths, bundle an engine as a gem, and share assets between an engine and host application. Finally, it summarizes best practices for testing engines and provides contact information for discussions on engines.
The author has been using Rails since 2005 but has recently found it feels like a Java framework and is sluggish with a large memory footprint. They have been learning Monk and Ohm, which are modular Ruby frameworks that rely on tools like Rack, Sinatra, and Redis for speed. Monk is a glue framework for web development and Ohm stores objects in Redis. The author compares Rails components to equivalent Monk/Ohm libraries and suggests Monk as an alternative to Rails for new projects.
Symfony2 and MongoDB - MidwestPHP 2013 Pablo Godel
In this talk we will see how to use MongoDB in Symfony2 projects to speed up the development of web applications. We will give an introduction of MongoDB as a NoSQL database server and look at the options on how to work with it from Symfony2 and PHP applications.
The document provides an introduction and tutorial on Ruby on Rails. It discusses what Rails is, its philosophy of Don't Repeat Yourself (DRY), Convention over Configuration, MVC architecture, RESTful routes, and ActiveRecord. It then walks through creating a simple blog application in 5 minutes. The tutorial demonstrates how to generate models and migrations, perform CRUD actions using ActiveRecord, add validations and callbacks to models, and set up model associations. It provides tasks to scaffold a book library application with Books and Categories models along with a many-to-one relationship between them.
The document discusses changes to the file structure and configuration in Rails 3. Some key points:
- Rails 3 applications are now pure Rack applications defined in the config.ru file.
- The application object encapsulates configuration, routes, middleware, and initializers. It is defined in config/application.rb.
- Bundler is used to manage gem dependencies defined in the Gemfile. It ensures consistent dependencies across environments.
- Helper methods no longer output JavaScript, instead adding data attributes to tags to allow unobtrusive JavaScript behavior.
JRuby + Rails = Awesome Java Web Framework at Jfokus 2011Nick Sieger
This document summarizes a presentation on using JRuby and Ruby on Rails for web application development. It discusses how JRuby allows Ruby code to drive Java, embed Ruby in Java applications, and compile Ruby to Java bytecode. Rails is presented as a dynamic web framework that uses conventions over configuration and opinionated defaults. The document provides examples of common Rails features like scaffolding, models, controllers and views. It also outlines how to deploy Rails applications as WAR files or to cloud platforms using JRuby.
This document provides an overview of the key changes and improvements in Rails 3 compared to Rails 2. It discusses updates to generators, models, migrations, routes, controllers, views, databases, and adopting unobtrusive JavaScript. New features like ActiveRelation and Turbolinks are also covered.
The document summarizes changes in Rails 3 including:
1. Bundler is introduced for managing gem dependencies through a Gemfile.
2. The ActiveRecord query interface is updated with method chaining and relations to unify finders, named scopes, and with_scope.
3. The ActiveRecord validation API is updated to use hashes instead of separate validator methods for validation options.
4. Views are updated with automatic XSS escaping, unobtrusive JavaScript, and consistent <%= %> usage for output.
5. Internationalization is updated with %{} instead of {{ }} for translations.
Crossing the Bridge: Connecting Rails and your Front-end FrameworkDaniel Spector
1. The document discusses integrating front-end frameworks like Angular, Ember, and React with Rails by constructing JSON APIs, preloading data to avoid loading screens, and server-side rendering for SEO and performance.
2. It provides code examples for building a TODO application with each framework, including using ngResource and factories in Angular, Ember conventions like Ember Data, and building isolated React components.
3. Server-side rendering is highlighted as the future for isomorphic JavaScript, providing benefits like prerendering on initial page load.
The document discusses the key changes and improvements in Rails 3 compared to previous versions. Some of the main points covered include: Rails 3 applications are now Rack-based which makes them modular and more flexible; the command line interface was improved with shortcuts; Bundler is now used to manage gem dependencies and resolve conflicts; and the overall architecture was refined.
Elasticsearch – mye mer enn søk! [JavaZone 2013]foundsearch
Søkemotorer kan løse langt fler utfordringer enn en søkeboks gir. Du har kanskje et søkeproblem uten å være klar over det?
Elasticsearch, en open source søkemotor bygd på Lucene, får stadig mer oppmerksomhet - ikke bare fordi den er glimrende til å løse typiske søkeproblemer, men også fordi den kan brukes til analyse- og "big data"-utfordringer.
Foredraget gir en oversikt over hva søkemotorer er gode på, relaterte problemer du kommer over, hvordan Elasticsearch kan bidra – samt hvordan den passer inn i teknologistacken din.
Det er ingen tutorial, men med et relativt høyt tempo og eksempler med realistisk kompleksitet gis en oversikt over hva som er mulig.
Vi runder av med hvordan Elasticsearch kan klassifiseres i mylderet av "NoSQL"-databaser.
Dandelion Hashtable: beyond billion requests per second on a commodity serverAntonios Katsarakis
This slide deck presents DLHT, a concurrent in-memory hashtable. Despite efforts to optimize hashtables, that go as far as sacrificing core functionality, state-of-the-art designs still incur multiple memory accesses per request and block request processing in three cases. First, most hashtables block while waiting for data to be retrieved from memory. Second, open-addressing designs, which represent the current state-of-the-art, either cannot free index slots on deletes or must block all requests to do so. Third, index resizes block every request until all objects are copied to the new index. Defying folklore wisdom, DLHT forgoes open-addressing and adopts a fully-featured and memory-aware closed-addressing design based on bounded cache-line-chaining. This design offers lock-free index operations and deletes that free slots instantly, (2) completes most requests with a single memory access, (3) utilizes software prefetching to hide memory latencies, and (4) employs a novel non-blocking and parallel resizing. In a commodity server and a memory-resident workload, DLHT surpasses 1.6B requests per second and provides 3.5x (12x) the throughput of the state-of-the-art closed-addressing (open-addressing) resizable hashtable on Gets (Deletes).
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/how-axelera-ai-uses-digital-compute-in-memory-to-deliver-fast-and-energy-efficient-computer-vision-a-presentation-from-axelera-ai/
Bram Verhoef, Head of Machine Learning at Axelera AI, presents the “How Axelera AI Uses Digital Compute-in-memory to Deliver Fast and Energy-efficient Computer Vision” tutorial at the May 2024 Embedded Vision Summit.
As artificial intelligence inference transitions from cloud environments to edge locations, computer vision applications achieve heightened responsiveness, reliability and privacy. This migration, however, introduces the challenge of operating within the stringent confines of resource constraints typical at the edge, including small form factors, low energy budgets and diminished memory and computational capacities. Axelera AI addresses these challenges through an innovative approach of performing digital computations within memory itself. This technique facilitates the realization of high-performance, energy-efficient and cost-effective computer vision capabilities at the thin and thick edge, extending the frontier of what is achievable with current technologies.
In this presentation, Verhoef unveils his company’s pioneering chip technology and demonstrates its capacity to deliver exceptional frames-per-second performance across a range of standard computer vision networks typical of applications in security, surveillance and the industrial sector. This shows that advanced computer vision can be accessible and efficient, even at the very edge of our technological ecosystem.
In the realm of cybersecurity, offensive security practices act as a critical shield. By simulating real-world attacks in a controlled environment, these techniques expose vulnerabilities before malicious actors can exploit them. This proactive approach allows manufacturers to identify and fix weaknesses, significantly enhancing system security.
This presentation delves into the development of a system designed to mimic Galileo's Open Service signal using software-defined radio (SDR) technology. We'll begin with a foundational overview of both Global Navigation Satellite Systems (GNSS) and the intricacies of digital signal processing.
The presentation culminates in a live demonstration. We'll showcase the manipulation of Galileo's Open Service pilot signal, simulating an attack on various software and hardware systems. This practical demonstration serves to highlight the potential consequences of unaddressed vulnerabilities, emphasizing the importance of offensive security practices in safeguarding critical infrastructure.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
Conversational agents, or chatbots, are increasingly used to access all sorts of services using natural language. While open-domain chatbots - like ChatGPT - can converse on any topic, task-oriented chatbots - the focus of this paper - are designed for specific tasks, like booking a flight, obtaining customer support, or setting an appointment. Like any other software, task-oriented chatbots need to be properly tested, usually by defining and executing test scenarios (i.e., sequences of user-chatbot interactions). However, there is currently a lack of methods to quantify the completeness and strength of such test scenarios, which can lead to low-quality tests, and hence to buggy chatbots.
To fill this gap, we propose adapting mutation testing (MuT) for task-oriented chatbots. To this end, we introduce a set of mutation operators that emulate faults in chatbot designs, an architecture that enables MuT on chatbots built using heterogeneous technologies, and a practical realisation as an Eclipse plugin. Moreover, we evaluate the applicability, effectiveness and efficiency of our approach on open-source chatbots, with promising results.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/temporal-event-neural-networks-a-more-efficient-alternative-to-the-transformer-a-presentation-from-brainchip/
Chris Jones, Director of Product Management at BrainChip , presents the “Temporal Event Neural Networks: A More Efficient Alternative to the Transformer” tutorial at the May 2024 Embedded Vision Summit.
The expansion of AI services necessitates enhanced computational capabilities on edge devices. Temporal Event Neural Networks (TENNs), developed by BrainChip, represent a novel and highly efficient state-space network. TENNs demonstrate exceptional proficiency in handling multi-dimensional streaming data, facilitating advancements in object detection, action recognition, speech enhancement and language model/sequence generation. Through the utilization of polynomial-based continuous convolutions, TENNs streamline models, expedite training processes and significantly diminish memory requirements, achieving notable reductions of up to 50x in parameters and 5,000x in energy consumption compared to prevailing methodologies like transformers.
Integration with BrainChip’s Akida neuromorphic hardware IP further enhances TENNs’ capabilities, enabling the realization of highly capable, portable and passively cooled edge devices. This presentation delves into the technical innovations underlying TENNs, presents real-world benchmarks, and elucidates how this cutting-edge approach is positioned to revolutionize edge AI across diverse applications.
Introduction of Cybersecurity with OSS at Code Europe 2024Hiroshi SHIBATA
I develop the Ruby programming language, RubyGems, and Bundler, which are package managers for Ruby. Today, I will introduce how to enhance the security of your application using open-source software (OSS) examples from Ruby and RubyGems.
The first topic is CVE (Common Vulnerabilities and Exposures). I have published CVEs many times. But what exactly is a CVE? I'll provide a basic understanding of CVEs and explain how to detect and handle vulnerabilities in OSS.
Next, let's discuss package managers. Package managers play a critical role in the OSS ecosystem. I'll explain how to manage library dependencies in your application.
I'll share insights into how the Ruby and RubyGems core team works to keep our ecosystem safe. By the end of this talk, you'll have a better understanding of how to safeguard your code.
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyScyllaDB
Freshworks creates AI-boosted business software that helps employees work more efficiently and effectively. Managing data across multiple RDBMS and NoSQL databases was already a challenge at their current scale. To prepare for 10X growth, they knew it was time to rethink their database strategy. Learn how they architected a solution that would simplify scaling while keeping costs under control.
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...Alex Pruden
Folding is a recent technique for building efficient recursive SNARKs. Several elegant folding protocols have been proposed, such as Nova, Supernova, Hypernova, Protostar, and others. However, all of them rely on an additively homomorphic commitment scheme based on discrete log, and are therefore not post-quantum secure. In this work we present LatticeFold, the first lattice-based folding protocol based on the Module SIS problem. This folding protocol naturally leads to an efficient recursive lattice-based SNARK and an efficient PCD scheme. LatticeFold supports folding low-degree relations, such as R1CS, as well as high-degree relations, such as CCS. The key challenge is to construct a secure folding protocol that works with the Ajtai commitment scheme. The difficulty, is ensuring that extracted witnesses are low norm through many rounds of folding. We present a novel technique using the sumcheck protocol to ensure that extracted witnesses are always low norm no matter how many rounds of folding are used. Our evaluation of the final proof system suggests that it is as performant as Hypernova, while providing post-quantum security.
Paper Link: https://eprint.iacr.org/2024/257
Fueling AI with Great Data with Airbyte WebinarZilliz
This talk will focus on how to collect data from a variety of sources, leveraging this data for RAG and other GenAI use cases, and finally charting your course to productionalization.
Skybuffer SAM4U tool for SAP license adoptionTatiana Kojar
Manage and optimize your license adoption and consumption with SAM4U, an SAP free customer software asset management tool.
SAM4U, an SAP complimentary software asset management tool for customers, delivers a detailed and well-structured overview of license inventory and usage with a user-friendly interface. We offer a hosted, cost-effective, and performance-optimized SAM4U setup in the Skybuffer Cloud environment. You retain ownership of the system and data, while we manage the ABAP 7.58 infrastructure, ensuring fixed Total Cost of Ownership (TCO) and exceptional services through the SAP Fiori interface.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Leveraging the Graph for Clinical Trials and Standards
Rails 3 Internals
1. Rails 3 Internals
Conhecendo detalhes do framework que fazem a diferença.
Anderson Leite
@anderson_leite
www.andersonleite.com.br
Tuesday, September 14, 2010
28. Rails 3 Internals
ActiveRelation
# Rails 3
@models = Model.where(:value => true).order(params[:order]).all
Nova API (where, limit, having)
Tuesday, September 14, 2010
29. Rails 3 Internals
ActiveRelation
# Rails 3
@models = Model.where(:value => true).order(params[:order]).all
where
having
select
group
Nova API (where, limit, having) order
limit
offset
joins
includes
lock
readonly
from
Tuesday, September 14, 2010
30. Rails 3 Internals
ActiveRelation
# Rails 3
@models = Model.where(:value => true).order(params[:order]).all
where
having
select
group
Nova API (where, limit, having) order
limit
Relation offset
joins
Encadeamento includes
lock
readonly
from
Tuesday, September 14, 2010
49. Rails 3 Internals
ActiveRelation
Nova API (where, limit, having)
Relation
Encadeamento
Tuesday, September 14, 2010
50. Rails 3 Internals
ActiveRelation
querys dinâmicas
class Post < ActiveRecord::Base
belongs_to :usuario
end
Tuesday, September 14, 2010
51. Rails 3 Internals
ActiveRelation
querys dinâmicas
class Post < ActiveRecord::Base
belongs_to :usuario
texto end
Tuesday, September 14, 2010
52. Rails 3 Internals
ActiveRelation
querys dinâmicas
class Post < ActiveRecord::Base
belongs_to :usuario
texto end
> 1 ano
Tuesday, September 14, 2010
53. Rails 3 Internals
ActiveRelation
querys dinâmicas
class Post < ActiveRecord::Base
belongs_to :usuario
texto end
> 1 ano
true
Tuesday, September 14, 2010
55. Rails 3 Internals
class PostTest < ActiveSupport::TestCase
setup do
create_posts
end
test "filtro em branco devolve todos os posts" do
assert_equal Post.all, Post.filtered_relation({}).all
end
def create_posts
valid_attributes = {
:body => "Hello.",
:title => "Hi!",
:content => "text",
:user_id => 1,
:published_at => Time.now
}
@base = Post.create(valid_attributes)
@quote = Post.create(valid_attributes.merge(:content => "quote"))
@number2 = Post.create(valid_attributes.merge(:user_id => 2))
@old = Post.create(valid_attribtues.merge(:published_at => 1.year.ago))
end
end
Tuesday, September 14, 2010
56. Rails 3 Internals
class PostTest < ActiveSupport::TestCase
setup do
create_posts
end
test "filtro em branco devolve todos os posts" do
assert_equal Post.all, Post.filtered_relation({}).all
end
def create_posts
valid_attributes = {
:body => "Hello.",
:title => "Hi!",
:content => "text",
:user_id => 1,
:published_at => Time.now
}
@base = Post.create(valid_attributes)
@quote = Post.create(valid_attributes.merge(:content => "quote"))
@number2 = Post.create(valid_attributes.merge(:user_id => 2))
@old = Post.create(valid_attribtues.merge(:published_at => 1.year.ago))
end
end
Tuesday, September 14, 2010
57. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base
belongs_to :user
end
Tuesday, September 14, 2010
58. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
end
end
Tuesday, September 14, 2010
59. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
60. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
61. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base def self.filter_by_content(value, relation)
belongs_to :user relation.where(:content => value)
end
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
62. Rails 3 Internals
ActiveRelation
test "apenas posts com conteudo especifico" do
assert_equal @quote, Post.filtered_relation(:content => "quote").first
end
class Post < ActiveRecord::Base def self.filter_by_content(value, relation)
belongs_to :user relation.where(:content => value)
end
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
63. Rails 3 Internals
ActiveRelation
test "apenas posts com conteudo especifico" do
assert_equal @quote, Post.filtered_relation(:content => "quote").first
end
class Post < ActiveRecord::Base def self.filter_by_content(value, relation)
belongs_to :user relation.where(:content => value)
end
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
64. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
65. Rails 3 Internals
ActiveRelation
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
66. Rails 3 Internals
ActiveRelation
def self.filter_by_published_at(value, relation)
value ? relation.where("published_at < ?", 1.month.ago) : relation
end
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
67. Rails 3 Internals
ActiveRelation
test "given a date filter, only gives us the filtered records" do
assert_equal @old, Post.filtered_relation(:published_at => true).first
end
def self.filter_by_published_at(value, relation)
value ? relation.where("published_at < ?", 1.month.ago) : relation
end
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
68. Rails 3 Internals
ActiveRelation
test "given a date filter, only gives us the filtered records" do
assert_equal @old, Post.filtered_relation(:published_at => true).first
end
def self.filter_by_published_at(value, relation)
value ? relation.where("published_at < ?", 1.month.ago) : relation
end
class Post < ActiveRecord::Base
belongs_to :user
def self.filtered_relation(params)
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
69. Rails 3 Internals
ActiveRelation
test "given a comments count filter, only gives us the filtered records" do
assert_equal @base, Post.filtered_relation(:comments => true).first
end
def self.filter_by_comments(value, relation)
if value
relation.preload(:comments).
select("posts.*, COUNT(comments.id) AS
comment_count").
class Post < ActiveRecord::Base from("posts,
comments").having("comment_count > 0")
belongs_to :user else
relation
def self.filtered_relation(params) end
end
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
70. Rails 3 Internals
ActiveRelation
test "given a comments count filter, only gives us the filtered records" do
assert_equal @base, Post.filtered_relation(:comments => true).first
end
def self.filter_by_comments(value, relation)
if value
relation.preload(:comments).
select("posts.*, COUNT(comments.id) AS
comment_count").
class Post < ActiveRecord::Base from("posts,
comments").having("comment_count > 0")
belongs_to :user else
relation
def self.filtered_relation(params) end
end
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
71. Rails 3 Internals
ActiveRelation
test "given a comments count filter, only gives us the filtered records" do
assert_equal @base, Post.filtered_relation(:comments => true).first
end
def self.filter_by_comments(value, relation)
if value
relation.preload(:comments).
select("posts.*, COUNT(comments.id) AS
comment_count").
class Post < ActiveRecord::Base from("posts,
comments").having("comment_count > 0")
belongs_to :user else
relation
def self.filtered_relation(params) end
end
relation = scoped
params.each do |facet, value|
relation = send("filter_by_#{facet}", value, relation)
end
relation
end
end
Tuesday, September 14, 2010
72. Rails 3 Internals
ActiveRelation
test "given a content and comment filter, gives us filtered records" do
@base.update_attribute(:content, "picture")
assert_equal @base, Post.filtered_relation(:content => "picture", :comments => true).first
end
Tuesday, September 14, 2010
73. Rails 3 Internals
ActiveRelation
test "given a content and comment filter, gives us filtered records" do
@base.update_attribute(:content, "picture")
assert_equal @base, Post.filtered_relation(:content => "picture", :comments => true).first
end
test "given a date and comment filter, gives us filtered records" do
@base.update_attribute(:published_at, 2.years.ago)
assert_equal @base, Post.filtered_relation(:published_at => true, :comments => true).first
end
Tuesday, September 14, 2010
74. Rails 3 Internals
ActiveRelation
test "given a content and comment filter, gives us filtered records" do
@base.update_attribute(:content, "picture")
assert_equal @base, Post.filtered_relation(:content => "picture", :comments => true).first
end
test "given a date and comment filter, gives us filtered records" do
@base.update_attribute(:published_at, 2.years.ago)
assert_equal @base, Post.filtered_relation(:published_at => true, :comments => true).first
end
Tuesday, September 14, 2010
75. Rails 3 Internals
ActiveRelation
test "given a content and comment filter, gives us filtered records" do
@base.update_attribute(:content, "picture")
assert_equal @base, Post.filtered_relation(:content => "picture", :comments => true).first
end
test "given a date and comment filter, gives us filtered records" do
@base.update_attribute(:published_at, 2.years.ago)
assert_equal @base, Post.filtered_relation(:published_at => true, :comments => true).first
end
test "given a date and content filter, gives us filtered records" do
@base.update_attribute(:published_at, 2.years.ago)
@base.update_attribute(:content, "picture")
record = Post.filtered_relation(:published_at => true, :content => "picture").first
assert_equal @base, record
end
Tuesday, September 14, 2010
76. Rails 3 Internals
ActiveRelation
test "given a content and comment filter, gives us filtered records" do
@base.update_attribute(:content, "picture")
assert_equal @base, Post.filtered_relation(:content => "picture", :comments => true).first
end
test "given a date and comment filter, gives us filtered records" do
@base.update_attribute(:published_at, 2.years.ago)
assert_equal @base, Post.filtered_relation(:published_at => true, :comments => true).first
end
test "given a date and content filter, gives us filtered records" do
@base.update_attribute(:published_at, 2.years.ago)
@base.update_attribute(:content, "picture")
record = Post.filtered_relation(:published_at => true, :content => "picture").first
assert_equal @base, record
end
Tuesday, September 14, 2010
77. Rails 3 Internals
ActiveRelation
posts = Post.filtered_relation(:comments => true)
.where(:user_id => 4).limit(3).order("id ASC")
posts.each do |post|
# Do something here...
end
Tuesday, September 14, 2010
80. Rails 3 Internals
ActiveModel
class Message
extend ActiveModel::Callbacks
define_model_callbacks :deliver
def deliver
_run_deliver_callbacks do
puts "DELIVER!"
end
end
end
Tuesday, September 14, 2010
81. Rails 3 Internals
ActiveModel
class Message
include ActiveModel::Validations
validates_presence_of :body, :user_id
attr_accessor :body, :user_id, :posted_at
end
m = Message.new(nil, 13)
m.valid? # => false
m.body = "Hello there!"
m.valid? # => true
Tuesday, September 14, 2010
82. Rails 3 Internals
ActiveModel
class Message
include ActiveModel::Validations
Attributes
validates_presence_of :body, :user_id
attr_accessor :body, :user_id, :posted_at Callbacks
Errors
end
Observing
m = Message.new(nil, 13) Serialization
m.valid? # => false Translation
m.body = "Hello there!"
m.valid? # => true Validations
Tuesday, September 14, 2010
83. Rails 3 Internals
ActiveModel
class ProperCategoryValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
unless record.user.category_ids.include?(value)
record.errors.add attribute, 'has bad category.'
end
end
end
Tuesday, September 14, 2010
84. Rails 3 Internals
ActiveModel
class ProperCategoryValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
unless record.user.category_ids.include?(value)
record.errors.add attribute, 'has bad category.'
end
end
end
validate :category_id, :proper_category => true
Tuesday, September 14, 2010
85. Rails 3 Internals
ActiveModel
class ProperCategoryValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
unless record.user.category_ids.include?(value)
record.errors.add attribute, 'has bad category.'
end
end
end
validate :category_id, :proper_category => true
Tuesday, September 14, 2010
86. Rails 3 Internals
ActiveModel
class ProperCategoryValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
unless record.user.category_ids.include?(value)
record.errors.add attribute, 'has bad category.'
end
end
end
validate :category_id, :proper_category => true
Tuesday, September 14, 2010
87. Rails 3 Internals
ActiveModel
class ReallyComplexValidator < ActiveModel::Validator
def validate(record)
record.errors[:base] << "Validacao A" unless valid_a (record)
record.errors[:base] << "Validacao B" unless valid_b (record)
record.errors[:base] << "Validacao C" unless valid_c (record)
end
private
def valid_a (record)
# ...
end
def valid_b (record)
# ...
end
def valid_c (record)
# ...
end
end
Tuesday, September 14, 2010
88. Rails 3 Internals
ActiveModel
class ReallyComplexValidator < ActiveModel::Validator
def validate(record)
record.errors[:base] << "Validacao A" unless valid_a (record)
record.errors[:base] << "Validacao B" unless valid_b (record)
record.errors[:base] << "Validacao C" unless valid_c (record)
end
private
def valid_a (record)
# ...
end
def valid_b (record)
# ...
end
def valid_c (record)
# ...
end
end
Tuesday, September 14, 2010
89. Rails 3 Internals
ActiveModel
class ReallyComplexValidator < ActiveModel::Validator
def validate(record)
record.errors[:base] << "Validacao A" unless valid_a (record)
record.errors[:base] << "Validacao B" unless valid_b (record)
record.errors[:base] << "Validacao C" unless valid_c (record)
end
private
def valid_a (record)
class NewsPost < ActiveRecord::Base
# ...
end validates_with ReallyComplexValidator
end
def valid_b (record)
# ...
end
def valid_c (record)
# ...
end
end
Tuesday, September 14, 2010
90. Rails 3 Internals
ActiveModel
template rendering, controller logic, e database query results
<% cache do %>
<% @posts.each do |post| %>
<%= render :partial => 'post', :object => post %>
<% end %>
<% end %>
Tuesday, September 14, 2010
91. Rails 3 Internals
ActiveRecord::Relation
vs
ARel
Tuesday, September 14, 2010
94. Rails 3 Internals
Rails 3
config.ru
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run MinhaApp::Application
Tuesday, September 14, 2010
110. Obrigado!
Rails 3 Internals
Conhecendo detalhes do framework que fazem a diferença.
Anderson Leite
@anderson_leite
www.andersonleite.com.br
Tuesday, September 14, 2010