This document provides an introduction to Javascript and jQuery. It covers Javascript data types including numbers, strings, Booleans, null/undefined, and arrays. It then covers jQuery topics like jQuery objects, selectors, CSS manipulation, events including ready and load, and AJAX/JSON requests using both asynchronous and synchronous modes. It includes examples for working with numbers, strings, selectors, events, AJAX calls and shortcuts. The document aims to provide a pragmatic introduction to Javascript and jQuery concepts and functionality.
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
The goal of this talk is to educate developers on common security vulnerabilities, how they are exploited, and how to protect against them. We'll explore several of the OWASP Top 10 attack vectors like SQL injection, XSS, CSRF, session hijacking, and insecure direct object references. Each topic will be approached from the perspective of an attacker to see how these vulnerabilities are detected and exploited using several realistic examples. Once we've established an understanding of how these attacks work, we'll look at concrete steps you can take to secure web applications against such vulnerabilities. The knowledge gained from this talk can also be used for participating in "Capture the Flag" security competitions.
Your code sucks, let's fix it - DPC UnConRafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
All projects start with a lot of enthusiasm. As many projects grow the technical debt gets bigger and the enthusiasm gets less. Almost any developer can develop a great project, but the key is maintaining an ever evolving application with minimal technical debt without loosing enthusiasm.
During this talk you will be taken on the journey of application design. The starting point is an application that looks fine but contains lots of potential pitfalls. We will address the problems and solve them with beautiful design. We end up with testable, nicely separated software with a clear intention.
We, as developers, often think that we don’t have to or don’t need to know what are what they call design patterns. We think that we already know how to build a software and don’t need all this theory. Years after years, by having to deal with the low maintainability of my own codebases, I explored a lot of ways of decoupling applications, in order to have enterprise-grade software that last for years. With concrete examples, I want to share with you some design patterns and how they can help you to grow well structured and decoupled applications.
Hacking Your Way To Better Security - Dutch PHP Conference 2016Colin O'Dell
The goal of this talk is to educate developers on common security vulnerabilities, how they are exploited, and how to protect against them. We'll explore several of the OWASP Top 10 attack vectors like SQL injection, XSS, CSRF, session hijacking, and insecure direct object references. Each topic will be approached from the perspective of an attacker to see how these vulnerabilities are detected and exploited using several realistic examples. Once we've established an understanding of how these attacks work, we'll look at concrete steps you can take to secure web applications against such vulnerabilities. The knowledge gained from this talk can also be used for participating in "Capture the Flag" security competitions.
Your code sucks, let's fix it - DPC UnConRafael Dohms
How do you measure the quality of your code? Performance and testing are just one aspect of code, in order to meet deadlines and make maintenance quicker you also need your code to be readable, decoupled and generally easier to comprehend and work with. This talk will go over tips and exercises to help you identify trouble areas, refactor them and train you to write better code in future projects. Come make your code look and function better.
All projects start with a lot of enthusiasm. As many projects grow the technical debt gets bigger and the enthusiasm gets less. Almost any developer can develop a great project, but the key is maintaining an ever evolving application with minimal technical debt without loosing enthusiasm.
During this talk you will be taken on the journey of application design. The starting point is an application that looks fine but contains lots of potential pitfalls. We will address the problems and solve them with beautiful design. We end up with testable, nicely separated software with a clear intention.
We, as developers, often think that we don’t have to or don’t need to know what are what they call design patterns. We think that we already know how to build a software and don’t need all this theory. Years after years, by having to deal with the low maintainability of my own codebases, I explored a lot of ways of decoupling applications, in order to have enterprise-grade software that last for years. With concrete examples, I want to share with you some design patterns and how they can help you to grow well structured and decoupled applications.
Presentation made at GTA meetup in 2012-02-07.
Object Calisthenics is a set of exercise rules to reach better code, maintainable, testable and readable.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Introduction to CQRS and Event SourcingSamuel ROZE
Event Sourcing is the idea that every state of your application can be represented by a sequence of events. Using these two principles as the heart of a system or an application is quite common but can be challenging if we don’t use the right tools or architecture.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Un gioco in cui vincono tutti o due piccioni con una fava ;)
Lavorare rivolti alla creazione di valore per il cliente e da questo ottenere una libreria quasi pronta per essere pubblicata
Your code sucks, let's fix it - PHP Master Series 2012Rafael Dohms
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
A way to identify trusted developer strings (aka "literals", which have been defined within the PHP script) which need to be used for HTML templates, SQL strings, CLI strings; and keep those completely separate from user controlled (attacker tainted) strings.
Dig Deeper into WordPress - WD Meetup CairoMohamed Mosaad
Dig deeper into WordPress is a presentation made for Web Designers Meetup in Cairo taken place on 17th Dec 2012.
Signup at WPMonkeys.com to get notified when awesome new WordPress related content is published.
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
atrium_username is a Drupal feature for managing user name display:
* a lightweight alternative to realname module;
* "works" before theme layer
* uses the node title of the user profile
jQuery is the new favorite of web developers. This lightweight JavaScript library makes developers love writing JavaScript code again! What needed 20 lines of code first is now reduced to 3 lines. Who wouldn’t be enthusiastic?! Microsoft showed its love for the library by fully integrating it in Visual Studio. I dare to ask: Should you stay behind? In this session, we’ll take a look at jQuery and we’ll teach you what you need to know to get on your way. More specifically, we’ll look at selectors, attributes, working with WCF, jQuery UI and much more. You may walk out of this session wearing a sticker: “I love jQuery”!
Presentation made at GTA meetup in 2012-02-07.
Object Calisthenics is a set of exercise rules to reach better code, maintainable, testable and readable.
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Introduction to CQRS and Event SourcingSamuel ROZE
Event Sourcing is the idea that every state of your application can be represented by a sequence of events. Using these two principles as the heart of a system or an application is quite common but can be challenging if we don’t use the right tools or architecture.
https://speakerdeck.com/willroth/50-laravel-tricks-in-50-minutes - origin
Laravel 5.1 raised the bar for framework documentation, but there's much, much more lurking beneath the surface. In this 50-minute session, we'll explore 50 (yes, 50!) high-leverage implementation tips & tricks that you just won't find in the docs: the IoC Container, Blade, Eloquent, Middleware, Routing, Commands, Queues, Events, Caching — we'll cover them all! Join us as we drink from the fire hose & learn to take advantage of everything that Laravel has to offer to build better software faster!
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
Un gioco in cui vincono tutti o due piccioni con una fava ;)
Lavorare rivolti alla creazione di valore per il cliente e da questo ottenere una libreria quasi pronta per essere pubblicata
Your code sucks, let's fix it - PHP Master Series 2012Rafael Dohms
Performance and testing are just one aspect of code, to really be successful your code needs to be readable, maintainable and generally easier to comprehend and work with. This talk draws from my own experience in applying the techniques of object calisthenics and code readability, within an existing team. It will help you identify trouble areas, learn how to refactor them and train you to write better code in future projects avoiding common pitfalls.
A way to identify trusted developer strings (aka "literals", which have been defined within the PHP script) which need to be used for HTML templates, SQL strings, CLI strings; and keep those completely separate from user controlled (attacker tainted) strings.
Dig Deeper into WordPress - WD Meetup CairoMohamed Mosaad
Dig deeper into WordPress is a presentation made for Web Designers Meetup in Cairo taken place on 17th Dec 2012.
Signup at WPMonkeys.com to get notified when awesome new WordPress related content is published.
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
atrium_username is a Drupal feature for managing user name display:
* a lightweight alternative to realname module;
* "works" before theme layer
* uses the node title of the user profile
jQuery is the new favorite of web developers. This lightweight JavaScript library makes developers love writing JavaScript code again! What needed 20 lines of code first is now reduced to 3 lines. Who wouldn’t be enthusiastic?! Microsoft showed its love for the library by fully integrating it in Visual Studio. I dare to ask: Should you stay behind? In this session, we’ll take a look at jQuery and we’ll teach you what you need to know to get on your way. More specifically, we’ll look at selectors, attributes, working with WCF, jQuery UI and much more. You may walk out of this session wearing a sticker: “I love jQuery”!
Presentation by Arin Sime, David Alfaro, and Mariana Lopez at the HTML5DevConf May 2014 in San Francisco. Overview of WebRTC and then what we learned in our first 6 months of using it to build a webinar tool.
Danny Bluestone from Cyber-Duck held workshops educating pupils and young students in Hackney, London during the summer of 2013 on how to design for websites and apps.
Project management at a UX focused digital agencyCyber-Duck
Most digital agencies face numerous pressures to execute high quality fast. This keynote focused on how organisations can use lean, agile, ISO9001 and UCD methods to deliver multiple innovative projects with few resources.
Presentación que comenta los riesgos para la privacidad en el uso inadecuado o riesgoso de las redes sociales. El marco legal argentino y referencias a trabajos internacionales como el de OEA, Verizon y actualidad de ciberataques.
Cyber-Duck, a digital agency in London and Hertfordshire welcomed StartupBus in its office to present some principles behind user experience before their European tour
Teaching Your Machine To Find FraudstersIan Barber
The slides from my talk at PHP Tek 11.
When dealing with money online, fraud is an ongoing problem for both
consumers and sellers. Researchers have been developing statistical
and machine learning techniques to detect shady sellers on auction
sites, spot fraudulent payments on e-commerce systems and catch click
fraud on adverts. While there is no silver bullet, you will learn to
flag suspicious activity and help protect your site from scammers
using PHP and a little help from some other technologies.
n 2010, I told everyone how to start unit testing Zend Framework applications. In 2011, let’s take this a step further by testing services, work flows and performance. Looking to raise the bar on quality? Let this talk be the push you need to improve your Zend Framework projects.
Roles are an excellent object-oriented tool both for allomorphism and for
reuse.
Roles facilitate allomorphism by favoring "does this object do X" versus "is
this object a subclass of X". You often care more about capability than
inheritance. In a sense, roles encode types better than inheritance.
Roles also provide an excellent faculty for reuse. This effectively eliminates
multiple inheritance, which is often the only solution for sharing code between
unrelated classes.
Roles can combine with conflict detection. This eliminates accidental shadowing
of methods that is painful with multiple inheritance and mixins.
Parameterized roles (via MooseX::Role::Parameterized) improve the reusability
of roles by letting each consumer cater the role to its needs. This does
sacrifice some allomorphism, but there are ways to restore it.
TDC 2014 - JavaScript de qualidade: hoje, amanhã e sempre!Guilherme Carreiro
O JavaScript não escapa da polêmica sobre qualidade de código. Descubra nessa palestra como identificar bad smells que ameaçam a integridade do front-end e aprenda a melhorar seu código usando design patterns e orientação a objetos avançada em JavaScript. Veja através de exemplos práticos as evoluções da API da linguagem com o ECMAScript 6 e como é possível começar a adotar práticas do futuro.
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
3. Data types : Number
NO integers, just doubles
(doubleprecision
64bit
format IEEE 754 values)
Not called doubles, called number.
4. Data types : Number
typeof(37);
=> 'number'
typeof(3.14);
=> 'number'
typeof(Infinity);
=> 'number'
5. Data types : Number
typeof(37);
=> 'number'
typeof(3.14);
=> 'number'
typeof(Infinity);
=> 'number'
Maths disagrees with
Javascript :
[...]
In mathematics, "infinity" is
often incorrectly treated as
if it were a number.
In this context infinity is
not itself a quantity but
rather a direction or open
possibility
[…]
http://en.wikipedia.org/wiki/Infinity
7. Data types : Number
0.1 + 0.2 == 0.3;
=> false
0.1 + 0.2;
=> 0.30000000000000004
8. Data types : Number
0.1 + 0.2 == 0.3;
=> false
0.1 + 0.2;
=> 0.30000000000000004
You may 'fix' that issue like this :
(0.1 + 0.2).toFixed(2) == 0.3;
=> true
9. Data types : Number
parseInt(3.99);
=> 3
parseInt('123', 10);
=> 123
parseInt('11', 2);
=> 3
Math.floor(3.99);
=> 3
Math.floor(3.01);
=> 3
Math.ceil(3.99);
=> 4
Math.ceil(3.01);
=> 4
Base to use
10. Data types : Number
NaN (Not a Number)
ParseInt('hello', 10);
=> NaN
11. Data types : Number
NaN (Not a Number)
ParseInt('hello', 10);
=> NaN
NaN + 5;
=> NaN
isNaN(NaN);
=> true
12. Data types : Number
NaN (Not a Number)
ParseInt('hello', 10);
=> NaN
NaN + 5;
=> NaN
isNaN(NaN);
=> true
typeof(NaN);
?
13. Data types : Number
NaN (Not a Number)
ParseInt('hello', 10);
=> NaN
NaN + 5;
=> NaN
isNaN(NaN);
=> true
typeof(NaN);
?
typeof (NaN);
=> 'number'
14. Data types : Number
NaN (Not a Number)
ParseInt('hello', 10)
=> NaN
NaN + 5
NaN
NaN => == NaN
isNaN(=> false
NaN)
=> true
typeof (NaN)
?
typeof (NaN)
=> 'number'
15. Data types : String
They're sequences of Unicode
characters with each character
represented by a 16bit
number.
19. Data types : Boolean
false, 0, the empty string (""),
NaN, null, and undefined all become
false.
All other values become
true.
20. Data types : null & undefined
undefined : declared but not
initializated, not an actual value.
null : is a value.
21. Data types : null & undefined
undefined : declared but not
initializated.
null : is a value.
Be aware of :
( undefined == null ) => true
( null == undefined ) => true
22. Data types : Arrays
List of items.
var a = new Array();
var a = ['dog', 'cat', 'hen'];
typeof a[90];
=> undefined
a.push('fish');
a.length;
=> 4
23. Data types : Arrays
List of items.
.length isn't necessarily the number of items in
the array.
var a = ['dog', 'cat', 'hen'];
a[100] = 'fox';
a.length;
=> 101
Remember — the length of the array is one more than
the highest index.
25. jQuery objects
$.fn namespace
Methods called on jQuery
selections are in the
$.fn namespace
typeof $('h1');
=> 'object'
$ namespace
Methods in the $
namespace are generally
utilitytype
methods,
and do not work with
selections.
$.each([ 52, 97 ], function( index, value ) {
alert( index + ": " + value );
});
http://learn.jquery.com/usingjquerycore/
dollarobjectvsfunction/
26. jQuery selectors
Class Selector $('.class') http://api.jquery.com/classselector/
<div class="myClass">Hello</div>
<p class="myClass">World</p>
<script>
$( '.myClass' ).each( function() {
$( this ).text( 'Selected' );
});
</script>
ID Selector $('#id') http://api.jquery.com/idselector/
<div id="myId">Hello</div>
<script>
$( '#myId' ).each( function() {
$( this ).text( 'Selected' );
});
</script>
$( this ) is the
jQuery object that
manipulates current
DOM item, in this
example will be :
<div class="myClass">
at first iteration and
<p class="myClass">
at second iteration.
30. jQuery Events
$( document ).ready()
The ready event occurs after the HTML document has been loaded.
<script>
$( document ).ready( function() {
console.log( 'HTML is ready!' );
});
</script>
$( window ).load()
The load event will run once the entire page (images or iframes),
not just the DOM, is ready.
<script>
$( window ).load( function() {
console.log( 'All assets and HTML are ready!' );
});
</script>
http://learn.jquery.com/usingjquerycore/
documentready/
http://stackoverflow.com/questions/3698200/windowonloadvsdocumentready
31. jQuery Events
Main points for $( document ).ready():
http://stackoverflow.com/a/18339794
● It will not wait for the images to get loaded.
● Used to execute JavaScript when the DOM is
completely loaded.
● Put event handlers here.
● Can be used multiple times.
● Replace $ with jQuery when you receive “$ is not
defined.”
● Not used if you want to manipulate images Use $
(window).load() instead.
32. jQuery Events : Trigger & On
Fire a custom event using $.fn → trigger() method.
<script>
$( 'div' ).on( 'mouseover', function() {
if( $(this).hasClass('isWinner') ){
$(this).trigger('userHasWon');
}
});
</script>
Capture a custom event using $.fn → on() method.
<script>
$( 'div' ).on( 'userHasWon', function( event ) {
event.preventDefault();
sendNotificationToServer();
updateTopNavBarWithReward();
});
</script>
http://api.jquery.com/trigger/
33. JQuery : AJAX/AJAJ
http://api.jquery.com/jquery.ajax/
Asynchronous JavaScript And XML
Asynchronous JavaScript And JSON
jQuery allows you to perform synchronous requests.
synchronous JavaScript And XML
synchronous JavaScript And JSON
34. JQuery : AJAX/AJAJ
What is AJAX?
Web server
Get/Post request
XML/JSON response
Javascript code asks for some data
and updates some DOM elements, page is
not fully reloaded just partially
updated.
35. JQuery : AJAX/AJAJ
Asynchronous mode
Method calls results can not be collected
on natural code sequence order, they may
arrive later (asynchronously).
So you have to be prepared to process
Ajax calls results anytime.
36. JQuery : AJAX/AJAJ
Asynchronous mode
<form action='http://www.mySite.com/action.php' method='POST'></form>
$( 'form' ).on( 'submit', function( event ) {
// Do not perform form action until Ajax response is received.
event.preventDefault();
var shopName = $('form input[name="shopName"]').val();
checkShopName( shopName );
// Do not perform form action until Ajax response is received.
return false;
});
function checkShopName( name )
{
showSpinner();
performShopNameCheck( name );
}
37. JQuery : AJAX/AJAJ
Asynchronous mode
function performShopNameCheck( shopName )
{
$.ajax({
url : $('form').attr('action'),
type: $('form').attr('method'),
data: { shop: shopName, domain:'openshopen.com' },
success: function( response )
{
var valid = isResponseValid( response );
if( valid ){
// As code sequence was broken before, we may use events
// to process results.
$('form').trigger('redirectToSuccessPage');
}
else{
$('form').trigger('reloadPageWithErrors', response.errors );
}
},
error: function( jqXHR , textStatus , errorThrown ){
$('form').trigger('redirectToErrorPage');
}
});
}
38. JQuery : AJAX/AJAJ
Synchronous mode
All code runs in sequence, methods will
return values and block sequence until
they finish their job.
39. JQuery : AJAX/AJAJ
Synchronous mode
$( 'form' ).on( 'submit', function( event ) {
event.preventDefault();
var shopName = $('form input[name="shopName"]').val();
if( checkShopName( shopName ) ){
redirectToSuccessPage();
}
else{
reloadPageWithErrors();
}
});
function checkShopName( name )
{
showSpinner();
return performShopNameCheck( name );
}
Sequence will end up waiting for
an AJAX call, some browsers while
they are synchronously waiting, do
not show DOM changes, so spinner
may not be shown to users.