JavaScript supports built-in objects like String, Date, and Math that extend the language's functionality. String methods allow manipulating and extracting characters from strings. Date objects represent dates and times using methods like new Date(). The Math object provides mathematical constants and functions for tasks like generating random numbers and rounding values.
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM),CBSE Class 12 computer project,Class XII computer project, A project work on Hotel management system in C++,Class 12 C++ Projects, Projects in C++ for Class XII CBSE, C++ Class XII project
Computer Investgatort Project (HOTEL MANAGEMENT SYSTEM),CBSE Class 12 computer project,Class XII computer project, A project work on Hotel management system in C++,Class 12 C++ Projects, Projects in C++ for Class XII CBSE, C++ Class XII project
Introduces important facts and tools to help you get starting with performance improvement.
Learn to monitor and analyze important metrics, then you can start digging and improving.
Includes useful munin probes, predefined SQL queries to investigate your database's performance, and a top 5 of the most common performance problems in custom Apps.
By Olivier Dony - Lead Developer & Community Manager, OpenERP
When working with enterprise applications, you want to have the same user experience that you know from for instance office applications and browsers. People know how to use the features that can be found in browsers such as bookmarking, favorites, and working with tabs. The search mechanism provided by Google, that uses suggestions based on the text typed by the user, is so common that people expect this in every application. And there are more of these UI patterns. In this session, you will learn how to implement some of the common UI patterns in your ADF application.
The secret unit testing tools no one ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework - in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about - some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster. In this session I'll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
Serverless is the most clickbaity title for an actually interesting thing. Despite the name, Serverless does not mean you’re not using a server, rather, the promise of Serverless is to no longer have to babysit a server. Scaling is done for you, you’re billed only for what you use. In this session, we’ll cover some key use cases for these functions within a Vue.js application: we’ll accept payments with stripe, we’ll gather geolocation data from Google Maps, and more! We’ll make it all work with Vue and Nuxt seamlessly, simplifying how to leverage this paradigm to be a workhorse for your application.
Workshop JavaScript Testing. Frameworks. Client vs Server Testing. Jasmine. Chai. Nock. Sinon. Spec Runners: Karma. TDD. Code coverage. Building a testable JS app.
Presentado por ing: Raúl Delgado y Mario García
A technical presentation focusing on how to bring data from other systems into a Magnolia CMS and present it.
Most current version at http://blitl.us/zBW5
Introduces important facts and tools to help you get starting with performance improvement.
Learn to monitor and analyze important metrics, then you can start digging and improving.
Includes useful munin probes, predefined SQL queries to investigate your database's performance, and a top 5 of the most common performance problems in custom Apps.
By Olivier Dony - Lead Developer & Community Manager, OpenERP
When working with enterprise applications, you want to have the same user experience that you know from for instance office applications and browsers. People know how to use the features that can be found in browsers such as bookmarking, favorites, and working with tabs. The search mechanism provided by Google, that uses suggestions based on the text typed by the user, is so common that people expect this in every application. And there are more of these UI patterns. In this session, you will learn how to implement some of the common UI patterns in your ADF application.
The secret unit testing tools no one ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework - in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about - some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster. In this session I'll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
Serverless is the most clickbaity title for an actually interesting thing. Despite the name, Serverless does not mean you’re not using a server, rather, the promise of Serverless is to no longer have to babysit a server. Scaling is done for you, you’re billed only for what you use. In this session, we’ll cover some key use cases for these functions within a Vue.js application: we’ll accept payments with stripe, we’ll gather geolocation data from Google Maps, and more! We’ll make it all work with Vue and Nuxt seamlessly, simplifying how to leverage this paradigm to be a workhorse for your application.
Workshop JavaScript Testing. Frameworks. Client vs Server Testing. Jasmine. Chai. Nock. Sinon. Spec Runners: Karma. TDD. Code coverage. Building a testable JS app.
Presentado por ing: Raúl Delgado y Mario García
A technical presentation focusing on how to bring data from other systems into a Magnolia CMS and present it.
Most current version at http://blitl.us/zBW5
Sample JavaScript Code Laurence Svekis
JavaScript Closure
A closure in JavaScript is a function that has access to the variables in its parent scope, even after the parent function has completed execution. This allows for data to be “closed over” or remembered by the inner function, even after the outer function has returned.
Here, the makeCounter function returns an inner function that has access to the count variable declared in its parent scope, and can “remember” the current count value even after the makeCounter function has completed execution. Each time the inner function is called, it returns the current value of count and increments it by 1.
JavaScript Closure Advanced
In this example, the makeAdder function takes in a single argument x and returns an inner function that takes in a second argument y. The inner function has access to the x variable declared in the parent scope and uses it to add x and y together and return the result.
We can see here that the outer function makeAdder has been executed twice and it returns two different inner functions which are assigned to different variables add5 and add10 and these inner functions are able to remember their respective parent scope values of x.
Polymer - pleasant client-side programming with web componentspsstoev
Polymer is a new library for the web, built on top of Web Components. This new project from Google makes client-side programming with web components easy and pleasant. You can use these technologies to increase the expressiveness of HTML by creating new tags that can help you get straight to your task. Polymer also adds other instruments like two-way data-binding and a lot of shortcuts that make your code more declarative and easier to extend and maintain. Many people think that web components are the future of web programming, and Polymer allows you to harness that power right now. Already excited!?
bbyopen/App_Code/.DS_Store
bbyopen/App_Code/VBCode/GoogleMapsAPIHelpers.vb
Imports Microsoft.VisualBasic
Imports System.Xml.Linq
Public Class GoogleMapsAPIHelpers
Public Shared Function GetGeocodingSearchResults(ByVal address As String) As XElement
'Use the Google Geocoding service to get information about the user-entered address
'See http://code.google.com/apis/maps/documentation/geocoding/index.html for more info...
Dim url = String.Format("http://maps.google.com/maps/api/geocode/xml?address={0}&sensor=false", HttpContext.Current.Server.UrlEncode(address))
'Load the XML into an XElement object (whee, LINQ to XML!)
Dim results = XElement.Load(url)
'Check the status
Dim status = results.Element("status").Value
If status <> "OK" AndAlso status <> "ZERO_RESULTS" Then
'Whoops, something else was wrong with the request...
Throw New ApplicationException("There was an error with Google's Geocoding Service: " & status)
End If
Return results
End Function
End Class
bbyopen/App_Data/StoreLocations.mdf
bbyopen/App_Data/StoreLocations_log.LDF
bbyopen/Bin/Microsoft.Web.GeneratedImage.dll
bbyopen/Default.aspx
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<asp:Content runat="server" ID="myHeadContent" ContentPlaceHolderID="head">
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
</script>
<script type="text/javascript">
function init_map(map_canvas_id, lat, lng, zoomLevel) {
var myLatLng = new google.maps.LatLng(lat, lng);
var options = {
zoom: zoomLevel,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.HYBRID
};
var map_canvas = document.getElementById(map_canvas_id);
var map = new google.maps.Map(map_canvas, options);
var marker=new google.maps.Marker({
position:myLatLng,
});
marker.setMap(map);
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h2>Welcome!</h2>
<p>
This demo shows how to use the <a href="http://code.google.com/apis/maps/">Google Maps API</a> to build a simple store locator
web application.
</p>
<p>
This demo site is powered by the <code>StoreLocations.mdf</code> database in the <code>App_Data</code> folder, which contains a single
table, <code>Stores</code>. This table has one record for each store, specifying the StoreId, address, city, , zip code, phone, hours,
and latitude and longitude coordinates. From the <a href="FindAStore.aspx">Find a Store ...
HTML5 is a language for structuring and presenting content for the World Wide Web. it is the fifth revision of the HTML standard (created in 1990 and standardized as HTML4 as of 1997) and as of February 2012 is still under development. Its core aims have been to improve the language with support for the latest multimedia while keeping it easily readable by humans and consistently understood by computers and devices (web browsers, parsers, etc.). It improves interoperability and reduces development costs by making precise rules on how to handle all HTML elements, and how to recover from errors
K모바일에서 발표한 단일 페이지 인터페이스 웹/앱 개발. 웹의 역사와 개발 패러다임의 변화를 되돌아보고, 웹앱을 위한 아키텍쳐로 단일 페이지 인터페이스(Single Page Interface)를 제시하고, jQueryMobile과 SenchaTouch를 이용해 동일한 웹앱을 SPI 방식으로 만들어본다.
Instructions for Submissions thorugh G- Classroom.pptxJheel Barad
This presentation provides a briefing on how to upload submissions and documents in Google Classroom. It was prepared as part of an orientation for new Sainik School in-service teacher trainees. As a training officer, my goal is to ensure that you are comfortable and proficient with this essential tool for managing assignments and fostering student engagement.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
How to Create Map Views in the Odoo 17 ERPCeline George
The map views are useful for providing a geographical representation of data. They allow users to visualize and analyze the data in a more intuitive manner.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxEduSkills OECD
Andreas Schleicher presents at the OECD webinar ‘Digital devices in schools: detrimental distraction or secret to success?’ on 27 May 2024. The presentation was based on findings from PISA 2022 results and the webinar helped launch the PISA in Focus ‘Managing screen time: How to protect and equip students against distraction’ https://www.oecd-ilibrary.org/education/managing-screen-time_7c225af4-en and the OECD Education Policy Perspective ‘Students, digital devices and success’ can be found here - https://oe.cd/il/5yV
How to Make a Field invisible in Odoo 17Celine George
It is possible to hide or invisible some fields in odoo. Commonly using “invisible” attribute in the field definition to invisible the fields. This slide will show how to make a field invisible in odoo 17.
1. JavaScript Built-in objects
JavaScript supports a number of built-in objects that extend the flexibility of the language. These objects
are Date, Math, String, Array, and Object.
1. String Objects :
<html>
<body>
<p id="demo"></p>
<script>
var carName1 = "Volvo XC60";
var carName2 = 'Volvo XC60';
var answer1 = "It's alright";
var answer2 = "He is called 'Johnny'";
var answer3 = 'He is called "Johnny"';
document.getElementById("demo").innerHTML =
carName1 + "<br>" +
carName2 + "<br>" +
answer1 + "<br>" +
answer2 + "<br>" +
answer3;
</script></body></html>
2. String Length:
<html><body>
<p id="demo"></p>
<script>
var txt="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
document.getElementById("demo").innerHTML = txt.length;
</script></body></html>
3. Strings can be Objects
Normally, JavaScript strings are primitive values, created from literals: var firstName =
"John"
But strings can also be defined as objects with the keyword new: var firstName = new
String("John")
<html><body>
2. <p id="demo"></p>
<script>
var x = "John"; // x is a string
var y = new String("John"); // y is an object
document.getElementById("demo").innerHTML = typeof x + " " + typeof y;
</script>
</body></html>
JavaScript string methods
4. The slice() Method
Slice() extracts a part of a string and returns the extracted part in a new string.
The method takes 2 parameters: the starting index (position), and the ending index
(position).
This example slices out a portion of a string from position 7 to position 13:
<html><body>
<p>The slice() method extract a part of a string and returns the extracted parts in a new
string:</p>
<p id="demo"></p>
<script>
var str = "Apple, Banana, Kiwi";
document.getElementById("demo").innerHTML = str.slice(7,13);
</script></body></html>
If a parameter is negative, the position is counted from the end of the string.
5. This example slices out a portion of a string from position -12 to position -6:
<html><body>
<p>The slice() method extract a part of a string and returns the extracted parts in a new
string:</p>
<p id="demo"></p>
<script>
var str = "Apple, Banana, Kiwi";
document.getElementById("demo").innerHTML = str.slice(-12,-6);
</script></body></html>
3. 6.If you omit the second parameter, the method will slice out the rest of the sting:
<html><body>
<p>The slice() method extract a part of a string and returns the extracted parts in a new
string:</p>
<p id="demo"></p>
<script>
var str = "Apple, Banana, Kiwi";
document.getElementById("demo").innerHTML = str.slice(7);
</script>
</body></html>
7. or, counting from the end :
<html><body>
<p>The slice() method extract a part of a string and returns the extracted parts in a new
string:</p>
<p id="demo"></p>
<script>
var str = "Apple, Banana, Kiwi";
document.getElementById("demo").innerHTML = str.slice(-12);
</script></body></html>
8. The substring() Method
Substring () is similar to slice ().
The difference is that substring () cannot accept negative indexes.
<html><body>
<p>The substr() method extract a part of a string and returns the extracted parts in a
new string:</p>
<p id="demo"></p>
<script>
var str = "Apple, Banana, Kiwi";
document.getElementById("demo").innerHTML = str.substring(7,13);
</script></body></html>
4. 9. The substr() Method
substr() is similar to slice().
The difference is that the second parameter specifies the length of the extracted part.
<html><body>
<p>The substr() method extract a part of a string and returns the extracted parts in a
new string:</p>
<p id="demo"></p>
<script>
var str = "Apple, Banana, Kiwi";
document.getElementById("demo").innerHTML = str.substr(7,6);
</script></body></html>
If the first parameter is negative, the position counts from the end of the string.
The second parameter can not be negative, because it defines the length.
If you omit the second parameter, substr() will slice out the rest of the string.
10. Replacing String Content
The replace() method replaces a specified value with another value in a string:
<html><body>
<p>Replace "Microsoft" with "W3Schools" in the paragraph below:</p>
<button onclick="myFunction()">Try it</button>
<p id="demo">Please visit Microsoft!</p>
<script>
function myFunction() {
var str = document.getElementById("demo").innerHTML;
var txt = str.replace("Microsoft","W3Schools");
document.getElementById("demo").innerHTML = txt;
}
</script></body></html>
11. Converting to Upper and Lower Case
A string is converted to upper case with toUpperCase():
<html><body>
5. <p>Convert string to upper case:</p>
<button onclick="myFunction()">Try it</button>
<p id="demo">Hello World!</p>
<script>
function myFunction() {
var text = document.getElementById("demo").innerHTML;
document.getElementById("demo").innerHTML = text.toUpperCase();
}
</script></body></html>
A string is converted to lower case with toLowerCase():
12. The concat() Method
concat() joins two or more strings:
<html><body>
<p>The concat() method joins two or more strings:</p>
<p id="demo"></p>
<script>
var text1 = "Hello";
var text2 = "World!"
document.getElementById("demo").innerHTML = text1.concat(" ",text2);
</script></body></html>
The concat() method can be used instead of the plus operator. These two lines do the same:
var text = "Hello" + " " + "World!";
var text = "Hello".concat(" ","World!");
13. Extracting String Characters
· charAt(position)
The charAt() Method
The charAt() method returns the character at a specified index (position) in a string:
<html><body>
<p>The charAt() method returns the character at a given position in a string:</p>
<p id="demo"></p>
6. <script>
var str = "HELLO WORLD";
document.getElementById("demo").innerHTML = str.charAt(0);
</script></body></html>
Date Objects:
14. Displaying Dates
<html><body>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Date();
</script>
</body></html>
A date consists of a year, a month, a week, a day, a minute, a second, and a millisecond.
Date objects are created with the new Date() constructor.
There are 4 ways of initiating a date:
i. new Date()
ii. new Date(milliseconds)
iii. new Date(dateString)
iv. new Date(year, month, day, hours, minutes, seconds, milliseconds)
15. Using new Date (), without parameters, creates a new date object with the current date
and time:
<html><body>
<p id="demo"></p>
<script>
var d = new Date();
document.getElementById("demo").innerHTML = d;
</script></body></html>
16. Using new Date (), with a date string, creates a new date object with the specified date
and time:
<html><body>
7. <p id="demo"></p>
<script>
var d = new Date("October 13, 2014 11:13:00");
document.getElementById("demo").innerHTML = d;
</script></body></html>
17. Using new Date(), with 7 numbers, creates a new date object with the
specified date and time: The 7 numbers specify the year, month, day, hour, minute,
second, and millisecond, in that order:
<html><body>
<p id="demo"></p>
<script>
var d = new Date(99,5,24,11,33,30,0);
document.getElementById("demo").innerHTML = d;
</script></body></html>
18. Math Functions:
The Math object allows you to perform mathematical tasks.
One common use of the Math object is to create a random number:
<html><body>
<p>Math.random() returns a random number betwween 0 and 1.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.random();
}
</script></body></html>
19. Math.min() and Math.max()
Math.min() can be used to find the lowest value in a list of arguments.
<html><body>
<p>Math.min() returns the lowest value.</p>
<button onclick="myFunction()">Try it</button>
8. <p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML =
Math.min(0, 150, 30, 20, -8);
}
</script></body></html>
20. Math.max() can be used to find the highest value in a list of arguments.
<html>
<body>
<p>Math.max() returns the higest value.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML =
Math.max(0, 150, 30, 20, -8);
}
</script></body></html>
21. Math.round(): rounds a number to the nearest
integer
<html><body>
<p>Math.round() rounds a number to its nearest integer.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.round(4.4);
}
</script></body></html>
22. Math.floor(): rounds a number down to the nearest
integer:
<html><body>
<p>Math.floor() rounds a number <strong>down</strong> to its nearest integer.</p>
9. <button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.floor(4.7);
}
</script></body></html>
23. Math Constants
JavaScript provides 3 mathematical constants that can be accessed with the Math object:
<html>
<body>
<p>Math constants are E, PI, SQR2, SQR1_2, LN2, LN10, LOG2E, LOG10E</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML =
Math.E + "<br>" +
Math.PI + "<br>" +
Math.SQRT2 + "<br>" ;
}
</script></body></html>
10. <button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.floor(4.7);
}
</script></body></html>
23. Math Constants
JavaScript provides 3 mathematical constants that can be accessed with the Math object:
<html>
<body>
<p>Math constants are E, PI, SQR2, SQR1_2, LN2, LN10, LOG2E, LOG10E</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML =
Math.E + "<br>" +
Math.PI + "<br>" +
Math.SQRT2 + "<br>" ;
}
</script></body></html>