Express Tutorial: HTTP Requests in Express.js

See the original posting on DZone Python

All aboard!

Requests and Routing

HTTP requests are binary information packets that a computer or client sends to another computer or server to communicate.

Routing is basically defined as the process of selecting a path for traffic or request in a network or in a web framework. In Express, we can access web pages, files, images, scripts, stylesheets, etc. at different paths set by route. To define a route in Express, we use app.method (path, handler).

Node.js Server Configurations

See the original posting on DZone Python

Get started developing in Docker with Node.js

Node.js is an open-source MIT licensed cross-platform environment for JavaScript, which allows users to execute JS code outside the browser. It has been written in JavaScript, C, and C++. It can be installed on Windows, macOS X, Smart OS, and Linux.

It allows using JavaScript to develop command-line tools. It allows running scripts on the server-side for producing dynamic pages. Rather than using different server-side and client-side languages, it helps you to unify your web application around single programming.

Seize your right to repair by learning a few basic skills

See the original posting on Boing Boing

I’ve been repairing my phones and computers for years—I don’t like being at the mercy of hardware vendors, especially when there’s a sea of original and gray market replacement parts out there to be had. Upgrades? Same thing. While companies like Microsoft and Apple are making it almost impossible to tinker with the toys they make, it feels good to know that I can still at least install a fresh battery or increase the size of an old laptop’s on board storage for hundreds less than it would cost me were I to take it into one of their repair centers. As I plopped a replacement battery into my 2012 11″ MacBook Air earlier this week. I found my self feeling a lot of gratitude for the folks who talk me the fundamentals of puttering about with electronics. However, I know that not everyone has access to folks that can help them learn the skills they need in order to diagnose or correct a problem with their laptop, game console or other devices. This can make getting started with repairing you gear feel pretty intimidating.

You can get around this intimidation in a couple of ways. You can, if you’re lucky enough to have one where you live visit a repair cafe or other similar business. They have the tools and instructions you’ll need in order to learn how to do it yourself. And of course, there’s the Interwebz. You’ll find no end of videos that suggest how to tinker out a technical problem. Read the rest

Carnival Row is the latest H.P. Lovecraft descendant to directly subvert his racism

See the original posting on The Verge

Photo by Jan Thijs / Amazon Studios

Warning: broad spoilers ahead for season 1 of Carnival Row.

H.P. Lovecraft is one of the most imaginative, singular, brilliant, and influential horror writers of all time. He’s also one of the most overtly, profoundly racist. Lovecraft’s fans and heirs have long struggled with the question of how to separate his particular vision of cosmic horror from the visceral loathing of non-white people he expressed in his work.

In the past, authors like August Derleth and Stephen King have mostly tried to ignore the prejudice, concentrating instead on Lovecraft’s vision of a grotesque universe bent on humanity’s destruction and the joys of his clotted, tentacular, Cyclopean prose. More recently, though, several writers have engaged Lovecraft’s…

Continue reading…

Microsoft unveils redesigned To Do app that will replace Wunderlist

See the original posting on The Verge

Microsoft is making some big tweaks to its To-Do app this week, with a redesign that includes more customization options and a rename from To-Do to simply To Do. The big headers in the current version of To Do are going away in favor of a variety of background images and color templates that can theme the entire app. You’ll even be able to choose from the Berlin TV tower background that was featured in Wunderlist, as Microsoft tries to bring the best of Wunderlist and To Do together.

To Do looks a lot more like the original Wunderlist now, and backgrounds are customizable per list so you can really customize the look of To Do on a list by list basis. Dark mode is also now available on Android, Windows, and Mac, and it will soon debut on…

Continue reading…

Will Apple justify the iPhone 11’s camera bump?

See the original posting on The Verge

IPhone XS and iPhone XS Max | Photo by James Bareham / The Verge

Apple will announce new iPhones tomorrow, September 10th, and this year’s event will have all of the usual trappings of an iPhone introduction, I’m sure. Expect a teaser video that shows you up-close shots of different parts of the phone before revealing the whole thing. Expect lots of talk about how powerful the processor is. Expect dunks on how Android never seems to be updated. Expect some kind of whizbang AR demo.

Most of all, expect a lot of talk about the camera. Because the most notable expected change to the basic iPhone X-series shape of the phones is that it will have a big, square camera module with extra lenses — and everybody is already focused (pardon the pun) on it.

