Are you over 18 and want to see adult content?
More Annotations
A complete backup of sports.ltn.com.tw/news/breakingnews/3061970
Are you over 18 and want to see adult content?
Favourite Annotations
Всё о холодильниках. Выбор, запчасти, ремонт, эксплуатация.
Are you over 18 and want to see adult content?
Universidad Nacional de Asunción - UNA - Paraguay
Are you over 18 and want to see adult content?
Portable Air Conditioner, Chiller & Heater Rental | Mobile Air
Are you over 18 and want to see adult content?
Journées européennes des métiers d'art - JEMA 2019
Are you over 18 and want to see adult content?
Оптовая база «Шарташская» - интернет-магазин
Are you over 18 and want to see adult content?
A complete backup of aquariumplants.com
Are you over 18 and want to see adult content?
Text
the slider.
TEXT TO SPEECH WITH JAVASCRIPT SpeechSynthesis object is a part of the Web Speech API, that performs text to speech service in the browser. This is exposed through the global window.speechSynthesis object. speak () : This method will add a speech to a queue called utterance queue. This speech will be spoken after all speeches in the queue before it have been spoken. MAINTAINING ASPECT RATIOS FOR HTML VIDEOS WITH CSS Creating a Box of a 16:9 Aspect-Ratio. 16:9 aspect ratio means height is 9/16 times the width, which comes as 0.5625 or 56.25%. Using this we create a parent container of 16:9 aspect ratio by setting padding-top: 56.25% and height: 0px. The child container which is a , takes the full height and width of the parent. HOW TO MAKE A DIV 100% OF THE WINDOW HEIGHT USING CSS To set it to full or 100% of the viewport height, the value becomes 100vh. /* height is set to 100% of the height of window */ #container { height: 100vh; } vh CSS unit is different from percent based units. When percent based values are used, height of the element is set relative to the height of its parent. GETTING DATE AND TIME IN NODE.JS In Node.js date and time are handled with the Javascript Date object. It is loaded by default and requires no import of modules. Getting Current Date and Time as YYYY-MM-DD hh:mm:ss. The current date and time can be fetched by first creating a new Date object. Thereafter methods of the object can be called to get the date and time values. PREVENT AUTOFILLING THE PASSWORD FIELD IN HTML FORMS Solution : Using autocomplete=new-password. To prevent such situations where we would not like the browser to autofill the password field in a form, the autocomplete attribute can be used in element. The autocomplete attribute should be set to the value new-password. GETTING DEVICE RAM INFORMATION WITH JAVASCRIPT let ram = navigator.deviceMemory. Returned value is in gigabytes. The exact memory size of is not returned. The RAM value is rounded to the nearest value of 2, and then divided by 1024. For example 512MB will be returned as 0.5 and 1000MB will be returned as 1. Upper and lower bounds are applied on the amount of RAM. GET INTEGER VALUE FROM A DECIMAL NUMBER IN JAVASCRIPT The Math.trunc() method can be used to truncate the fractional portion of a number. The number can also be rounded to the next integer using Math.round(), Math.ceil() and CHECKING FOR A MEDIA QUERY MATCH IN JAVASCRIPT In rare cases we may need to execute some Javascript code depending upon a specific media query. This can be done with the help of window.matchMedia object. WEB DEVELOPMENT TUTORIALS, HOW-TO'S AND LATEST NEWS Remove Property from a Javascript Object (2 Ways) This tutorial discusses two ways of removing a property from an object. The first way is using the delete operator, and the second way is object destr March 22, 2021. css. CREATE A CAROUSEL WITH CSS FLEX (WITH REPEATING ITEMS IN LOOP) CSS flex allows to lay elements in a single direction, either horizontally or vertically. Items in a slider / carousal are placed horizontally — going by this condition, CSS flex is a well suited candidate for creating a slider. Using flexbox to create a slider is not difficult, however the main issue is to repeat items while loopingthe slider.
TEXT TO SPEECH WITH JAVASCRIPT SpeechSynthesis object is a part of the Web Speech API, that performs text to speech service in the browser. This is exposed through the global window.speechSynthesis object. speak () : This method will add a speech to a queue called utterance queue. This speech will be spoken after all speeches in the queue before it have been spoken. MAINTAINING ASPECT RATIOS FOR HTML VIDEOS WITH CSS Creating a Box of a 16:9 Aspect-Ratio. 16:9 aspect ratio means height is 9/16 times the width, which comes as 0.5625 or 56.25%. Using this we create a parent container of 16:9 aspect ratio by setting padding-top: 56.25% and height: 0px. The child container which is a , takes the full height and width of the parent. HOW TO MAKE A DIV 100% OF THE WINDOW HEIGHT USING CSS To set it to full or 100% of the viewport height, the value becomes 100vh. /* height is set to 100% of the height of window */ #container { height: 100vh; } vh CSS unit is different from percent based units. When percent based values are used, height of the element is set relative to the height of its parent. GETTING DATE AND TIME IN NODE.JS In Node.js date and time are handled with the Javascript Date object. It is loaded by default and requires no import of modules. Getting Current Date and Time as YYYY-MM-DD hh:mm:ss. The current date and time can be fetched by first creating a new Date object. Thereafter methods of the object can be called to get the date and time values. PREVENT AUTOFILLING THE PASSWORD FIELD IN HTML FORMS Solution : Using autocomplete=new-password. To prevent such situations where we would not like the browser to autofill the password field in a form, the autocomplete attribute can be used in element. The autocomplete attribute should be set to the value new-password. GETTING DEVICE RAM INFORMATION WITH JAVASCRIPT let ram = navigator.deviceMemory. Returned value is in gigabytes. The exact memory size of is not returned. The RAM value is rounded to the nearest value of 2, and then divided by 1024. For example 512MB will be returned as 0.5 and 1000MB will be returned as 1. Upper and lower bounds are applied on the amount of RAM. GET INTEGER VALUE FROM A DECIMAL NUMBER IN JAVASCRIPT The Math.trunc() method can be used to truncate the fractional portion of a number. The number can also be rounded to the next integer using Math.round(), Math.ceil() and CHECKING FOR A MEDIA QUERY MATCH IN JAVASCRIPT In rare cases we may need to execute some Javascript code depending upon a specific media query. This can be done with the help of window.matchMedia object. HOW TO CHECK TYPE OF DATA IN JAVASCRIPT Javascript provides 2 operators to check the type of a given value : typeof: This checks whether the value is one of the primitive data types.It will return a string specifying the type — "undefined" / "string" / "number" / "boolean" / "object" etc.. instanceof: This checks the "kind" of an object.For example, Javascript arrays arebasically objects.
HOW TO READ A LOCAL FILE USING JAVASCRIPT (.TXT .JSON ETC) In this Tutorial. Quick Sample Code. Demo — Reading a Local Text File. How is File Reading Done ? Step 1 — Allow User to Choose the File. Step 2 — Read File Metadata (Name, Type & Size) using Properties of File Object. Step 3 — Read File Contents using FileReader Object. Other FAQs on Reading a File with Javascript. MANIPULATION OF HTML SELECT ELEMENT WITH JAVASCRIPT selectedOptions : It gives the list of option elements that are currently selected. selectedIndex : It is an integer that gives the index of first selected option. In case no option is selected, it gives -1. add () : This method adds a new option to the list of options. remove () : This method removes an option from the selectelement.
HOW TO SEARCH IN AN ARRAY OF OBJECTS WITH JAVASCRIPT Method 2 — Using Array.find () The Array.find () method takes a callback function as parameter and executes that function once for each element present in the array, until it finds one where the function returns a true value. If the element is found it returns the value of the element, otherwise undefined is returned. var __POSTS = [{ id: 1
CUSTOM RADIO BUTTONS WITH CSS APPEARANCE PROPERTY The look of radio buttons can be customized using the CSS appearance property. This property allows to suppress the native appearance of an element (which may vary with operating system), so that CSS can be used to restyle it. By setting appearance: none, we can remove all browser styling from the radio button. HOW TO CHANGE URL QUERY PARAMETERS WITH JAVASCRIPT Search query parameters can be added, updated or deleted using Javascript URL and URLSearchParams objects.. To know how to get query parameters using URL and URLSearchParams, refer the tutorial Get URL Parameters with Javascript.. Edit / Update a Parameter CSS STYLING OF FILE UPLOAD BUTTON WITH ::FILE-SELECTOR The upload button in is represented by ::file-selector-button CSS pseudo-element. This can be used to style the file input type. Chrome, Edge & Safari support the non-standard ::-webkit-file-upload-button which serves the same purpose. HOW TO MOVE AN ELEMENT IN A CIRCULAR PATH WITH CSS Step 1 : CSS of the Parent Element. The child is going to have absolute position, so the parent must have relative position (or absolute position). Give equal height and width, and make its border-radius as 50% so that it becomes circular in shape. Add the initial value of transform property. Also add transition property foranimating the
HOW TO CREATE A TRIANGLE USING CSS CLIP-PATH Specifying a Triangular Shape in clip-path. To create a triangle we need to use the CSS polygon () shape function. This function creates a polygon shape by joining the co-ordinates of the vertices that we pass as parameters. A triangle has 3 vertices, HOW TO CREATE AN EVENT WITH GOOGLE CALENDAR API USING PHP Creating an event using Google Calendar API consists of 5 steps: Register a Google Application and enable Calendar API. In your web application, request user for authorization of the Google Application. Get the user's timezone. Use the primary calendar of the user. Or else get the list of his calendars and let the user choose.Javascript Node.js
PHP CSS
UI / UX
Bots Cloud
Useful Resources
HOW TO CROP IMAGES IN NODE.JSDecember 21, 2018
To crop images in Node.js : * Install the Sharp Module * The installed module exposes the extract function. Use this to crop off a section of the imageINSTALLING SHARP
npm install sharp --save USING THE EXTRACT METHOD The extract method is used to crop images. This accepts 4 numberparameters :
* top : offset from the top edge of the image * left : offset from the left edge of the image * width : width of the extracted image * height : height of the extracted image const sharp = require('sharp');// original image
let originalImage = 'originalImage.jpg'; // file name for cropped image let outputImage = 'croppedImage.jpg'; sharp(originalImage).extract({ width: 1920, height: 1080, left: 60, top: 40 }).toFile(outputImage) .then(function(new_file_info) { console.log("Image cropped and saved");})
.catch(function(err) { console.log("An error occured");});
It is important to note that all parameters must be present or an error will be thrown. Resizing Images in Node.js UsefulAngle.com 2016 - 2019. All code MIT license.Contact Privacy
UsefulAngle on Twitter UsefulAngle on FacebookDetails
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0