java Packet Storm Exploit 2013-0813-1 - Oracle Java IntegerInterleavedRaster.verify() Signed Integer Overflow By packetstormsecurity.com Published On :: Wed, 14 Aug 2013 02:59:49 GMT The IntegerInterleavedRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a signed integer overflow that allows bypassing of "dataOffsets[0]" boundary checks. This exploit code demonstrates remote code execution by popping calc.exe. It was obtained through the Packet Storm Bug Bounty program. Full Article
java Packet Storm Advisory 2013-0813-1 - Oracle Java IntegerInterleavedRaster.verify() By packetstormsecurity.com Published On :: Wed, 14 Aug 2013 03:12:44 GMT The IntegerInterleavedRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a signed integer overflow that allows bypassing of "dataOffsets[0]" boundary checks. This vulnerability allows for remote code execution. User interaction is required for this exploit in that the target must visit a malicious page or open a malicious file. This finding was purchased through the Packet Storm Bug Bounty program. Full Article
java Java storeImageArray() Invalid Array Indexing By packetstormsecurity.com Published On :: Fri, 16 Aug 2013 23:52:40 GMT This Metasploit module abuses an Invalid Array Indexing Vulnerability on the static function storeImageArray() function in order to produce a memory corruption and finally escape the Java Sandbox. The vulnerability affects Java version 7u21 and earlier. The module, which doesn't bypass click2play, has been tested successfully on Java 7u21 on Windows and Linux systems. This was created based upon the Packet Storm Bug Bounty release for this issue. Full Article
java Packet Storm Exploit 2013-0819-1 - Oracle Java BytePackedRaster.verify() Signed Integer Overflow By packetstormsecurity.com Published On :: Mon, 19 Aug 2013 23:28:12 GMT The BytePackedRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a signed integer overflow that allows bypassing of "dataBitOffset" boundary checks. This exploit code demonstrates remote code execution by popping calc.exe. It was obtained through the Packet Storm Bug Bounty program. Full Article
java Packet Storm Advisory 2013-0819-1 - Oracle Java BytePackedRaster.verify() By packetstormsecurity.com Published On :: Mon, 19 Aug 2013 23:33:00 GMT The BytePackedRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a signed integer overflow that allows bypassing of "dataBitOffset" boundary checks. This vulnerability allows for remote code execution. User interaction is required for this exploit in that the target must visit a malicious page or open a malicious file. This finding was purchased through the Packet Storm Bug Bounty program. Full Article
java Packet Storm Exploit 2013-0827-1 - Oracle Java ByteComponentRaster.verify() Memory Corruption By packetstormsecurity.com Published On :: Tue, 27 Aug 2013 23:58:22 GMT The ByteComponentRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a memory corruption vulnerability that allows bypassing of "dataOffsets[]" boundary checks. This exploit code demonstrates remote code execution by popping calc.exe. It was obtained through the Packet Storm Bug Bounty program. Full Article
java Packet Storm Advisory 2013-0827-1 - Oracle Java ByteComponentRaster.verify() By packetstormsecurity.com Published On :: Tue, 27 Aug 2013 23:59:52 GMT The ByteComponentRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a memory corruption vulnerability that allows bypassing of "dataOffsets[]" boundary checks. This vulnerability allows for remote code execution. User interaction is required for this exploit in that the target must visit a malicious page or open a malicious file. This finding was purchased through the Packet Storm Bug Bounty program. Full Article
java Packet Storm Exploit 2013-0917-1 - Oracle Java ShortComponentRaster.verify() Memory Corruption By packetstormsecurity.com Published On :: Tue, 17 Sep 2013 04:45:32 GMT The ShortComponentRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a memory corruption vulnerability that allows bypassing of "dataOffsets[]" boundary checks when the "numDataElements" field is 0. This exploit code demonstrates remote code execution by popping calc.exe. It was obtained through the Packet Storm Bug Bounty program. Full Article
java Packet Storm Advisory 2013-0917-1 - Oracle Java ShortComponentRaster.verify() By packetstormsecurity.com Published On :: Tue, 17 Sep 2013 04:50:06 GMT The ShortComponentRaster.verify() method in Oracle Java versions prior to 7u25 is vulnerable to a memory corruption vulnerability that allows bypassing of "dataOffsets[]" boundary checks when the "numDataElements" field is 0. This vulnerability allows for remote code execution. User interaction is required for this exploit in that the target must visit a malicious page or open a malicious file. This finding was purchased through the Packet Storm Bug Bounty program. Full Article
java Furukawa Electric ConsciusMAP 2.8.1 Java Deserialization Remote Code Execution By packetstormsecurity.com Published On :: Fri, 24 Apr 2020 14:40:45 GMT Furukawa Electric ConsciusMAP version 2.8.1 java deserialization remote code execution exploit. Full Article
java Total.js CMS 12 Widget JavaScript Code Injection By packetstormsecurity.com Published On :: Mon, 21 Oct 2019 23:29:46 GMT This Metasploit module exploits a vulnerability in Total.js CMS. The issue is that a user with admin permission can embed a malicious JavaScript payload in a widget, which is evaluated server side, and gain remote code execution. Full Article
java JavaScript Skimmers Found Hidden in 'Favicon' Icons By www.careersinfosecurity.asia Published On :: Malwarebytes Researchers Say Attacks Appear Related to MagecartCybercriminals are hiding malicious JavaScript skimmers in the "favicon" icons of several ecommerce websites in an effort to steal payment card data from customers, researchers at Malwarebytes say. Full Article
java JavaScript Skimmers Found Hidden in 'Favicon' Icons By www.careersinfosecurity.in Published On :: Malwarebytes Researchers Say Attacks Appear Related to MagecartCybercriminals are hiding malicious JavaScript skimmers in the "favicon" icons of several ecommerce websites in an effort to steal payment card data from customers, researchers at Malwarebytes say. Full Article
java JavaScript Skimmers Found Hidden in 'Favicon' Icons By www.careersinfosecurity.co.uk Published On :: Malwarebytes Researchers Say Attacks Appear Related to MagecartCybercriminals are hiding malicious JavaScript skimmers in the "favicon" icons of several ecommerce websites in an effort to steal payment card data from customers, researchers at Malwarebytes say. Full Article
java JavaScript Skimmers Found Hidden in 'Favicon' Icons By www.careersinfosecurity.eu Published On :: Malwarebytes Researchers Say Attacks Appear Related to MagecartCybercriminals are hiding malicious JavaScript skimmers in the "favicon" icons of several ecommerce websites in an effort to steal payment card data from customers, researchers at Malwarebytes say. Full Article
java Will a Jolt of Java Get Your Creative Juices Flowing? By www.medicinenet.com Published On :: Mon, 9 Mar 2020 00:00:00 PDT Title: Will a Jolt of Java Get Your Creative Juices Flowing?Category: Health NewsCreated: 3/9/2020 12:00:00 AMLast Editorial Review: 3/9/2020 12:00:00 AM Full Article
java Our commitment for press freedom, and autonomy of public broadcast is absolute: Prakash Javadekar By economictimes.indiatimes.com Published On :: 2014-05-31T04:00:25+05:30 "Now there is a stage three and stage four of digitisation, we will take a call on this only after taking all things into account." Full Article
java HTML, CSS, and JavaScript code editing with Edge Code By www.adobe.com Published On :: Mon Sep 24 16:26:00 UTC 2012 Edge Code is an Adobe branded release of the Brackets project: a lightweight code editor with next-wave features. Full Article
java Ultra-Rare, Perhaps the Last Remaining, Javan Rhino Found Killed in Vietnam By www.treehugger.com Published On :: Mon, 10 May 2010 11:26:00 -0400 The total estimated population of the Javan rhinoceros in Vietnam was perhaps eight individuals just three years ago. Now WWF reports that there is one less of the beyond critically endangered rhinos in the Cat Tien Full Article Science
java Javadekar: Modi says COVID-19 battle has to be won in a month By www.mid-day.com Published On :: 27 Apr 2020 02:16:25 GMT Union Minister Prakash Javadekar on Sunday said that Prime Minister Narendra Modi, in his monthly 'Mann Ki Baat' address, has given a direction to the Indian citizens for fighting the battle against Coronavirus. "PM Modi in his 'Mann ki Baat' has said that the battle against Coronavirus has to be won within one month. He had said that by the time Eid comes we will defeat Coronavirus," Javadekar said. He further said, "Modi had also said that society has shown humanity by ensuring that no one goes hungry during the lockdown." "In today's address, the PM gave a proper direction that is necessary to fight the battle against Coronavirus," he added. Modi while addressing the nation during his monthly 'Mann Ki Baat' had said that India's fight against the Coronavirus is "people-driven" and is being fought by the masses and the administration together. He also informed that the government has come up with a digital platform to link volunteers of social organisations, representatives of civil society and local administration. Tamil Nadu under major lockdown The complete lockdown in the major urban centres of Tamil Nadu, including Chennai and Coimbatore, came into force on Sunday with groceries and vegetable shops also shutting down as civic bodies intensified disinfection work in their respective regions. While police patrol vehicles and flying squads of civic bodies alone could be seen in Chennai, Coimbatore, Madurai, Salem and Tirupur, people in some localities in north Chennai loitered around. Standalone shops open up in Delhi The Delhi government has allowed the standalone shops in the national capital based on the Union Home Ministry's order but the markets and complexes will remain shut, Chief Minister, Arvind Kejriwal said. He also said that no other relaxation will be given to the city till May 3 — lockdown deadline. "Last Sunday we decided to continue the lockdown without any relaxation. We are giving one relaxation today. The Centre on Friday announced to open some shops and we are implementing it." Shops sell PPE for as cheap as Rs 198 As they fight the deadly Coronavirus pandemic 24/7, frontline healthcare workers are facing a severe crunch of personal protection equipment (PPE) suits or hazmat suits. Suddenly, several retail shops have cropped up across the country, offering such specialised medical suits at cheap prices. Shops in Tirupur — also called the knitwear city of India — in Tamil Nadu are offering such suits for as low as R198 and R225, take minimum order for 50 suits with courier charges extra. Catch up on all the latest Crime, National, International and Hatke news here. Also download the new mid-day Android and iOS apps to get latest updates. Mid-Day is now on Telegram. Click here to join our channel (@middayinfomedialtd) and stay updated with the latest news This story has been sourced from a third party syndicated feed, agencies. Mid-day accepts no responsibility or liability for its dependability, trustworthiness, reliability and data of the text. Mid-day management/mid-day.com reserves the sole right to alter, delete or remove (without notice) the content in its absolute discretion for any reason whatsoever Full Article
java Javagal Srinath didn't get the credit he deserved By www.mid-day.com Published On :: 19 Apr 2020 06:26:41 GMT Javagal Srinath spearheaded India's pace attack in the 90s with aplomb but former South African seamer Shaun Pollock believes the Indian never got the credit he deserved. Srinath played 67 Tests and 229 ODIs between 1991 and 2003, taking 236 and 315 wickets respectively. "I thought India's Javagal Srinath didn't get the credit he deserved," Pollock said during a Sky Sports podcast discussion with former West Indies fast bowler Michael Holding and England's Stuart Broad. "In my era, you had great combinations like Wasim Akram and Waqar Younis for Pakistan and Curtly Ambrose and Courtney Walsh for West Indies. Australia had Glenn McGrath and Brett Lee. You now have James Anderson and Stuart Broad in this era." Pollock, who snapped over 400 Test wickets and amassed more than 3,700 Test runs in 108 Tests, said one bowler who left an indelible mark on him early in his career was West Indian pace great Malcom Marshall. "(Malcom) Marshall was next level and I was lucky enough to meet him early in my career as it made me think about fast bowling in a completely different way," he said. However, since his retirement in 2008, Pollock has been most impressed by his fellow countryman Dale Steyn, who had overtaken him as South Africa's leading wicket taker in Tests in December, 2018. "But since I've stopped playing, l cannot have enough respect for (Dale) Steyn. His ability to shape the ball upfront at high speed and then come back later and reverse it," he said. "He cranked it up on flat wickets and had such a good action and variations. He is something special and his stats back it up." Catch up on all the latest sports news and updates here. Also download the new mid-day Android and iOS apps to get latest updates. Mid-Day is now on Telegram. Click here to join our channel (@middayinfomedialtd) and stay updated with the latest news This story has been sourced from a third party syndicated feed, agencies. Mid-day accepts no responsibility or liability for its dependability, trustworthiness, reliability and data of the text. Mid-day management/mid-day.com reserves the sole right to alter, delete or remove (without notice) the content in its absolute discretion for any reason whatsoever Full Article
java Java Fullstack Developer - Thirdware, Chennai By jobs.monsterindia.com Published On :: 2020-05-09 11:39:01 Company: Thirdware Solutions LimitedExperience: 5 to 10location: ChennaiRef: 24828129Summary: Hiring Java Fullstack Developer for our Chennai assignment. Full Article
java Openings for AngularJS/NodeJS/Java/PHP Tech Lead/Core Dot Net for MNC Company- Andheri Seepz By jobs.monsterindia.com Published On :: 2020-05-09 11:22:25 Company: ConfidentialExperience: 4 to 8location: Mumbai, Mumbai City, Navi Mumbai, ThaneRef: 24828121Summary: Openings for AngularJS/NodeJS/Java/PHP Tech Lead/Core Dot Net for MNC Company- Andheri Seepz Experience: 1) Angular JS: 3 to 5 Years 2) Node JS: 3 to 5 Years 3) Java: 3 to 5 Years 4) PHP Tech.... Full Article
java Opportunity- Backend Java Developer-US MNC By jobs.monsterindia.com Published On :: 2020-05-09 08:14:51 Company: ConfidentialExperience: 2 to 6location: ChennaiRef: 24828013Summary: Job Purpose: Development of cutting-edge digital products in the automobile ecosystem. Job Duties & Responsibilities: Designing, developing, maintaining and implementing software databases and developing dynamic web applications using.... Full Article
java Java Developer By jobs.monsterindia.com Published On :: 2020-05-08 23:03:16 Company: FIS Global Business Solutions India Private LimitedExperience: 7 to 10location: India, ChennaiRef: 24827894Summary: Job Description : Position Type : Full time Type Of Hire : Experienced (relevant combo of work and education) Education Desired : Bachelor of Computer Science Travel Percentage : 0% Java.... Full Article
java Java Developer By jobs.monsterindia.com Published On :: 2020-05-08 23:03:16 Company: FIS Global Business Solutions India Private LimitedExperience: 6 to 9location: IndiaRef: 24827893Summary: Job Description : Position Type : Full time Type Of Hire : Experienced (relevant combo of work and education) Education Desired : Bachelor of Computer Science Travel Percentage : 0% * Are you curious,.... Full Article
java Senior Developer Java By jobs.monsterindia.com Published On :: 2020-05-08 23:03:16 Company: FIS Global Business Solutions India Private LimitedExperience: 0 to 50location: India, PuneRef: 24827892Summary: Job Description : Position Type : Full time Type Of Hire : Experienced (relevant combo of work and education) Education Desired : Bachelor of Computer Science Travel Percentage : 0% GENERAL DUTIES & .... Full Article
java Senior Java developer By jobs.monsterindia.com Published On :: 2020-05-08 23:03:15 Company: FIS Global Business Solutions India Private LimitedExperience: 4 to 6location: India, PuneRef: 24827887Summary: Job Description : Position Type : Full time Education Desired : Bachelor of Computer Engineering Job Description Are you curious, motivated, and forward-thinking? At FIS youu2019ll have the.... Full Article
java Coffeeland by Augustine Sedgewick — the Java script By www.ft.com Published On :: Fri, 27 Mar 2020 12:40:03 GMT A history of coffee and its role in global capitalism is fact-filled and entertaining if occasionally over-caffeinated Full Article
java Tyson Fury's choice to drop trainer Ben Davison in favour of Javan Steward questioned by David Haye By www.dailymail.co.uk Published On :: Sun, 16 Feb 2020 22:49:40 GMT Tyson Fury's decision to switch trainers shortly before his rematch with Deontay Wilder could cost him when the two heavyweights collide again this Saturday, David Haye believes. Full Article
java External Affairs Minister meets Mohammad Javad Zarif, Foreign Minister of Iran on the sidelines of CICA Summit 2019 in Dushanbe By meacms.mea.gov.in Published On :: Sat, 15 Jun 2019 00:00:00 GMT Full Article
java External Affairs Minister meets Javad Zarif, Foreign Minister of Iran on the sidelines of 74th session of UNGA in New York By meacms.mea.gov.in Published On :: Mon, 23 Sep 2019 00:00:00 GMT Full Article
java External Affairs Minister meets Mohammad Javad Zarif, Foreign Minister of Iran in Tehran By meacms.mea.gov.in Published On :: Mon, 23 Dec 2019 00:00:00 GMT Full Article
java Dr. Mohammad Javad Zarif, Minister of Foreign Affairs of Iran arrives in New Delhi [ph]Photo Courtesy: Chandan Kumar Shah [/ph] By meacms.mea.gov.in Published On :: Tue, 14 Jan 2020 00:00:00 GMT Full Article
java Prime Minister meets Dr. Mohammad Javad Zarif, Minister of Foreign Affairs of Iran during Raisina Dialogue 2020 [ph]Photo Courtesy: Lalit Kumar[/ph] By meacms.mea.gov.in Published On :: Wed, 15 Jan 2020 00:00:00 GMT Full Article
java External Affairs Minister meets Dr. Mohammad Javad Zarif, Minister of Foreign Affairs of Iran during Raisina Dialogue 2020 [ph]Photo Courtesy:Hemant Joshi [/ph] By meacms.mea.gov.in Published On :: Thu, 16 Jan 2020 00:00:00 GMT Full Article
java GST Bill will 'definitely' be passed: Javadekar By www.business-standard.com Published On :: Fri, 14 Aug 2015 13:13:00 +0530 A day after Parliament was adjourned sine die, the government today came down heavily on the Congress, blaming it for the near washout of the monsoon session and asserted that the GST Bill will "definitely" be passed. Full Article
java Samajavaragamana: First Single from Allu Arjun-Starrer Ala Vaikunthapurramuloo Out By www.news18.com Published On :: Sat, 28 Sep 2019 02:59:22 +0530 Titled Samajavaragamana, the first song the from the Allu Arjun-Pooja Hedge starrer was released in an unplugged version today. Full Article
java Auto industry barons discuss COVID-19 impact with Prakash Javadekar, suggest measures to revive sector By www.dnaindia.com Published On :: Thu, 30 Apr 2020 12:21:00 GMT Barons of the automobile industry on Thursday held a discussion with the Union Minister for heavy industries and public enterprises Prakash Javadekar to talk about the impact of the coronavirus crisis and suggested measures to revive the sector. Full Article Business Automobile
java 25 Useful Resources for Creating Tooltips With JavaScript or CSS By designshack.net Published On :: Fri, 23 Aug 2013 01:00:50 +0000 Tooltips are awesome, there’s simply no denying it. They provide a simple, predictable and straightforward way to provide your users with useful, context-sensitive information, and they look cool to boot. We all agree on how great tooltips are, but how we go about implementing them can differ dramatically. If you’re at square one, looking for […] Full Article JavaScript CSS tooltip
java Responsible JavaScript: Part I By feedproxy.google.com Published On :: 2019-03-28T09:07:40+00:00 By the numbers, JavaScript is a performance liability. If the trend persists, the median page will be shipping at least 400 KB of it before too long, and that’s merely what’s transferred. Like other text-based resources, JavaScript is almost always served compressed—but that might be the only thing we’re getting consistently right in its delivery. Unfortunately, while reducing resource transfer time is a big part of that whole performance thing, compression has no effect on how long browsers take to process a script once it arrives in its entirety. If a server sends 400 KB of compressed JavaScript, the actual amount browsers have to process after decompression is north of a megabyte. How well devices cope with these heavy workloads depends, well, on the device. Much has been written about how adept various devices are at processing lots of JavaScript, but the truth is, the amount of time it takes to process even a trivial amount of it varies greatly between devices. Take, for example, this throwaway project of mine, which serves around 23 KB of uncompressed JavaScript. On a mid-2017 MacBook Pro, Chrome chews through this comparably tiny payload in about 25 ms. On a Nokia 2 Android phone, however, that figure balloons to around 190 ms. That’s not an insignificant amount of time, but in either case, the page gets interactive reasonably fast. Now for the big question: how do you think that little Nokia 2 does on an average page? It chokes. Even on a fast connection, browsing the web on it is an exercise in patience as JavaScript-laden web pages brick it for considerable stretches of time. Figure 1. A performance timeline overview of a Nokia 2 Android phone browsing on a page where excessive JavaScript monopolizes the main thread. While devices and the networks they navigate the web on are largely improving, we’re eating those gains as trends suggest. We need to use JavaScript responsibly. That begins with understanding what we’re building as well as how we’re building it. The mindset of “sites” versus “apps” Nomenclature can be strange in that we sometimes loosely identify things with terms that are inaccurate, yet their meanings are implicitly understood by everyone. Sometimes we overload the term “bee” to also mean “wasp”, even though the differences between bees and wasps are substantial. Those differences can motivate you to deal with each one differently. For instance, we’ll want to destroy a wasp nest, but because bees are highly beneficial and vulnerable insects, we may opt to relocate them. We can be just as fast and loose in interchanging the terms “website” and “web app”. The differences between them are less clear than those between yellowjackets and honeybees, but conflating them can bring about painful outcomes. The pain comes in the affordances we allow ourselves when something is merely a “website” versus a fully-featured “web app.” If you’re making an informational website for a business, you’re less likely to lean on a powerful framework to manage changes in the DOM or implement client-side routing—at least, I hope. Using tools so ill-suited for the task would not only be a detriment to the people who use that site but arguably less productive. When we build a web app, though, look out. We’re installing packages which usher in hundreds—if not thousands—of dependencies, some of which we’re not sure are even safe. We’re also writing complicated configurations for module bundlers. In this frenzied, yet ubiquitous, sort of dev environment, it takes knowledge and vigilance to ensure what gets built is fast and accessible. If you doubt this, run npm ls --prod in your project’s root directory and see if you recognize everything in that list. Even if you do, that doesn’t account for third party scripts—of which I’m sure your site has at least a few. What we tend to forget is that the environment websites and web apps occupy is one and the same. Both are subject to the same environmental pressures that the large gradient of networks and devices impose. Those constraints don’t suddenly vanish when we decide to call what we build “apps”, nor do our users’ phones gain magical new powers when we do so. It’s our responsibility to evaluate who uses what we make, and accept that the conditions under which they access the internet can be different than what we’ve assumed. We need to know the purpose we’re trying to serve, and only then can we build something that admirably serves that purpose—even if it isn’t exciting to build. That means reassessing our reliance on JavaScript and how the use of it—particularly to the exclusion of HTML and CSS—can tempt us to adopt unsustainable patterns which harm performance and accessibility. Don’t let frameworks force you into unsustainable patterns I’ve been witness to some strange discoveries in codebases when working with teams that depend on frameworks to help them be highly productive. One characteristic common among many of them is that poor accessibility and performance patterns often result. Take the React component below, for example: import React, { Component } from "react"; import { validateEmail } from "helpers/validation"; class SignupForm extends Component { constructor (props) { super(props); this.handleSubmit = this.handleSubmit.bind(this); this.updateEmail = this.updateEmail.bind(this); this.state.email = ""; } updateEmail (event) { this.setState({ email: event.target.value }); } handleSubmit () { // If the email checks out, submit if (validateEmail(this.state.email)) { // ... } } render () { return ( Enter your email: Sign Up ); } } There are some notable accessibility issues here: A form that doesn’t use a <form> element is not a form. Indeed, you could paper over this by specifying role="form" in the parent <div>, but if you’re building a form—and this sure looks like one—use a <form> element with the proper action and method attributes. The action attribute is crucial, as it ensures the form will still do something in the absence of JavaScript—provided the component is server-rendered, of course.A <span> is not a substitute for a <label> element, which provides accessibility benefits <span>s don’t.If we intend to do something on the client side prior to submitting a form, then we should move the action bound to the <button> element's onClick handler to the <form> element’s onSubmit handler.Incidentally, why use JavaScript to validate an email address when HTML5 offers form validation controls in almost every browser back to IE 10? There’s an opportunity here to rely on the browser and use an appropriate input type, as well as the required attribute—but be aware that getting this to work right with screen readers takes a little know-how.While not an accessibility issue, this component doesn't rely on any state or lifecycle methods, which means it can be refactored into a stateless functional component, which uses considerably less JavaScript than a full-fledged React component. Knowing these things, we can refactor this component: import React from "react"; const SignupForm = props => { const handleSubmit = event => { // Needed in case we're sending data to the server XHR-style // (but will still work if server-rendered with JS disabled). event.preventDefault(); // Carry on... }; return ( <form method="POST" action="/signup" onSubmit={handleSubmit}> <label for="email" class="email-label">Enter your email:</label> <input type="email" id="email" required /> <button>Sign Up</button> </form> ); }; Not only is this component now more accessible, but it also uses less JavaScript. In a world that’s drowning in JavaScript, deleting lines of it should feel downright therapeutic. The browser gives us so much for free, and we should try to take advantage of that as often as possible. This is not to say that inaccessible patterns occur only when frameworks are used, but rather that a sole preference for JavaScript will eventually surface gaps in our understanding of HTML and CSS. These knowledge gaps will often result in mistakes we may not even be aware of. Frameworks can be useful tools that increase our productivity, but continuing education in core web technologies is essential to creating usable experiences, no matter what tools we choose to use. Rely on the web platform and you’ll go far, fast While we’re on the subject of frameworks, it must be said that the web platform is a formidable framework of its own. As the previous section showed, we’re better off when we can rely on established markup patterns and browser features. The alternative is to reinvent them, and invite all the pain such endeavors all but guarantee us, or worse: merely assume that the author of every JavaScript package we install has solved the problem comprehensively and thoughtfully. SINGLE PAGE APPLICATIONS One of the tradeoffs developers are quick to make is to adopt the single page application (SPA) model, even if it’s not a fit for the project. Yes, you do gain better perceived performance with the client-side routing of an SPA, but what do you lose? The browser’s own navigation functionality—albeit synchronous—provides a slew of benefits. For one, history is managed according to a complex specification. Users without JavaScript—be it by their own choice or not—won’t lose access altogether. For SPAs to remain available when JavaScript is not, server-side rendering suddenly becomes a thing you have to consider. Figure 2. A comparison of an example app loading on a slow connection. The app on the left depends entirely upon JavaScript to render a page. The app on the right renders a response on the server, but then uses client-side hydration to attach components to the existing server-rendered markup. Accessibility is also harmed if a client-side router fails to let people know what content on the page has changed. This can leave those reliant on assistive technology to suss out what changes have occurred on the page, which can be an arduous task. Then there’s our old nemesis: overhead. Some client-side routers are very small, but when you start with React, a compatible router, and possibly even a state management library, you’re accepting that there’s a certain amount of code you can never optimize away—approximately 135 KB in this case. Carefully consider what you’re building and whether a client side router is worth the tradeoffs you’ll inevitably make. Typically, you’re better off without one. If you’re concerned about the perceived navigation performance, you could lean on rel=prefetch to speculatively fetch documents on the same origin. This has a dramatic effect on improving perceived loading performance of pages, as the document is immediately available in the cache. Because prefetches are done at a low priority, they’re also less likely to contend with critical resources for bandwidth. Figure 3. The HTML for the writing/ URL is prefetched on the initial page. When the writing/ URL is requested by the user, the HTML for it is loaded instantaneously from the browser cache. The primary drawback with link prefetching is that you need to be aware that it can be potentially wasteful. Quicklink, a tiny link prefetching script from Google, mitigates this somewhat by checking if the current client is on a slow connection—or has data saver mode enabled—and avoids prefetching links on cross-origins by default. Service workers are also hugely beneficial to perceived performance for returning users, whether we use client side routing or not—provided you know the ropes. When we precache routes with a service worker, we get many of the same benefits as link prefetching, but with a much greater degree of control over requests and responses. Whether you think of your site as an “app” or not, adding a service worker to it is perhaps one of the most responsible uses of JavaScript that exists today. JAVASCRIPT ISN’T THE SOLUTION TO YOUR LAYOUT WOES If we’re installing a package to solve a layout problem, proceed with caution and ask “what am I trying to accomplish?” CSS is designed to do this job, and requires no abstractions to use effectively. Most layout issues JavaScript packages attempt to solve, like box placement, alignment, and sizing, managing text overflow, and even entire layout systems, are solvable with CSS today. Modern layout engines like Flexbox and Grid are supported well enough that we shouldn’t need to start a project with any layout framework. CSS is the framework. When we have feature queries, progressively enhancing layouts to adopt new layout engines is suddenly not so hard. /* Your mobile-first, non-CSS grid styles goes here */ /* The @supports rule below is ignored by browsers that don't support CSS grid, _or_ don't support @supports. */ @supports (display: grid) { /* Larger screen layout */ @media (min-width: 40em) { /* Your progressively enhanced grid layout styles go here */ } } Using JavaScript solutions for layout and presentations problems is not new. It was something we did when we lied to ourselves in 2009 that every website had to look in IE6 exactly as it did in the more capable browsers of that time. If we’re still developing websites to look the same in every browser in 2019, we should reassess our development goals. There will always be some browser we’ll have to support that can’t do everything those modern, evergreen browsers can. Total visual parity on all platforms is not only a pursuit made in vain, it’s the principal foe of progressive enhancement. I’m not here to kill JavaScript Make no mistake, I have no ill will toward JavaScript. It’s given me a career and—if I’m being honest with myself—a source of enjoyment for over a decade. Like any long-term relationship, I learn more about it the more time I spend with it. It’s a mature, feature-rich language that only gets more capable and elegant with every passing year. Yet, there are times when I feel like JavaScript and I are at odds. I am critical of JavaScript. Or maybe more accurately, I’m critical of how we’ve developed a tendency to view it as a first resort to building for the web. As I pick apart yet another bundle not unlike a tangled ball of Christmas tree lights, it’s become clear that the web is drunk on JavaScript. We reach for it for almost everything, even when the occasion doesn’t call for it. Sometimes I wonder how vicious the hangover will be. In a series of articles to follow, I’ll be giving more practical advice to follow to stem the encroaching tide of excessive JavaScript and how we can wrangle it so that what we build for the web is usable—or at least more so—for everyone everywhere. Some of the advice will be preventative. Some will be mitigating “hair of the dog” measures. In either case, the outcomes will hopefully be the same. I believe that we all love the web and want to do right by it, but I want us to think about how to make it more resilient and inclusive for all. Full Article
java Responsible JavaScript: Part II By feedproxy.google.com Published On :: 2019-06-13T13:30:28+00:00 You and the rest of the dev team lobbied enthusiastically for a total re-architecture of the company’s aging website. Your pleas were heard by management—even up to the C-suite—who gave the green light. Elated, you and the team started working with the design, copy, and IA teams. Before long, you were banging out new code. It started out innocently enough with an npm install here and an npm install there. Before you knew it, though, you were installing production dependencies like an undergrad doing keg stands without a care for the morning after. Then you launched. Unlike the aftermath of most copious boozings, the agony didn’t start the morning after. Oh, no. It came months later in the ghastly form of low-grade nausea and headache of product owners and middle management wondering why conversions and revenue were both down since the launch. It then hit a fever pitch when the CTO came back from a weekend at the cabin and wondered why the site loaded so slowly on their phone—if it indeed ever loaded at all. Everyone was happy. Now no one is happy. Welcome to your first JavaScript hangover. It’s not your fault When you’re grappling with a vicious hangover, “I told you so” would be a well-deserved, if fight-provoking, rebuke—assuming you could even fight in so sorry a state. When it comes to JavaScript hangovers, there’s plenty of blame to dole out. Pointing fingers is a waste of time, though. The landscape of the web today demands that we iterate faster than our competitors. This kind of pressure means we’re likely to take advantage of any means available to be as productive as possible. That means we’re more likely—but not necessarily doomed—to build apps with more overhead, and possibly use patterns that can hurt performance and accessibility. Web development isn't easy. It’s a long slog we rarely get right on the first try. The best part of working on the web, however, is that we don’t have to get it perfect at the start. We can make improvements after the fact, and that’s just what the second installment of this series is here for. Perfection is a long ways off. For now, let’s take the edge off of that JavaScript hangover by improving your site’s, er, scriptuation in the short term. Round up the usual suspects It might seem rote, but it’s worth going through the list of basic optimizations. It’s not uncommon for large development teams—particularly those that work across many repositories or don’t use optimized boilerplate—to overlook them. Shake those trees First, make sure your toolchain is configured to perform tree shaking. If tree shaking is new to you, I wrote a guide on it last year you can consult. The short of it is that tree shaking is a process in which unused exports in your codebase don’t get packaged up in your production bundles. Tree shaking is available out of the box with modern bundlers such as webpack, Rollup, or Parcel. Grunt or gulp—which are not bundlers, but rather task runners—won’t do this for you. A task runner doesn’t build a dependency graph like a bundler does. Rather, they perform discrete tasks on the files you feed to them with any number of plugins. Task runners can be extended with plugins to use bundlers to process JavaScript. If extending task runners in this way is problematic for you, you’ll likely need to manually audit and remove unused code. For tree shaking to be effective, the following must be true: Your app logic and the packages you install in your project must be authored as ES6 modules. Tree shaking CommonJS modules isn’t practically possible.Your bundler must not transform ES6 modules into another module format at build time. If this happens in a toolchain that uses Babel, @babel/preset-env configuration must specify modules: false to prevent ES6 code from being converted to CommonJS. On the off chance tree shaking isn’t occurring during your build, getting it to work may help. Of course, its effectiveness varies on a case-by-case basis. It also depends on whether the modules you import introduce side effects, which may influence a bundler’s ability to shake unused exports. Split that code Chances are good that you’re employing some form of code splitting, but it’s worth re-evaluating how you’re doing it. No matter how you’re splitting code, there are two questions that are always worth asking yourself: Are you deduplicating common code between entry points?Are you lazy loading all the functionality you reasonably can with dynamic import()? These are important because reducing redundant code is essential to performance. Lazy loading functionality also improves performance by lowering the initial JavaScript footprint on a given page. On the redundancy front, using an analysis tool such as Bundle Buddy can help you find out if you have a problem. Bundle Buddy can examine your webpack compilation statistics and determine how much code is shared between your bundles. Where lazy loading is concerned, it can be a bit difficult to know where to start looking for opportunities. When I look for opportunities in existing projects, I’ll search for user interaction points throughout the codebase, such as click and keyboard events, and similar candidates. Any code that requires a user interaction to run is a potentially good candidate for dynamic import(). Of course, loading scripts on demand brings the possibility that interactivity could be noticeably delayed, as the script necessary for the interaction must be downloaded first. If data usage is not a concern, consider using the rel=prefetch resource hint to load such scripts at a low priority that won’t contend for bandwidth against critical resources. Support for rel=prefetch is good, but nothing will break if it’s unsupported, as such browsers will ignore markup they doesn’t understand. Externalize third-party hosted code Ideally, you should self-host as many of your site’s dependencies as possible. If for some reason you must load dependencies from a third party, mark them as externals in your bundler’s configuration. Failing to do so could mean your website’s visitors will download both locally hosted code and the same code from a third party. Let’s look at a hypothetical situation where this could hurt you: say that your site loads Lodash from a public CDN. You've also installed Lodash in your project for local development. However, if you fail to mark Lodash as external, your production code will end up loading a third party copy of it in addition to the bundled, locally hosted copy. This may seem like common knowledge if you know your way around bundlers, but I’ve seen it get overlooked. It’s worth your time to check twice. If you aren’t convinced to self-host your third-party dependencies, then consider adding dns-prefetch, preconnect, or possibly even preload hints for them. Doing so can lower your site’s Time to Interactive and—if JavaScript is critical to rendering content—your site’s Speed Index. Smaller alternatives for less overhead Userland JavaScript is like an obscenely massive candy store, and we as developers are awed by the sheer amount of open source offerings. Frameworks and libraries allow us to extend our applications to quickly do all sorts of stuff that would otherwise take loads of time and effort. While I personally prefer to aggressively minimize the use of client-side frameworks and libraries in my projects, their value is compelling. Yet, we do have a responsibility to be a bit hawkish when it comes to what we install. When we’ve already built and shipped something that depends on a slew of installed code to run, we’ve accepted a baseline cost that only the maintainers of that code can practically address. Right? Maybe, but then again, maybe not. It depends on the dependencies used. For instance, React is extremely popular, but Preact is an ultra-small alternative that largely shares the same API and retains compatibility with many React add-ons. Luxon and date-fns are much more compact alternatives to moment.js, which is not exactly tiny. Libraries such as Lodash offer many useful methods. Yet, some of them are easily replaceable with native ES6. Lodash’s compact method, for example, is replaceable with the filter array method. Many more can be replaced without much effort, and without the need for pulling in a large utility library. Whatever your preferred tools are, the idea is the same: do some research to see if there are smaller alternatives, or if native language features can do the trick. You may be surprised at how little effort it may take you to seriously reduce your app’s overhead. Differentially serve your scripts There’s a good chance you’re using Babel in your toolchain to transform your ES6 source into code that can run on older browsers. Does this mean we’re doomed to serve giant bundles even to browsers that don’t need them, until the older browsers disappear altogether? Of course not! Differential serving helps us get around this by generating two different builds of your ES6 source: Bundle one, which contains all the transforms and polyfills required for your site to work on older browsers. You’re probably already serving this bundle right now.Bundle two, which contains little to none of the transforms and polyfills because it targets modern browsers. This is the bundle you’re probably not serving—at least not yet. Achieving this is a bit involved. I’ve written a guide on one way you can do it, so there’s no need for a deep dive here. The long and short of it is that you can modify your build configuration to generate an additional but smaller version of your site’s JavaScript code, and serve it only to modern browsers. The best part is that these are savings you can achieve without sacrificing any features or functionality you already offer. Depending on your application code, the savings could be quite significant. A webpack-bundle-analyzer analysis of a project's legacy bundle (left) versus one for a modern bundle (right). View full-sized image. The simplest pattern for serving these bundles to their respective platforms is brief. It also works a treat in modern browsers: <!-- Modern browsers load this file: --> <script type="module" src="/js/app.mjs"></script> <!-- Legacy browsers load this file: --> <script defer nomodule src="/js/app.js"></script> Unfortunately, there’s a caveat with this pattern: legacy browsers like IE 11—and even relatively modern ones such as Edge versions 15 through 18—will download both bundles. If this is an acceptable trade-off for you, then worry no further. On the other hand, you'll need a workaround if you’re concerned about the performance implications of older browsers downloading both sets of bundles. Here’s one potential solution that uses script injection (instead of the script tags above) to avoid double downloads on affected browsers: var scriptEl = document.createElement("script"); if ("noModule" in scriptEl) { // Set up modern script scriptEl.src = "/js/app.mjs"; scriptEl.type = "module"; } else { // Set up legacy script scriptEl.src = "/js/app.js"; scriptEl.defer = true; // type="module" defers by default, so set it here. } // Inject! document.body.appendChild(scriptEl); This script infers that if a browser supports the nomodule attribute in the script element, it understands type="module". This ensures that legacy browsers only get legacy scripts and modern browsers only get modern ones. Be warned, though, that dynamically injected scripts load asynchronously by default, so set the async attribute to false if dependency order is crucial. Transpile less I’m not here to trash Babel. It’s indispensable, but lordy, it adds a lot of extra stuff without your ever knowing. It pays to peek under the hood to see what it’s up to. Some minor changes in your coding habits can have a positive impact on what Babel spits out. https://twitter.com/_developit/status/1110229993999777793 To wit: default parameters are a very handy ES6 feature you probably already use: function logger(message, level = "log") { console[level](message); } The thing to pay attention to here is the level parameter, which has a default of “log.” This means if we want to invoke console.log with this wrapper function, we don’t need to specify level. Great, right? Except when Babel transforms this function, the output looks like this: function logger(message) { var level = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "log"; console[level](message); } This is an example of how, despite our best intentions, developer conveniences can backfire. What was a handful of bytes in our source has now been transformed into much larger in our production code. Uglification can’t do much about it either, as arguments can’t be reduced. Oh, and if you think rest parameters might be a worthy antidote, Babel’s transforms for them are even bulkier: // Source function logger(...args) { const [level, message] = args; console[level](message); } // Babel output function logger() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } const level = args[0], message = args[1]; console[level](message); } Worse yet, Babel transforms this code even for projects with a @babel/preset-env configuration targeting modern browsers, meaning the modern bundles in your differentially served JavaScript will be affected too! You could use loose transforms to soften the blow—and that’s a fine idea, as they’re often quite a bit smaller than their more spec-compliant counterparts—but enabling loose transforms can cause issues if you remove Babel from your build pipeline later on. Regardless of whether you decide to enable loose transforms, here’s one way to cut the cruft of transpiled default parameters: // Babel won't touch this function logger(message, level) { console[level || "log"](message); } Of course, default parameters aren’t the only feature to be wary of. For example, spread syntax gets transformed, as do arrow functions and a whole host of other stuff. If you don’t want to avoid these features altogether, you have a couple ways of reducing their impact: If you’re authoring a library, consider using @babel/runtime in concert with @babel/plugin-transform-runtime to deduplicate the helper functions Babel puts into your code.For polyfilled features in apps, you can include them selectively with @babel/polyfill via @babel/preset-env’s useBuiltIns: "usage" option. This is solely my opinion, but I believe the best choice is to avoid transpilation altogether in bundles generated for modern browsers. That’s not always possible, especially if you use JSX, which must be transformed for all browsers, or if you’re using bleeding edge language features that aren’t widely supported. In the latter case, it might be worth asking if those features are really necessary to deliver a good user experience (they rarely are). If you arrive at the conclusion that Babel must be a part of your toolchain, then it’s worth peeking under the hood from time to time to catch suboptimal stuff Babel might be doing that you can improve on. Improvement is not a race As you massage your temples wondering when this horrid JavaScript hangover is going to lift, understand that it’s precisely when we rush to get something out there as fast as we possibly can that the user experience can suffer. As the web development community obsesses on iterating faster in the name of competition, it’s worth your time to slow down a little bit. You’ll find that by doing so, you may not be iterating as fast as your competitors, but your product will be faster than theirs. As you take these suggestions and apply them to your codebase, know that progress doesn’t spontaneously happen overnight. Web development is a job. The truly impactful work is done when we’re thoughtful and dedicated to the craft for the long haul. Focus on steady improvements. Measure, test, repeat, and your site’s user experience will improve, and you’ll get faster bit by bit over time. Special thanks to Jason Miller for tech editing this piece. Jason is the creator and one of the many maintainers of Preact, a vastly smaller alternative to React with the same API. If you use Preact, please consider supporting Preact through Open Collective. Full Article
java Introducing a JavaScript library for exploring Scratch projects: sb-util By feedproxy.google.com Published On :: Thu, 26 Sep 2019 15:51:42 +0000 Introduction We’re excited to introduce sb-util, a new JavaScript library that makes it easy to query Scratch projects via .sb3 files. This npm library allows developers (or even teachers and students) to parse and introspect Scratch projects for a range of purposes, from data visualization to custom tooling. Previously, working with Scratch project files required […] Full Article Uncategorized
java The nonlinear workbook : chaos, fractals, cellular automata, genetic algorithms, gene expression programming, support vector machine, wavelets, hidden Markov models, fuzzy logic with C++, Java and symbolic C++ programs / Willi-Hans Steeb, University of Jo By prospero.murdoch.edu.au Published On :: Steeb, W.-H Full Article
java The Definitive Guide to AdonisJs: Building Node.js Applications with JavaScript / by Christopher Pitt By library.mit.edu Published On :: Sun, 11 Aug 2019 08:44:18 EDT Online Resource Full Article
java Java APIs, Extensions and Libraries: With JavaFX, JDBC, jmod, jlink, Networking, and the Process API, Second Edition / by Kishori Sharan By library.mit.edu Published On :: Sun, 11 Aug 2019 08:44:18 EDT Online Resource Full Article
java Learn HTML5 and Javascript for iOS / Scott Preston By prospero.murdoch.edu.au Published On :: Preston, Scott, 1969- Full Article
java Exam ref 70-480 : programming in HTML5 with Javascript and CSS3 / Rick Delorme By prospero.murdoch.edu.au Published On :: Delorme, Rick, author Full Article
java Demand Response Application in Smart Grids: Operation Issues. / Sayyad Nojavan, Kazem Zare, editors By library.mit.edu Published On :: Sun, 19 Jan 2020 07:42:04 EST Online Resource Full Article
java Web Directions Code ’20 session spotlight–JavaScript debugging the hard way By www.webdirections.org Published On :: Tue, 17 Mar 2020 22:52:00 +0000 JavaScript debugging the hard way Marcin Szczepanski, Principal Developer Atlassian Error on line 1, column 6532112 of bundle.js? Out of memory error trying to load a CPU profile into the Chrome debugger? Two minutes to see wait and see if a change you made fixed a bug? While upgrading our complex web application from Webpack […] The post Web Directions Code ’20 session spotlight–JavaScript debugging the hard way appeared first on Web Directions. Full Article Blog