Chaim Gartenberg has already written up all the news on…

Continue reading…

How school buses became yellow, and some of the safest vehicles on the road

See the original posting on Boing Boing

In the early days of busing kids to school, buses were painted all sorts of colors, and built to different specs. But in the late 1930s, education expert Frank Cyr started agitating for a national standard — so manufacturers could mass-produce to one spec, making buses cheaper.

In 1939, Cyr met for one week with school-transportation officials from across the country, and they hammered out a spec. One key decision? Setting the official color of school buses. They hung “hung strips of different paint colors from the wall, in ’50 shades ranging from lemon yellow to deep orange-red'”, as Smithsonian writes — and the winner was an orangish-yellow.

Why that color? Because it’s easy to see, making buses readily identifiable on the road, very useful for safety. What’s more, the particular shade of yellow they picked has some cool spectral qualities that make our perceptual apparatuses jump to attention, notes Ivan Schwab, clinical spokesperson at the American Academy of Ophthalmology:

The wavelength of the popular school-bus color is “right smack in the middle” of the peak wavelengths that stimulate the photoreceptor cells our eyes use to perceive red and green. The red and green photoreceptor cells, or “cones” as they are commonly known, are the two most predominant cones in our eyes. Schwab says, “If you get a pure wavelength of one color…and you hit just one cone with it, you’re going to have x amount of transmission of signal to the brain. But if that [wavelength] were to stimulate two cones, you’ll get double the amount of transmission to the brain.” Remarkably, “That color that we are calling school bus yellow hits both peaks equally.” So although they may not have fully comprehended the science behind it, the color Cyr and his colleagues chose at the 1939 conference makes it hard for other drivers to miss a school bus, even in their peripheral vision.

Read the rest

Rap battle between Alexander Hamilton and Satoshi Nakamoto over Bitcoin

See the original posting on Boing Boing

This is pretty brilliant: A rap battle between Alexander Hamilton and Satoshi Nakamoto over the merits of centralized, government-fiat currency, versus decentralized cryptocurrencies.

It’s a note-perfect homage to the terrific “cabinet rap battles” in the musical Hamilton (worth listening to, #1 and #2).

Over at freeCodeCamp, Quincy Larson transcribed the lyrics:

[Satoshi Nakamoto]
Decentralized currency. Yes, I invented it.
I’m sure many governments wish they had prevented it
Their national cash is how they keep control,
But freedom to the people was my ultimate goal.
Am I a pseudonym? A group of men? It doesn’t even matter.
I invented Bitcoin cause fiat is a disaster.
A man from Japan or a damn hologram?
I’m the reason open season on crypto began.

[Alexander Hamilton]
Does anybody know what this crypto-thing means?
To me, sounds like the new Get Broke Quick scheme,
A bunch of fools from across the land
Investing in something they don’t even understand,
Buying Litecoin, Dash, Bitcoin Cash,
It’s all gonna crash, and be gone in a flash.
All this unsupported money’s an irrational prank,
And I’ll be laughing all the way to my National Bank.

Read the rest

Leaked Google Pixel 4 promo video includes gestures, astrophotography mode, and more

See the original posting on The Verge

It’s only been a few hours since the last Google Pixel 4 leak, and now what looks like an official promo video has appeared online. Spanish site ProAndroid has obtained a promo video of the Pixel 4, and it appears to confirm gestures, an astrophotography mode, and Google’s nighttime camera improvements.

Rumors that appeared last week suggest Google is preparing a new “Motion Mode” for shooting sports and actions shots. The rumors also revealed an 8x zoom and capabilities for astrophotography — the ability to capture night shots with the Milky Way in the background. This promo video certainly suggests that Google will focus on the ability to take photos of the stars with the Pixel 4.

There also appears to be some new Google Assistant…

Continue reading…

Google Nest Hub Max review

See the original posting on TechCrunch

There were two standout features I really appreciated off the bat about the original Nest (nee Google Home) Hub: its compact size and its lack of camera. The new Nest Max has decidedly neither of those things. After releasing a model that offered an interesting alternative to the Echo Show, Google’s taking Amazon’s flagship smart […]

Swarovski Goatse bracelet

See the original posting on Boing Boing

Goatse straddles the internet like a colossus, a majesty of horrors half-forgotten amid the shifting sands of the web. Yet it retains its capacity to amuse and surprise. Good work, Swarovski, good work!

Opt for subtle glamour, and touches of cool romance, with this dainty rose gold-plated bracelet. Featuring a swan motif with a full-cut crystal body in cool millennial pink and crisp clear pavé lines, it’s a Swarovski design through and through. It also features our innovative magnetic closure, which will allow you to blend in strands from our Swarovski Remix Collection to create a bespoke look – be it double-wrap bracelet, necklace, or choker. Perfect for versatile styling, it will take pride of place in your collection. Matching items are available.

It is $120 from Amazon or a Swarovsky store near you.Opt for subtle glamour.

Tarot Magic Bracelet [Amazon] Read the rest

CELLivilization: Civilization implemented in Microsoft Excel

See the original posting on Boing Boing

Sid Meier’s Civilization, significantly refined in sequels by Brian Reynolds and others, is a true classic of computer gaming. And now you can play the elaborate historical strategy game as an Excel spreadsheet. Behold CELLivilization, by s0lly.

This is my first game in Excel, with the first iteration (v1.0) created in just around a week for the OLC CODEJAM 2019
The gamejam’s theme is destruction, which is apt for this game’s v1.0 iteration, given that the only way to win is to destroy the opposing team.

The game is very light on features (basically just build units and attack the opposition), but I will add on additional features – DLC you could call it – if people are keen to see more!

One is torn between two thoughts: (a) Excel has become a sprawling, shambling monster and will expand until everything is in it, and (b) Excel is a surprisingly accessible programming environment in a world where most game development platforms are horribly intimidating to beginners. Read the rest

Fluid paint simulation on the web

See the original posting on Boing Boing is a spectacularly gloopy painting app online. You can set paint fluidity, bristle count and brush size, and of course pick any color you like. What I like about it (as opposed to pro apps like Corel Painter or Artrage that offer similar natural media simulations) is that it’s just a loaded messy brush that doesn’t make it easy or clean itself up for you. The limitations force you to work with it! Author David Li published the source code. Read the rest

Andy Weir’s short story “The Egg” animated by Kurzgesagt

See the original posting on Boing Boing

Writer Andy Weir’s popular short story from 2009 (it’s been translated to 30 different languages) about reincarnation, The Egg, has been beautifully animated by German studio Kurzgesagt. It was more than two years in the making.

The story begins:

You were on your way home when you died.

It was a car accident. Nothing particularly remarkable, but fatal nonetheless. You left behind a wife and two children. It was a painless death. The EMTs tried their best to save you, but to no avail. Your body was so utterly shattered you were better off, trust me.

And that’s when you met me.

Posters are available. Read the rest

Volkswagen is electrifying classic VW Beetles

See the original posting on Boing Boing

Sure, tooling around in classic car is cool, but have you ever tried tooling around in a classic car with an engine that’s way less ecologically unsound than the one it originally rolled off the assembly line with? If you’re a Volkswagen Beetle owner, You’ll soon have the chance to give it a spin: Volkswagen’s come up with a standardized electric engine designed to power their classic Beetles down the highway.

From Volkswagen:

Volkswagen Group Components presents a holistic concept with its partner eClassics for the subsequent electrification of the historic Volkswagen Beetle. The conversion exclusively uses new parts they have mutually agreed on from the series production of Volkswagen Group Components. The electric drive, the 1-speed gearbox and the battery system are based on the new VW e-up!1. The conversion of the historic Beetle is being carried out by the specialist company eClassics.

…The components from Kassel and Brunswick work together in the e-Beetle as an electric drive that reaches performance peaks of 60°kW /82°PS. The battery system is built into the underbody and consists of up to 14 modules, each with a capacity of 2.6 kWh. The lithium-ion battery modules cumulatively deliver energy of up to 36.8 kWh. The higher performance and the increased weight due to the extent of electrification require the adaptation and reinforcement of the chassis and the brakes.

So, your Bug will be a little heavier, but the benefits of the conversion sound pretty sweet: Volkswagen claims the that a converted Beetle can accelerate from zero to 50 km/h in just under four seconds and up to 80 km/h in around eight seconds, with a top speed of 150 km/h. Read the rest

1 40 41 42 43 44 58